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




Frame Label Question



if I've loaded a movie into a empty target movie clip such as:


Code:
_root.createEmtpyMovieClip( "someEmptyClip", 1);
loadMovie("some.swf", "someEmptyClip");


how do I refer to the loaded movie's frame labels?

would it be like:


Code:
if(someEmptyClip._currentframe == "frameLabel" ) { /* if condition */ }


cuz I tried that and it didn't work....how do I make this work?



FlashKit > Flash Help > Flash MX
Posted on: 02-14-2007, 12:24 AM


View Complete Forum Thread with Replies

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

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.

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

Flash Button To Take Movie Clip To The Next Frame Label Instead Of The Next Frame
I am trying to figure out how to create a button to take a movie clip to the next Frame Label instead of just to the next Frame. I have a slide show that I am working on with a fade effect from picture to picture. When I just use the nextFrame script it will literally take you from frame to frame on the fade in. Is there a script that will allow you to go to the next (or previous) Frame Label from where the movie was stopped?

Any help is greatly appreciated!

Can't Target A Frame Label Or Frame Number Within Movie Clip
Hi guys,

Can't for the life of me figure out why this is not working:

if (_currentframe==82) {
homefade_mc.gotoAndPlay("fadeup");
design_mc.gotoAndPlay("design_fade"); - this one is fine
}

- the first gotoAndPlay should be going to the homefade mc and then going to the "fadeup" frame label and play from that, but instead it does nothing. Any clues?

Chris

How To Using Frame Label From A Movie Clip To GotoAndStop To Stage Frame?
I have a 100-frame movie clip, a_mc, on the stage.
I want it automatically gotoAndStop at a certain frame, labeled as "about", on the stage (root level).
How should I do?
(AS3 version please...)

I know how to do this from a root to control a movie clip only.

IfFrameloaded() Depreciated How To Get Frame Number From Frame Label
ifFrameLoaded() has been depreciated in Flash 5, leaving me with using _framesLoaded which gives me no way to verify a frame label is loaded as far as I can tell.

I thought there was a way to get a frame number from a frame label but I can't find it. How would you determine if a frame label is loaded (not the whole movie, but the just up to the frame label).

The reason I have to do this is that I have large animations that are changing a lot during production and thus the frame numbers are changing. I need to determine if a frame label is loaded (not the entire movie).

Thanks for the help!

How To Obtain Frame Number From Frame Label?
Hi Guys

Does anyone know how I can find out what the frame number is of frame which has a label at runtime using actionscript?

I don't think I can use _currentFrame as I need to find out the frame number prior to actually moving the player head to that location.

for example:
say you want to goto a frame labelled "bananas"
How can I find out what the frame number is of the bananas frame?



Cheers!

[F8] GotoAndStop Does Not Go To Correct Frame, According To Frame Label
I'm having trouble getting gotoAndStop to go to the correct frame. I've labeled frame 5 as "FIRST", frame 10 as "SECOND", and frame 15 as "THIRD".

Then I put the following code on frame 1, which I labeled "HOME", if it matters.

//var myFrame:String = "FIRST";
var myFrame:String = "SECOND";
//var myFrame:String = "THIRD";

trace(myFrame);
this.gotoAndStop(myFrame);
trace(this._currentframe);
stop();Letting myFrame = "SECOND" sends the playhead to frame 9, but it should be 10. When myFrame = "THIRD", the playhead stays at frame 1, while it should go to 15. Only "FIRST" goes to its correct frame, 5. Note that if I change the frame that is labeled "SECOND" from frame 10 to frame 9, then the playhead goes to frame 8.

I thought that this would be a really simple thing to do, but I'm getting quirky results.

Everything is on the root level and there are no movieclips or scenes involved.

Any help would be greatly appreciated. Thanks, guys.

[F8] GotoAndStop Does Not Go To Correct Frame, According To Frame Label
I'm having trouble getting gotoAndStop to go to the correct frame. I've labeled frame 5 as "FIRST", frame 10 as "SECOND", and frame 15 as "THIRD".

Then I put the following code on frame 1, which I labeled "HOME", if it matters.

//var myFrame:String = "FIRST";
var myFrame:String = "SECOND";
//var myFrame:String = "THIRD";

trace(myFrame);
this.gotoAndStop(myFrame);
trace(this._currentframe);
stop();Letting myFrame = "SECOND" sends the playhead to frame 9, but it should be 10. When myFrame = "THIRD", the playhead stays at frame 1, while it should go to 15. Only "FIRST" goes to its correct frame, 5. Note that if I change the frame that is labeled "SECOND" from frame 10 to frame 9, then the playhead goes to frame 8.

I thought that this would be a really simple thing to do, but I'm getting quirky results.

Everything is on the root level and there are no movieclips or scenes involved.

Any help would be greatly appreciated. Thanks, guys.

Finding Frame Number Of Frame Label With AS
is it possible to find the frame number of frame label with AS


what I am trying to do is ...

if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.

any clues?

cheers actionscript heads!



Paul

How To Obtain Frame Number From Frame Label?
Hi Guys
Does anyone know how I can find out what the frame number is of frame which has a label at runtime using actionscript?

I don't think I can use _currentFrame as I need to find out the frame number prior to actually moving the player head to that location.

for example:
say you want to goto a frame labelled "bananas"
How can I find out what the frame number is of the bananas frame?

Cheers!

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?

Frame Label, Instead Of Frame Number
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 as the starting point of the random frame because frame number11 is easily changable.


For example, after I put a frame label "ABC",
I have tried the next scripts. However, they don't work.

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

Would you help me? please.


Thanks in Advance

Property For Seeing What Frame A Frame Label Is At
is there any property that can tell me what frame a frame label is set to. In other words, I have a movieclip that wants to 'wait until the frame head hits a certain frame in a different movieclip in the timeline. I know I can do a while(instance._currentframe != 10), but I want to generalize it and replace the frame number 10 with a variable that would be set by referencing the label to get the frame #.

TIA

Get Frame Number From A Frame Label?
I thought I saw a way to get a frame number value from a frame label but now I can't find it anywhere. Could be I'm thinking of Director Lingo.

Is there a way to get the frame number for a frame label?

Thanks!

Getting Frame Number From Frame Label
Is it possible to use ActionScript to find the frame number that a certain frame label is located on?

Frame Label Vs. Frame Number
if i have a button with the following action, page01 being the frame label, my button does nothing.

on (release) {
gotoAndPlay(page01);
}

if i have this action, 24 being the frame number for page01, it works.

on (release) {
gotoAndPlay(24);
}

i'd rather not use the frame numbers. do i have the syntax wrong for the labels?

thanks!

Frame Number From Frame Label
Is it possible to use a frame label in an mc to retrieve it's equivilent frame number in MX?

Link To Frame Label Instead Of Frame #?
How do I modify the following code to link to a label instead of a frame #?


Btn1.addEventListener(MouseEvent.CLICK, buttonClick1);
function buttonClick1(event:MouseEvent):void{
gotoAndStop(30);
};




Thanks!!!

[AS] Getting Frame-number From Frame-label
Hi,

Does anyone know a way to get a frame number out of the frame's label? Or maybe if it's possible to check the current frame against a frame label, like (_currentframe != "label")?

Cheerz

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 -

Frame Label
i was asked to add the "framelabel" in some actionscript for my movie. what is this referring to?

Can I Set Up A URL To Go To A Frame Label
I'm trying figure out if I can set up a URL to automatically go to a certain keyframe in a .swf from either the main timeline or even in a Movie Clip's timeline.

Something like this.....

http://www.yoursite.com/index.html?frameLabel

Is that possible

Frame Label
Anybody know if you can retrieve a frame label? So for example, if the play head goes to a frame labeled "myLabel", can I retrieve that frame label information somehow, similar to the way you can retrieve the instance name of a mc?

Frame Label Help
I'm developing a movie that uses frame labels for navigation. (add, del, chg)

I have three buttons that each correspond with a frame.

Right now, I'm setting the nav with this:

Code:
_root.frame = new Array('', 'add', 'del', 'chg');
buttonInit = function () {
for (x=1; x<=4; x++) {
_root["button"+x].lbl = _root.frame[x];
_root["button"+x].onRelease = hit
//other attributes go here
}
}
hit = function () {
// trace(this);
_root.activeLast = _root.active;
_root.active = this;
_root.gotoAndStop(this.lbl);
resetAllBut(active);
};
I'd like to get rid of the array at the top and set the first line of the buttonInit to something like this:

Code:
_root["button"+x].lbl = _root.getFrameLabel[x+1];
...but i cant find a function that will get the frame labels.
is it possible?

If With Frame Label
I'm trying to make this work, I guess its with the ([_root.getstatus-1]+"to"+[_root.getstatus])) that the thing is wrong... can anyone help me out? Never done anything like that before, and I just guessed my way, and it doesnt seem to work.


Code:
if (_root.animation._currentframe == ([_root.getstatus-1]+"to"+[_root.getstatus]))
{
trace (1564654654654654654687987987);
_root.animation.gotoandplay([_root.getstatus]+"end");
}

-Wako

----edit----

I forgot to say that _root.getstatus is a number between 2 and 5, and the MC animation has keyframes labeled 1to2 2to3, etc, and also 1end, 2end, 3end, etc.

Frame Label Help
Hi all,

I'm still quite new to this so bear with me, I currently building a all flash site using frame labels on the main time line to display content. I have movie clip with a set of buttons controling the main time line, jumping to frame etc. What keeps happening though, is when I press one of the buttons more then once it jumps to the next frame label and so forth. I'm using this piece of code for my buttons

on (release) {
_root.gotoAndPlay("framelabel");
}

All I wANT the buttons to do is jump to the framelabel stop,play the content and that's it. Only if pressed again will it play the content again..

First time building an all flash site, appreciate all the help

thank you

Get Frame Label
I´m using Flash Mx Professional 2004 and i want to get the label of the current frame. I´ve used this:

Code:
if (_root._currentframe!="Mylabel"){
gotoAndStop("64");
}

However, _currentframe only checks for the frame number and not for the frame label. I´ve searched the help file but I haven´t found any function that returns the actual frame label. Is there a way to do this?

Thanks

Get Frame Label
How to add and view the frame label dynamically.
check the Fla u will understand.

When I click "click to add" button that particular frame should be added in a txt file with a name and the frame label.
Then when I click "Click to View" those frames which I have added it should be displayed here as buttons so that when I click that it should go to the frame from where it is added.Here the user should also able to rename and delete.

From last 2 weeks changing the concepts which ever is possible for me, even I tried to cheat in flash itself but failed...

Can You Get Frame Label Somehow?
let's say i have a frame called "PFP28-3" or something. is there some script i can use to get that label and use it as a variable so my movie can know what frame it is on?

Can I Get Frame Label Over AS?
Can I get frame label over the AS?
Similar if I use :


Code:
trace ("Frame number= " + _currentframe);
Exist someth. like:


Code:
trace ("Frame label= " + ???AS_CODE_HERE???);

How Do I Get The Frame Label?
Hi,

How do I get the value of the currentFrame's label?
I tried using this.Label but it doesn't work...

any tips?
Thanks

HELP - Frame Label Etc
ok well, to keep things simple, i have a movie, and inside the movie i have a button and a movieclip

the movieclip has the instance of 'camera', and there are 2 frame labels in it.

basically i want it to recognise that the camera mc is at frame 30 (or the label 'opened'), and if it is, i want it to play frame 31 (or the label 'closecamera'.

i have the following code on my button at the moment (it doesnt work though..):

if (_root.camera.isAtLabel("opened")){
camera.gotoAndPlay("closecamera");
}

there are no syntax errors, it just doesnt work..

HELP

Next Frame Label...............
Hiyo,

Basically i need to find the script to place on my button so that when it is clicked, it will jump to the next nearest frame label.. Like a fast forward button. And also one that will jump back to the previous frame label..
Something like _nextframe and _prevframe but i'm using frame labels to section up the movie.

Thanks in advance, anyone?

Can I Get Frame Label Over AS?
Can I get frame label over the AS?
Similar if I use :


Code:
trace ("Frame number= " + _currentframe);
Exist someth. like:


Code:
trace ("Frame label= " + ???AS_CODE_HERE???);

Label Of A Frame
How can I dynamically set the label of a frame?

Thank you very much!!!

Detecting A Frame Through Its Label
I have include some code in a movieClip to check if the frame it is within matches a label. The code is similar to below:

if (_currentframe == "repeat")
{
do something;
}

However, I realized that _currentframe always returns the numeric frame value. Is there a simple way to check to see if you are in a frame with a certain label? Is there a function or property that I can not find? Is this possible without using a variable and checking that?

Variable Frame Label?
Hi,

Got a bit of a problem with an attempt to address frames with the following script:

I'v got a name for input in a fuction, and I want to make flash jump in a MC to a frame with the same name....

function test (argument) {
tellTarget ("_level0.movieClip") {
gotoAndStop ("[argument]");
}
}

Flash doesn't seem to understand [argument] for a frame label though.

any suggestions??
thanks

Frame And Label Jumping
I want to asign the following action to a button :
first go to the next frame and play ( this is no problem getting the code right) but then I want the movie to jump to a specifique framelabel on that time line.
Same problem for level loading : how do I let a movie in level x to play the next sequence and when this finish onload the movie and start the next movie on that same level?
I hope I explain this right?

Thanks

Jan

Assign Frame Label
Can Action Script change or create frame labels.

How Do I Target A Frame Label
ok, after my preloaded the movie my main movie goes to frame 40 and stops. On that frame I have a movie clip that plays. we will call this movie CLIP1

When clip one reaches its last frame I want the root timeline to jump to frame 60 and stop.

I tried labeling frame 60 or the root timeline jump1

Now I set up an action on the last frame of CLIP1 as follows

with (root.jump1) {
gotoAndStop("Scene 1", "jump1");
}

IT gives me an error object not found.
How do I target a frame label rather than a movie clip instance?

Jump To Next Frame Label
Is there a way to make a button so when clicked, the play head jumps to the next instance of a frame label. I need to do this generically without calling out the name of the next label. I have to do it about 240 times and don't want to program each button between label names.

Thanks.................Rob

Expression As A Frame Label
I'm putting together a book-like interface that has a movie clip containing a series of pages and chapters as individual frames. Each is labeled as Chapter.Frame - so 3.7 is the seventh page of the third chapter.

I want (from a parent MC) to be able to gotoAndStop on an individual frame/page/label using Chapter_Number and Page_Number variables I've set up. But I'm struggling with making the expression work

gotoAndStop (_root.Chapter_no+"."+_root.Page_no);

Suggestions?

Acess Frame Label?
I know I can type


Code:
_root.gotoAndPlay("myFrameLabel");
but how can I access the _currentframe's label name in action script code?

Current Frame Label
I'm using flash 5

I want to put the label of the current frame in a variable which i'm going to use in a later frame to take me back to the right frame.

I'm using

curr_frame = TCurrentLabel("");

what ever i put between the () (i've tried blank, /, ../, _level:0)

i get Variable _level0.curr_frame = undefined

The frame is definatly labeled.

The other thing is when using goto and a label name it only works if I put the scene name in too (the labeled frame is in a different scene) I thought that if you didn't specify a scene it should find the frame whatever scene its in?

Any ideas?

Thanks,
Tamsin

Referencing A Frame From A Label
is it possible thru actionscript to somehow find the framenumber of a specific frame?

i know you can do a _currentframe to whichever frame the timeline is currently playing, but can i do _SOMETHING_ like this?


Code:
_root.frame["thatFrame"]._framenumber


or is there no way of doing that?

thx in advance for your input

Check Frame Label?
Can you check to see if an MC is at a certain frame label? I know ways around it, but this would be nice.

I basically want to say "if frame label = somethging then do something.

Thanks

Display A Frame Label
Is there a way to get a dynamic text box to display the frame label?

HELP | How To Get Frame Number From Label
i have a flash document with some labels and i need to get the the frame numbers using actionscript
i need that to calculate total labels and divide them with the total frames


thanks!!!!!

izikon

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