Hey everyone,
(before I start FMX2004 PRO, OSX)
I have an object on my main timeline , “Scene 1” which is supposed to follow the mouse. This object has been given the following actionscript.
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 3;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
WITHIN that object, I have included my preloader. With the following actionscript.
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int( loaded / total * 100);
gotoAndStop(percent);
if (loaded == total) {
_parent.nextScene(2);
}
}
ALL of that stuff was in my MAIN movie. Here’s where I think my problem is:
The main movie loads external swf files. On “Scene 1” of the loaded SWFs is the same mouse follow object and the same actionscript within that object for the preloader. I can never seem to grasp the parent, root, this, thing. Please help. In dire need. Thanks.
oops.
It looks like what is happening is that i’ve messed around with it a little and i can get the preloader to work on its own if I open the swfs by itself. The main timeline works fine. As soon as it loads the external SWF the main SWF shifts to somewhere in the timeline and the movieclip that it’s supposed to load stays on “Scene 1”.