CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums



Zone: > NEWSGROUP > Adobe-Macromedia Forums > macromedia.flash Tags:
Item Type: Date Entered: 3/28/2008 5:54:20 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 95 Favorited: 0 Favorite
Can Reply:  Yes Members Can Edit: No Online: Yes
3 Items, 1 Pages |< << Go >> >|
"Ryan Padyachie
NewsGroup User
x and y co ordinates for newbie user3/28/2008 5:54:20 AM
Reply

0

Hi There

I have just made my flash movie with a button that loads the external swf file
into it. The problem is that it loads the movie on the top left hand corner of
the screen and not in the centre of the window. my external swf file is
perfect, when the user clicks on the close button, the action script "remove
load movie" works perfectly, the only thing is my movie is not centered so it
looks untidy.

I would appreciate it if somebody could assist me. Please, any suggestions
would be much appreciated.
Also is there any way of having my flash load onto a popup standalone swf
player instead of my main movie.
this would be ideal if the movie loads on the centre of my screen in its own
window.


Kind Regards

Ryan

"ooba" <marshal
NewsGroup User
Re: x and y co ordinates for newbie user3/28/2008 4:23:23 PM
Reply

0

not positive but I think its something like;

myClip._x = ( (Stage.width/2) - (myClip.width/2) );
myClip._y = ( (Stage.height/2) - (myClip.height/2) );
"rritchey" <web
NewsGroup User
Re: x and y co ordinates for newbie user3/28/2008 6:24:16 PM
Reply

0

Slightly less code, same calculation:

myClip._x = (Stage._width-myClip._width)/2;
myClip._y = (Stage._height-myClip._height)/2;

The code above is AS2, it would be slightly different if you are using AS3.

3 Items, 1 Pages |< << Go >> >|



Free Download:






   
  Privacy | Contact Us
All Times Are GMT