-
This code works with one movie and not another
Somebody wrote this on another post to help load and align a movie inside another movie:
--------------------------
_root.createEmptyMovieClip( "receptor" , 4 );
_root[ "receptor" ]._x = 100; //change X position
_root[ "receptor" ]._y = 50; //change Y position
_root[ "receptor" ].loadMovie( "scrollbar.swf" );
---------------------------
Where "scrollbar.swf" is the movie I want loaded.
Anyway, it works in some movies when I test it out, but when I try and put it in other movies, to do the same thing, it doesn't work.
As a matter of fact, if I take the movie that it does work with, and copy and paste the whole thing onto the other one that doesn't work, then that one stops working too! Get it? The loaded movie never shows up.
Any idea? Is this code not for flash mx?
-
Senior Member
Probably the second movie you tested , is not in the same folder with "scrollbar.swf" ... check it.
-
Yes, definitely in the same folder, I should have made that clear. I even created a new folder and moved them all into they're own folder just to make sure. I also tried
------
_root[ "receptor" ].loadMovie( "c:\folder\"scrollbar.swf" );
------
then noticed on the output it said
------
_root[ "receptor" ].loadMovie( "c:\older\scrollbar.swf" );
------
I guess after the backslash, it removes the first character?
So I put 2 backslashes in. Neither version worked.
-
Senior Member
What you should do if things don't work is a couple of trace actions like
trace(_root["receptor"]._x);
and others just to see if everything is defined in that movie and what is the trace exactly. Is it the same as in your previous movie etc. Do you have other createEmptyMovieClips in your other movies?
- The right of the People to create Flash movies shall not be infringed. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|