gotoandplay("framelabel") not working

  • olliebird
  • Born
  • Born
  • olliebird
  • Posts: 1

Post 3+ Months Ago

I have a site I am building, and I am fairly basic in my flash skill. Anyway, here is the question.

I have a main movie which loads pages into a movie clip, which works like a charm.

In the loaded page, I have buttons which are supposed to gotoandplay("framelabel) but they aren't working.

The loaded swf file plays to frame 25 and stops where I have an AS command stop on a dedicated actions layer. At this frame the buttons are loaded. I labeled frame 26 "mission" and put AS on the corresponding button

on (release) { gotoandplay("mission")}

But when I test the movie and click the button, it stays on frame 25, it doesn't jump to the labeled frame. If I edit the AS on the button to

on (release) { _root.gotoandplay("mission")}

and test the movie, it works fine. But it wont work in the main site because the .swf is loaded into a movie clip.

Any help or suggestions here?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • elBurroDiablo
  • Novice
  • Novice
  • User avatar
  • Posts: 16

Post 3+ Months Ago

Not 100% sure this will be the fix, but you have to be aware of case sensitivity.

Use this --> gotoAndPlay
instead of this --> gotoandplay

Hope that helps.
  • elBurroDiablo
  • Novice
  • Novice
  • User avatar
  • Posts: 16

Post 3+ Months Ago

...also, it looks like others are having similar problems. Are you loading your AS from frame 1? If so, try another frame, and see the post below about this called "Why gotoAndPlay sometimes does not work on first frame"

This is new to me as well, and now that I think about it, I have had an issue here as well.
  • montyt
  • Proficient
  • Proficient
  • User avatar
  • Posts: 275

Post 3+ Months Ago

try this
Code: [ Select ]
on(release){
_root.gotoAndPlay("mission");
}
  1. on(release){
  2. _root.gotoAndPlay("mission");
  3. }
  • ishkabible
  • Born
  • Born
  • ishkabible
  • Posts: 2
  • Loc: Johnstown PA

Post 3+ Months Ago

From what I am reading about the problem...

You have a mc that is 25 frames, with buttons on the 25th frame... You want the loaded swf within the mc to advance the main timeline, to the label "mission".

If this is the case, you can not use "_root". _root talks to the swf's main timeline. Even though the loaded swf is within the a mc, "_root" within the loaded swf, refers to that swf, not the "_root" of the main swf that holds the mc.

If you follow that, try using "_parent" instead of "_root". "_parent" will tell the code to talk to the timeline that the mc is in.

on(release){
_parent.gotoAndPlay("mission");
}


You can also try using "_level0". "_level0" is the main time line of the overall presentation.

on(release){
_level0.gotoAndPlay("mission");
}

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.