Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Label To Label Navigation?



I’m creating a presentation with a control bar. This control bar allows the user to go forward 1 section, back 1 section or all the way back to the beginning. I have the sections defined on the timeline by labels. Each section may have a varying length.

Rather than using nextFrame and prevFrame to go from frame to frame, I would like the control bar buttons to allow the user to move back to the previous labeled frame or forward to the next labeled frame, instead of just frame to frame.

Can someone please detail how to do this? I thought of setting up an array of label names, but I’m not sure that is the most efficient way or exactly how to code it. Is it better to set this up as slides in Flash instead?


Loren Elks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-11-2006, 01:16 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Link To Label In Timeline AND Label In Movie Clip
help i'm confused...

ive got a big movie clip on the stage
[its a map which might help u imagine it...]

i have a navigation
which links to various points [labels in the timeline] of the movie clip
as it moves around the stage...

can i also link to various labels within the movie clip at the same time
from the same button

if this doesnt make sense
please ask me to explain it differently
rather than just ignore me

thanku

Creating Slideshow, Goto Next Label/prev Label
Hi,

I have been trying create a slideshow using 2 buttons (1 next, 1 previous) I understand you can use goto next frame/scenes in the actions panel, but I would like the buttons to goto next and prev labels in my slide show. I would use the goto next frame action but each slide is on every tenth frame.

Could any one help?

Thanks

Label Property Control: Cannot Change Label Props
Hi,

I have a simple movie with a number of pre-positioned labels (not to be confused with timeline labels or text fields). I'm trying to change their size, font type, and other properties with no success.

Are labels treated/manipulated in the same manor as text fields?

I've exhausted 4 AS books and can't see any differences.

Thanks,

j

Check If Label Loaded When The Label Is An Expression?
Hi all!

I am using an array where I store all the labels I use in my movie, and now I would like to be able to check if a label has loaded and if not start a loader instead.

If I use code like this:

ifFrameLoaded (labelList[label+1])

it says that the frame (label) is loaded even though it isn't, but if I write:

ifFrameLoaded ("mylabel")

then everything works fine.
Here's my question: Is there a way to check if label is loaded if that label-name is stored as an expression?

I'm using flash 5 on win2k.

/Stefan

Label Navigation As
How could this code be cleaner?


var i = 1;
function skipForward() {
if (i<=4) {
i += 1;
_root.gotoAndStop("s"+i);
} else {
(i=5);
_root.gotoAndStop("s1");
}
}
function skipBack() {
if (i>=2) {
i -= 1;
_root.gotoAndStop("s"+i);
} else if (i=1) {
i += 4;
_root.gotoAndStop("s"+i);
}
}

Label Navigation
I’m creating a presentation with a control bar. This control bar allows the user to go forward 1 section, back 1 section or all the way back to the beginning. I have the sections defined on the timeline by labels. Each section may have a varying length.

Rather than using nextFrame and prevFrame to go from frame to frame, I would like the control bar buttons to allow the user to move back to the previous labeled frame or forward to the next labeled frame, instead of just frame to frame.

Can someone please detail how to do this? I thought of setting up an array of label names, but I’m not sure that is the most efficient way or exactly how to code it. Is it better to set this up as slides in Flash instead?


Loren Elks

Label Navigation
Is there a way to navigate to labels using some sort of "go to next label" action instead of actually going to a named label.

For example, if I have a label at frame 5, 10, 15 and 20, and I want to have a next and a back button that will skip to the next label or back to the previous label. The functionality would be just like "next frame" and "previous frame" but using labels instead of frames.

Hope that makes sense.

Thanks for any help.

Frame Label Navigation
Can someone show me the cleanest code for navigating through frame labels.

An example would be naming the labels p1, p2 , p3 etc and then being able to go foward and backward through them using a button or keyboard shortcut.

Sorry for my stupidity

Frame Label Navigation...
how do i stop animation at the end of a labeled frame, and leave available buttons active/executable?

i have my labeled frames in their own layer......if that helps...

and these lines of code dont seem to be working on my navigation buttons
-----------------
on (release) {

gotoAndPlay(expand);

}
------------------

Frame Label Navigation
Hello all,

Long time reader, first time poster. I really hope somebody can help me out of the bind I find myself in.

Basically, my problem is this:

I want to play 2 separate labels in a movie clip in any order when clicking a button that lives inside that movie clip.

Here's what I have on the button:

on (release) {
gotoAndPlay("location_rev");
gotoAndPlay("residences");
}

Currently, the playhead is going to "residences," entirely skipping "location_rev." I've thought of an if statement to ask Flash to play "residences" when arriving at the end of "location_rev," but I'm not entirely sure how to go about that.

If anyone out there can help me I'd really appreciate it. Seriously.

Loaded Swf Navigation To Label?
I have a main file that contains a button that loads an external panel.swf into a movieclip.

I would like the externally loaded panel.swf to navigate to a hide label when the button is clicked again. I have been unsuccesful in my attempts to accomplish this.

Any help would be appreciated.

Frame Label Navigation Problem
Hi I hope some one can help me this is driving me crazy.

I'm trying to create a simple frame label based navigation. If you see the attached file it's not very complex but whenever I click the red button I keep getting

ArgumentError: Error #2109: Frame label instance3 not found in scene Scene 1.
at flash.display::MovieClip/gotoAndPlay()
at site01_fla::MainTimeline/site01_fla::frame21()

I had it working fine but this started happening when I made the red button a MovieClip containing its own frame labels for the up, down, over states.

can anybody help please

thank you

Jumping To Frame Label Before Playing Desired Frame Label.
Hi, I'm new to flash as of a couple months ago. I made a project and I have a frame label that is an outro for the frame label(s) before it. I want this outro to play when the user clicks a button on my menu. Right now, when the button is pressed, it jumps directly to that frame label. Is there a way I can make a specific outro (that will change depending on the current frame label) to play before the frame label that the button calls on plays? This is probably confusing.

this is the actionscript i have so far, which is simply calling on the right frame label:
}
this.btn_home.onRelease = function(){
gotoAndPlay("home");
}

what i want to do is tell it to figure out which label its currently on, then play the outro label, then go to "home" and play that. is this possible? thanks.

Advancing From Frame Label To Frame Label Using Time Variables
I need to understand how i can advance from a frame labeled "menu" to another frame labeled "submenu", using seconds.

For example, "menu" is on frame# 1 and "submenu" is on frame# 20. I want a 15 second interval between each frame label without making it really big in frames.

I want to make my demo to be simple to edit if I have to give people a longer time to view each slide.

Is It Possible To See Whether Or Not A Frame Has A Label And What That Label Is?
I'm trying to implement previous/next navigation, but using labels and not frame numbers. I want the button to activate an action that says simply "go to the next frame that has a label" or even "go to the next frame in which variable "X" changes.

Is there a way to do this?

Button To Go To Next Label Instead Of A Specified Label
Hello,

I have a button in a movieclip that I want to control the main time line.

I know the script that will :

on (release) {

_root.gotoAndStop("yourLabel");

}


BUT...
Instead of specifying "yourLabel" is there a way to make the button just go to the next label?? (and/or previous label)??

If I knew this it would save me from editting the movieclip's button form each label and would mean the movieclip could run throughout the whole timeline.

Sorry if I havent explained myself clearly. But if anyone can help I'd be a happy man.

Thanks you kindly...

Previous Label/next Label
I am looking for actionscript that allows you to jump to the previous label, or the next label, similar to "go previous" or "go next" in Director Lingo. Surely there is such a thing?

Thanks.

GotoAndPlay A Frame Label Where The Frame Label Is A Variable
gotoAndPlay a frame label where the frame label is a variable


I found a cool dynamic menu that works off of arrays and have been able to modify/customize the array. Once you click on the button it sets a variable name the variable is “_root.select”

I would like to the root time line to gotoAndPlay a frame label that I have that would be the variable name


Lets say in my array I have the following
Jim
Dave
Sally
Karen

And the user selects Dave the variable “_root.select” would be Dave
I would then like the root timeline to gotoAndPlay the frame label Dave
This would fall under the Function below

nc.onRelease = function() {
// Function to get submenu actions needs to go here
var my_str:String = new String(this);
_root.select = my_str.slice(18);
_root.gotoAndPlay (what goes here)

Any Help would be appreciated

Mark

Label
How can you get the label of the current frame instead of its number (got with "_currentframe" property) ?

Label Name
gotoAndStop (random(5)+11);


The above actionscript means to go to frame11,12,13,14,15
randomly and stop.

I want to use frame label instead of the frame number 11.

For example, after I put a frame label "ABC",
I have tried the next action. However, it doesn't work.

gotoAndStop (random(5)+"ABC");


Can I do this?
Any suggestion will be appreciated.

Thanks in Advance

Label In MC
Hi,

How can I play an label in an MC when I'm not in that MC.

I have this script were playtime is the label:


onClipEvent (enterFrame){
if (this.hitTest (_root.gasjeone)){
gotoAndPlay ("playtime");
}
}

Label? (or Anyone Else That Can Help)
Label- On your site (id) you have your navigation. (Near bottom,...squares...)What I would like to know is how you got that effect. (Actually both effects)

ANYBODY ELSE TRYING TO HELP HERE IS LINK: http://id.vonelab.com/ enter site, nav is near bottom (small squares)

1. Where you rollover the button/link and that pop-up appears (home, portfolio..etc) and it follows your mouse pointers' tip while you are over the hit state of the button. How did you do this? I have tried making an MC in the over state of a button..with the onLoad action to start drag and lock to mouse coords...no luck. I even tried taking that same MC converting that to a button and then putting "THAT" into the overstate of the button with on rollover actions..still nothing! Can you shed a little light on this. I have had opinions on how to do this for days. None have helped.


2.When you rollover a button.. a square "outline" slides along an "X" path and stops over whatever button the mouse is on. Is this basically done with making the square "outline" an MC..and then the buttons have code on them moving the MC to a certain "X" location?

I havent tried this one yet...I wanted to ask before I waste any more time..like I did on number 1. Any help/steps you give woul be great! Thanks

-whispers-

Next Label
I was wondering if there was a command like nextlabel


I have to make this presentation ...

Ppt style

but they want it flashy ...


Next label maybe a trick ?

Label
how can i edit my radio button default font value?
i m using macromedia flash mx 2004

Label
how can i edit my radio button default font value?
i m using macromedia flash mx 2004

Label
Is there anyway to find a label dynamicaly.
Like _currentframe will return a number.
Is there a method that will return the label??

Label
How do I change a label componets font color?

Label.URL?
Hi, I have a dynamic text field that I want to dynamically change the text and url, however the text part is easy, but for the life of me I can't figure out how to change the url. I figured MyLabel.url would do the trick but that comes out as an undefined property.

So what is the proper way to change the url? I tried googling and looking at other forums but I can't seem to find it.

Go To Next Label?
im making an animation that involves a constructon sequence. It includes play, pause, stop, step forward, step backward and and end button. My problem is the step forward buttons, which skips the animation to a certain part of the animation. Originally i did this using:

forward_btn.addEventListener(MouseEvent.CLICK, cClick);

function cClick(event:MouseEvent):void {
gotoAndStop(currentFrame + 15);

but it would be more beneficial to use labels instead of frame for navigation.

ive tried a couple thing out but ive had no luck, what would i use to skip certain parts of my animation to he next frame label with one button?

Label
Hi All

I am new to Fles and Action Script.
Can any body give some idea how to display the labels at certain point on line graph . Please give examples on it using Action Script.


Thanks in adv.

Is At Label
I want to do something (an action) when a movie is at a label.

I tried senocular's prototype but doesn't work after flash 6
http://www.senocular.com/flash/actio...p/isAtLabel.as

did I miss something?

help would appreciated

::LABEL:: Is There Any Way..
..is there any way you can detect/retrieve the name of the label you are currently in? (i dont wanna use frames for certain reasons)

Go To Next Label?
I know there's go to next frame and go to 'label' scripts but is there actionscript for 'go to next/previous label'?

Also, I have a question about movie clip order (z-indexing)...but thats on a seperate topic (changing order of movieclips), if anyone can help there too.

ta

Define Label In AS
Hi,
i try to define a lable in ActionScript. Is this possible? Or can i get a lable with AS like "foo = lable at framenumber"?

thx

necro

Variable To Label
Hi,
I have 6 labels.
The name of the Labels are: 1,2,3,4,5,6.
I have a Variable named num and it's a random variable from 1 to 6.
I don't know how can i point this varaible to it's own label.

Use Variables To Go To A Label
i wanna use some variables of the movie in a "goto"-statement. these statements should refer to labels with the variables' names. This doesn't work because it's getting entangled in the "speechmarks". Also with the Eval-thing it doesn't work. I worked around it so it functions but the direct method would be so much more elegant. anyone with the same experience?

greets,

How Can I Get The Current Label?
Hello!

Is there a way to find out on witch label the playhead
currently stands when the application is running?

It would be a great help!
/Charli

Jump To Label
I have a game that when 7 objects found, gameover == true, then game jumps to a scene with frame label "Game Over"

on MouseDown
if (gameover == true) {
_root.gotoAndStop("Game Over");
}
-----------------------------------------------------------
if I put the label in the same scene as game it won't go to the labelled frame, I have tried
if (gameover == true)
then gotoandStop frame 10 but it won't have it.

it works if label is on a new Scene though???

Regards
Dogs Lipstick

Variables Used As Label Id's
tellTarget ("_root.subhead.header_bw.header_change") {
gotoAndStop ("_root.variables.subhead");
}

Dynamic Label
I've inherited a movie dynamically updates whenever a text file changes. The only problem is the movie constantly loops, creating the possibility of a DOS on my webserver and adding 10's of thousands of entries to my log file.

The code follows. Appreciate any input.

Thanks

Kirk
// ============================================
// PURPOSE
// The purpose of this script is to display the current
// FPCON status in the topbar navigation. When the
// status changes, the playhead will stop on the timeline
// that represents the current status and the
// navigation bar will cause a "light" to flash yellow if
// status is Exercise, red if status is Real World, and
// a solid green light if status is normal.
// ============================================
// VARIABLES and DEFINITIONS
// 1. fpcon_status.txt: contains the text words for the
// current status. Alpha, Bravo, Charlie, Delta. If the
// status is Exercise, then two spaces follow the
// status. If it's Real World, then it is spelled out as
// ALPHA REAL WORLD, etc.
// .
// 2. txtStatus is a text variable located in the
// movie clip called "statusDisplay"
// .
// 3. TellTarget= the Movie Clip object is the target.
// the script is telling the target to go the frame
// labeled "normal" "alpha" etc, depending on the
// status of fpcon_status.txt
// .
// 4. RW=Real World
// .
// 5. EX= Exercise
// ==============================================
// BEGIN SCRIPT
// ==============================================
// load the text file that sets the fpcon status
// ---------------------------------------------------------------------------------------------
onClipEvent (load) {
loadVariables ("fpcon_status.txt", "");
}
onClipEvent (enterFrame) {
loadVariables ("fpcon_status.txt", "");
}
// ---------------------------------------------------------------------------------------------
// direct the playhead to the correct frame label
// ---------------------------------------------------------------------------------------------
// NORMAL
// ---------------------------------------------------------------------------------------------
onClipEvent (data) {
if (txtStatus.substr(35, 6) == "NORMAL") {
tellTarget (_root) {
gotoAndStop ("STATUS", "normal");
}
}
// ---------------------------------------------------------------------------------------------
// ALPHA EXERCISE
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 7) == "ALPHA ") {
tellTarget (_root) {
gotoAndStop ("alphaEX");
}
}
// ---------------------------------------------------------------------------------------------
// ALPHA REAL WORLD
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 16) == "ALPHA REAL WORLD") {
tellTarget (_root) {
gotoAndStop ("alphaRW");
}
}
// ---------------------------------------------------------------------------------------------
// BRAVO EXERCISE
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 7) == "BRAVO ") {
tellTarget (_root) {
gotoAndStop ("bravoEX");
}
}
// ---------------------------------------------------------------------------------------------
// BRAVO REAL WORLD
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 16) == "BRAVO REAL WORLD") {
tellTarget (_root) {
gotoAndStop ("bravoRW");
}
}
// ---------------------------------------------------------------------------------------------
// CHARLIE EXERCISE
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 9) == "CHARLIE ") {
tellTarget (_root) {
gotoAndStop ("charlieEX");
}
}
// ---------------------------------------------------------------------------------------------
// CHARLIE REAL WORLD
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 18) == "CHARLIE REAL WORLD") {
tellTarget (_root) {
gotoAndStop ("charlieRW");
}
}
// ---------------------------------------------------------------------------------------------
// DELTA EXERCISE
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 7) == "DELTA ") {
tellTarget (_root) {
gotoAndStop ("deltaEX");
}
}
// ---------------------------------------------------------------------------------------------
// DELTA REAL WORLD
// ---------------------------------------------------------------------------------------------
if (txtStatus.substr(35, 16) == "DELTA REAL WORLD") {
tellTarget (_root) {
gotoAndStop ("deltaRW");
}
}
}

Swf Talking To Another Swf Label
Hello,

Here my problem: Since my movie is a little bit to large (543kb) I have decide to break the movie into 5 movies.

I want to be able to talk to other movies but inside one of my movie there are labels. How can I speak to the label x of my movie x when I am in the movie y.

Hope you will understand my problem.

Don't Know How To Label Target
Ok here's the deal.
I have a movie clip (clip A) with several labeled frames. I have another movie clip (clip B) within Clip A. In clip B there are several buttons that are supposed to link to those labels.

on (release) {
gotoAndPlay (??????);
}


I tried "_parent.blue"

(Blue is the name of one of the labels.)

So what do i do???

Jake

Loadmovie And Go To The Label
I use:
on (release) {
loadMovieNum ("cv.swf", _level0.gotoAndPlay("Formacion"));
}
and then it loads the cv.swf but isn´t going to the Formacion label
Why?

Label Problems
Hi,

I've got a button on the screen. When clicked, it plays a movie clip. The movie clip has an exit button on it, which when pressed, is supposed to send the playhead back to frame 1 (label: "start"). Instead, the playhead goes back to frame 3 (label: "osiris")...Help???

Duplicate Label
I'm getting a warning that I have duplicate labels. This would be obvious since I copied a scene multiple times. Is have the same label in a different scene a problem? Everything seems to be working.

If it is a problem, I have another question. Do actions attach to a graphic so that every instance of the graphic will have the same action? If so, is it possible to have different actions on every instance of a graphic?

Robert

Goto() With Var For Label Name
I haven't done this before. Assumed it would work but it doesn't. I want it to gotoAndPlay("dealer_up").

stuff = "dealer";
target_frame = stuff + "_up";
gotoAndPlay (target_frame)

I tried putting eval(target_frame) too but no luck. So how do I do it?

Thanks!

Currentframe LABEL?
is there n e way to get in a variable, currentframes LABEL?

How To Label Frames?
Can anyone tell me how to label frmes on the timeline. i want to use gotoandplay("framelabel") but i just can't remember anymore how to give the names to the certain frames... goin' crazy!!

Frame Label
how does one go about making a frame label?
I'm using flash 5.
and I woke up this morning thinking I should learn about frame labels.


thanks -

Copyright © 2005-08 www.BigResource.com, All rights reserved