View Full Version : Load movie - keep orig. cords? [MX]
Ryall
August 13th, 2004, 10:51 AM
[MX] I'm loading an infinitly scrolling swf into my main swf. When it loads however it doesn't work properly, because all the pixel values in the origonal code do not match for its location in the main movie. I know I can change the AS with new value and make it work, but I am wondering if there is another way. I'd like to be able to move it around and always have it work without changing it. Is there a way I can have the loaded swf retain its OWN origonal x,y cords? or some other method of doing this?
Thanks guys.
Peace
Ryall
August 13th, 2004, 01:52 PM
Here is the code in the swf that Im loading into the main swf, just a simple infinite menu:
onClipEvent (load)
{
xcenter=125;
speed=1/10;
}
onClipEvent (enterFrame)
{
if (_root._xmouse < 33 | _root._xmouse > 218 | _root._ymouse < 18 | _root._ymouse > 62) speed=0;
else speed=1/10;
var distance=_root._xmouse-xcenter;
_x-=(distance*speed);
if (_x > 0) _x=-893;
if (_x < -893) _x=0;
}
Now when it gets loaded in, all those numeric values dont work anymore, because its new position in main has changed its location. I want this code to be refering to the position reletive to itself, not the new swf it is loaded into. I've tried different ways of targeting x and y, but havent gotton it to work. Anyone know what to do here?
Help would be greatly appreciated. Thanks.
Peace
Ryall
August 14th, 2004, 11:09 AM
anyone have an idea?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.