A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: This code works with one movie and not another

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    53

    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?

  2. #2
    Senior Member stoc's Avatar
    Join Date
    Nov 2001
    Location
    Romania, Arad
    Posts
    428
    Probably the second movie you tested , is not in the same folder with "scrollbar.swf" ... check it.

  3. #3
    Member
    Join Date
    Jun 2003
    Posts
    53
    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.

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center