A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: load swf and go to specific frame

  1. #1
    Junior Member
    Join Date
    Dec 2004
    Posts
    2

    load swf and go to specific frame

    Hello.

    I am trying to load a swf from my main movie and go to a specific frame/label within that movie. I am just using Flash MX and am using the basic command:

    loadMovieNum("PA_work.swf", 1);

    Is this possible? Thank You!!

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    You need to set a variable when you call the other movie, then in that movie, you need cod to read the variable and if the condition is met, go to and play that frame;

    _root.whatFrame = "thisOne";
    loadMovieNum("PA_work.swf", 1);

    In the loaded movie on frame one;

    if(_root.whatFrame == "thisOne"){
    this.gotoAndPlay("framelabelName");
    }

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Nah! _root won't cut it in this case my friend! The movie is loaded on another level!

    Bwalkley, I'll PM you a link to some .flas. The movie is loaded in a container clip though... You would have to adapt it, but the code would basically be the same.

    Regards.

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    OK, use _global

    _global.whatFrame = "thisOne";
    loadMovieNum("PA_work.swf", 1);

    In the loaded movie on frame one;

    if(_global.whatFrame == "thisOne"){
    this.gotoAndPlay("framelabelName");
    }

  5. #5
    Senior Member the_one_18's Avatar
    Join Date
    Mar 2002
    Posts
    217
    yeah iaskwhy is right! use global or u can specify the level, _level0.....
    MeHdI

  6. #6
    Originally posted by iaskwhy
    OK, use _global

    _global.whatFrame = "thisOne";
    loadMovieNum("PA_work.swf", 1);

    In the loaded movie on frame one;

    if(_global.whatFrame == "thisOne"){
    this.gotoAndPlay("framelabelName");
    }
    i promise that old newbies flash example will contain a script similar or a substitute....
    If you kill me, Ill be dead!
    www.powerfuze.com

    "Do you know any slow or special people?" -special ed (crank yankers)

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    What an insight!

  8. #8
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Originally posted by specialed_414
    i promise that old newbies flash example will contain a script similar or a substitute....
    Well, since it's being sent by private message, the rest of us will never know, will we?

  9. #9
    im sure if you wanna know..he will tell ya
    If you kill me, Ill be dead!
    www.powerfuze.com

    "Do you know any slow or special people?" -special ed (crank yankers)

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Tell to Iaskwhy? Never!

  11. #11
    Originally posted by iaskwhy
    Well, since it's being sent by private message, the rest of us will never know, will we?
    Never...
    If you kill me, Ill be dead!
    www.powerfuze.com

    "Do you know any slow or special people?" -special ed (crank yankers)

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