?
Solved

Navigate to previous frame label?

Posted on 2003-02-27
2
Medium Priority
?
446 Views
Last Modified: 2007-12-19
Hi! I have a fairly complex multi-tiered navigation system in my Flash MX site. Each item when it unloads completes a tween before moving to the next frame label specified in a variable. Simple enough, once you get down to it.

BUT, I want to do something I do very easily in Director: move back and forth sequentally by label. Since the items are in the timeline one after another I can acheave a "Next Label" by simply specifying no label to jump to, but I can't figure out how to go back.

I have considered using a variable to store the label of the previous item... but I'd rather do it dynamically.

So, is there a function I don't know about? Is there a way to refer to the list of labels as an array? I could deal with that.
0
Comment
Question by:signless
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
rexmor earned 150 total points
ID: 8032085
_root.ctr = 0;
_root.minMarker = 1;
_root.maxMarker = 10;
movieclip.prototype.next = function(n) {
     if ((_root.ctr>minMarker) and (_root.ctr<_root.maxMarker)) {
          _root.ctr += n;
          this.marker = "marker"+_root.ctr;
          _root.gotoAndPlay(this.marker);
     }
};


//calling the function
//next
on (release) {
     next(1);
}
//back
on (release) {
     next(-1);
}


note: your label should be "marker1,marker2..."

hope this helps

rex
0
 

Author Comment

by:signless
ID: 8032183
Well... yes this will do it. I'd really like to use a more dynamic method (use any labels) but they are actually named with numbers currently anyway...
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question