This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > February 2006 > How To Re-position Loaded SWF
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How To Re-position Loaded SWF
|
|
|
| I have a Flash app main screen that is
1024 x 768 and I have a an empty movie clip
where I want to load SWFs
My loaded SWF is much smaller about
300 x 400 and it comes in on the upper
left of the screen
I want it re-positioned in the middle right
How do I do this?
thank you
Code is below.....
//create empty Movie Clip for UI selections
onLoad = function()
{
_root.createEmptyMovieClip("UI_mc", 1);
}
//buttons load movie clips//
about_btn.onPress = function()
{
loadMovie("ABOUTSTRETCH.swf", "UI_mc");
}
:confused;
| |
| Rob Dillon *TMM* 2006-02-20, 3:26 am |
| If you don't give a new movie clip a location, it will be located at the
upper left corner of the stage, at point 0,0. You just need to give the
new clip a new value for the _x and _y properties.
onLoad = function()
{
_root.createEmptyMovieClip("UI_mc", 1);
UI_mc._x = 300;
UI_mc._y = 400;
}
Set the _x and _y values as you like.
--
Rob
_______
Rob Dillon
Team Macromedia
http://www.ddg-designs.com
412-243-9119
http://www.macromedia.com/software/trial/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|