user310291
user310291

Reputation: 38228

Flash gotoAndStop instruction by label name instead of frame number?

I have tested with frame number it works, it doesn't with label name. Is it possible ?

In main.as:

  public function gotoTab1(target:MouseEvent) { 
    gotoAndStop(1);
  }

  public function gotoTab2(target:MouseEvent) { 
    gotoAndStop("tab2");
  }     

first works, second doesn't. Second works with

  public function gotoTab2(target:MouseEvent) { 
    gotoAndStop(5);
  }     

of course I give tab2 as label name to the frame at position 5.

no error shows up. enter image description here

Upvotes: 0

Views: 5814

Answers (1)

Matthew
Matthew

Reputation: 2135

Make sure you labeled the frame with the correct label/name. GotoAndStop works for both frame number and frame label. Check spelling cuz typos are sometimes the culprit! Good luck!

Also, maybe put a stop(); in that frame to ensure flash isn't buzzing through it.

Edit: _root.gotoAndStop("tab2")

Upvotes: 1

Related Questions