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








LoadMovie() Frame Number?


what is the best way to load an external swf through a blank movie clip and call a specific frame here is what my AS looks like so far <on (release) {_root.blankmovieclip.loadMovie ("pictures.swf');} > i wrote it from memory so there may be some syntax errors but you get it, i just want to open frame 6 of pictures.swf with a button or fram 3 or 7...easy enough i bet




FlashKit > Flash Help > Flash General Help
Posted on: 06-20-2005, 04:04 PM


View Complete Forum Thread with Replies

Sponsored Links:

LoadMovie Frame Number?
Hi,

I have setup a movie to load another move into a holder when a button is clicked, that works fine, what i really need though is to have the button load the movie and go to a frame number/label in the loaded movie,

How can this be done?

Thanks.

View Replies !    View Related
Loadmovie At Specific Frame Number
Can you load a movie and tell it to play from specific frame number?

Right now, I have...
loadMovieNum ("loop.swf", 0);


Thank you in advance!

View Replies !    View Related
Using LoadMovie, How Can I Point To A Specific Frame Number?
I have a simple question. I want to load a specific frame from an external swf file, so that it doesn't start on the 1st frame by default. Any ideas of how to do this? I know about tell target, but it's not offered with Flash MX, and I assume with MX there is an easy solution to my problem. But it would be great to have some help!!!!!!!!!!!! Thx

View Replies !    View Related
Shared Object To Store A Unique Id Number Var And Frame Number Var
Hi, I am a complete novice to action script when it comes to objects. I know what I want to do is done with the shared object. Basically I want to create a tutorial that stores a cookie on the users’ machine with a unique id variable telling flash what frame the user was at last. When the user revisits it would prompt "continue where left off or start the tutorial over. I read the action script dictionary regarding the shared object, but being a designer I really need to visualize it before I can comprehend this.

Thanks,

Justin

View Replies !    View Related
Variable Number = Frame Number#$%@&*
I have a movie Clip called “percentage bar” and a variable text box called “percentage”.
Now I get a number from VB and this number is = to the value of ”percentage” (my variable txt box).
The Movie Clip has a 100 frames… here it comes I need to have whatever the variable number (“percentage”) is to determine which frame the movie clip (“percentage bar”) is standing on.

This has to be possible, don’t it?

View Replies !    View Related
Variable Number = Frame Number ?
Here's an easy one for anyone who knows actionscript...
I have a variable text box called "percentage" and a movieClip called "progressbar" (100 frames).
I want the number in my variable txt box "percentage" to tell "progressbar" to go to the corresponding frame number.
for instance if the number in the txt box is 15 the movieclip has to go to frame 15.

Thanks
- a Designer, forced to be a programmer.

View Replies !    View Related
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

View Replies !    View Related
How To Start Playing A Swf In Another Html Frame From A Particular Frame Number
I wonder how to get a swf located in anothetr html frame so that it starts playing from a particular frame number...
thanks to everyone who can help me... as I have to obtain this effect as soon as possible..

quinnity

View Replies !    View Related
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!

View Replies !    View Related
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!

View Replies !    View Related
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

View Replies !    View Related
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!

View Replies !    View Related
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

View Replies !    View Related
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!

View Replies !    View Related
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?

View Replies !    View Related
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!

View Replies !    View Related
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?

View Replies !    View Related
[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

View Replies !    View Related
Loadmovie Prob ... Number 2
Hey,

As i explained in "loadmovie prob" i use the command loadmovie.
What i need to be able to do is have "band"(example) reload everytime it's been modified.

in other words, when i modify one of my "sub-movies" i need to rename it from "band.swf" to something else, otherwise the persons browser just loads the previous version regardless of modification.
I'd need to rename it, but if i do that, and change "band.swf" to "band2.swf" then yes band2.swf would work, but the main movie would have the wrong link (band.swf)...

Ok, so now i change the MAIN movie's link to "band2.swf"... but wait that's 200KB.... so you download 200KB+ EVERYTIME i update the page?!? MAD!!....


So here's what i did :P...
Made 4/5 new MovieClips for "band.swf", "band2.swf", "band3.swf", "band4.swf", "band5.swf" to load into (each has it's own).
But dont have more than one "bandX.swf" (otherwise 2load at same time)

Although this works, it isn't v.clean, is there any way around this?? any new ideas?! (you might have to re-read just to make sure you know what my prob is lol)

visit www.thorium-uk.tk to see my website (with the prob ^)

Also visit http://pagead.googlesyndication.com/...eadid%3D457105 for my last post.


THANKS.

View Replies !    View Related
Loadmovie Based On Number Of Clicks
I think this should be fairly simple, but I can't crack it.

I want to load one of 3 movies based on whether this menu button is being clicked for the first, second or third time. I created a dynamic textfield to store the counter variable, but it increments fine until I add the if/thens.

on (release) {
countflag=countflag+1

if (countflag=1) {
loadMovie("page-flags1.swf", "mcinv");

} else if (countflag=2) {
loadMovie("page-flags2.swf", "mcinv");

} else if (countflag=3) {
loadMovie("page-flags3.swf", "mcinv");
countflag=0
}

}

Help?

PS: I'm a bit out of my depth here, so if in addition to the counter, there's a reason this won't work, please explain in small words with powerpoint and/or handpuppets.

View Replies !    View Related
Getting A Frame Number...
Ok, my question is, is there anyway to get the frame number in a MC thats looping and put it in a variable. As in if the MC stops, i want the position it stoped in to be put in a variable.

Not sure if this is possible...

View Replies !    View Related
Frame Number?
i am new to actionscripting and can not figure this out - This is the code I am using for a simple slideshow. The first of 7 slides shows up, but when i click the forward and/or back button the first slide just repeats itself. My .jpg's are named 0 through 6. thank you.

var slideInfoLV:LoadVars = new LoadVars();
slideInfoLV.load("vars/slide_info.txt");
var curFrameNum:Number = 0;
function loadFrame() {
_level0.myMCL.loadClip("think/think" + curFrameNum + ".jpg", this.framesMC);
}
loadFrame();

//-----------------------<next slide button>--------------------------\
this.nextSlideBut.onRelease = function() {
if (curFrameNum < Number(slideInfoLV.totalFrames) + 1) {
curFrameNum++;
} else {
curFrameNum = 0;
}
loadFrame();
}
//-----------------------</next slide button>--------------------------\

//-----------------------<prev slide button>--------------------------\
this.prevSlideBut.onRelease = function() {
if (curFrameNum == 0) {
curFrameNum > Number(slideInfoLV.totalFrames) - 1;
} else {
curFrameNum--;
}
loadFrame();
}
//-----------------------</prev slide button>--------------------------\

View Replies !    View Related
Frame Number
I am making an interactive course. I was hoping that someone might know how to write a function that can tell the person in a text box what page (frame) they are on.
such as:
"you are on page 5 out of 36"

Any suggestions would be great.

thanks

View Replies !    View Related
What Frame Number Is My MC Up To?
var curFrame = fl.getDocumentDOM().getTimeline().currentFrame;

I found this in the help file but am having trouble understanding how to use it.

I THINK its what I need.

I've put a timer MC on my stage. The movie is 12FPS. So the first 12 frames are 10, the 2nd 12 frames are 9.... down to the last 12 frames being 1.

So by finding out what frame I am in, I know how many seconds its been.

How do I find what frame I am in?

View Replies !    View Related
Out Put Frame Number
i can't seem to get the frame number to the out put window i tryed
trace(keyframe); and trace(frame); but it thinks i am trying to out put a variable.

View Replies !    View Related
Frame Number
Hi,

I am a newbe so far as actionscript is concerned.

I am trying to make a basic file, where I wish that on(release) of a button,
if the current location is 'x' then it should gotoandplay (10)
else if current location is 'y' the it should gotoandplay(20) etc.

Can you guide how do I do this?

Thanks
Jabardast

View Replies !    View Related
Frame Number As Var?
Is there a way to get Flash to know what frame it's on and pass that as a variable? I can't use counters because I'm using a random frame function.

It'd make a lot of work easier!

View Replies !    View Related
Number Of Clips In A Frame?
Please help,

Does anybody know a way to test for the number of movie clips running in a frame.

Thanx

View Replies !    View Related
Getting Frame Number In Another Level
Hi guys hoping you can help me out with something....

I have a main movie on level 0 that when you click on a button loads another movie in level1, what I'm trying to do is check to make sure that the main movie is on frame 30 before the movie on level 1 loads like this:

if (getProperty (_level0, _framesloaded )==30) {
tellTarget ("_level1") {
gotoAndPlay (3);
}
} else {
tellTarget ("_level1") {
gotoAndPlay (2);
}
}

I keep getting a script error ???
I'm using flash 5 btw

Thanks
Dave

View Replies !    View Related
Frame Number As Variable...
hi everybody,

Can the frame number be used in the movie as a variable?
(but not using the name of the frame because i need to type a lot of frame name in the movie.)

Any help is welcomed.Thank you~

View Replies !    View Related
Random Frame Number
Is it possible to make an MC's timeline jump around at random. See Im tryin to make a simple shooting game, And I want the "target" to show up in specific areas at random. So I thought I could have the "target" MC set in these areas in a series of frames and have the timeline jump around at random.

Thanx

View Replies !    View Related
Determining Frame Number Of MC From A Different MC?
Graphic designer will little scripting background seeks help!

here is the product:

http://maskar.com/testing/sourceflash/

Upper frame is Flash navigation, lower frame is HTML.

built in F5, using a bunch of movie clips & tell targets. Once scene, only one frame in main scene..plenty of layers with separate symbols)

I need a reliable way to determine on any button click, if any of the three *navigation movies* are in the *up* state. If they are, i want them to go to the frame where they turn down.

I currently have a button behind the movie clip that tells the movie to scroll down when you roll off of it. the problem with that is if you move off the movie too fast, it does not work.

I know what i want the code to do, i do not know how to actually code it.

i imagine that it would look something like this:

---

on release, if 'about' is on frame label 'up' go to and play frame label 'down'.

(repeated for each of the movies)

---

I don;t know if i should place this script on the main scene as a function, and call it from each butrton (makes sense to me to do that, but how would i code it)

If i need to make my .FLA available, please let me know.

TIA,

Jac


[Edited by darth maulata on 03-14-2002 at 12:58 PM]

View Replies !    View Related
Frame Number Display
In MX... how could you make it so that as the user moves frame by frame by clicking on an arrow the frame number is displayed as a page number would be displayed in a book?
thansk!
Steve

View Replies !    View Related
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

View Replies !    View Related
Please Help, How Do I Get The Frame Number A MC Is On To Set As A Variable?
I have some buttons that I want to trigger a remote rollover effect on. So far it works, but I want to do more with it to make it look good. Let me explain what i am trying to do...

I have a movie clip (the instance is called "vault", as in a vault door opening or closing) and it contains the following:

frame 1: stop action, graphics for vault doors are closed
frame 2-15: no action, vault doors remain closed
frame 16: no action, vault doors begin to open
frame 26: stop action, vault doors finish opening.
frame 27: no action, vault doors start to close.
frame 33: stop action, vault doors finish closing.

this is the code I am using on a button, it also loads a photo under the vault doors, but that works fine so it is not important.


Code:
on(rollOver){
vault.gotoAndPlay(2);
_root.photos.loadMovie("goutton.jpg");
}
on(rollOut){
vault.gotoAndPlay(27);
_root.photos.unloadMovie("goutton.jpg");
}


It works, but the reason i have that delay in frame 2-15 is because i want the user to be able to settle on a button to choose before they begin to open. The problem is, if you mouse over and out fast, it slams shut without opening.

So what I want to do is make some kind of code like: IF vault is on frame 16-26 (opening or opened), then play the close animation. Obviously i don't need it to play the close animation if it never got to the open state, it just looks bad.

So, if someone can tell me if this is possible, and how to do it, that would be great! I am guessing i need to make some kind of variable and set the current movie clip frame number (upon rollOut) to that variable, and then i can say if it is between a certain frame number, do the close action (and if not, nothing). but i don't know if that is possible. if there's another way to do it let me know too. thanks.

View Replies !    View Related
Can You Use The Frame Number As A Variable
if a mc is stoped somewhere, is there anyway of retrieving it's frame number and using it as a variable?

View Replies !    View Related
Is There A Limit To The Frame Number?
well, is there? I mean is it possiblethat flash will not show frames from frame 50,005 or somethinf like that?
thanx people.

View Replies !    View Related
Reading Frame Number?
I need the command to read the frame number of a movie clip.
For instance lets say I have a m.c. playing and I want the frame number witch the m.c. have reached.
It's very simple and I once found out how to do it but I forgot.
Please help me,
thank you!
- Hommer.

View Replies !    View Related
Asp Or Html To A Frame Number....
Hey Guys!
I have a list in a html page and I need to link each person in that list to a certain frame in my flash movie. I don't even know if its posible.
Thanks for your help.

Lou

View Replies !    View Related
Show Frame Number
How can I output the frame number?

View Replies !    View Related
Can You Repeat From A Frame Number?
say i have 100 frames.

and once the 100 frames have run i want it to loop. but no loop from the start, but loop from frame 20, so it would be just playing frames 20-100

View Replies !    View Related
Not Reset The Frame Number ?
Help

My movie has two scenes.
In the last one, when I reference a frame number, the playhed moves
to the frame number as it's would be continued from de first scene.
I mean, the number of the last frame of the first scene is 30. So, in the second scene for to do the things go well, I must reference the frames as if the first frame would be 31 !!!!!!!.
I don't have idea what's happening.

do you?.

View Replies !    View Related
Frame Number Definitions.
I'm trying to check whether a certain instance on the stage is at a particular frame number but the following code doesn't work.

if (_root.Box.box.swinging.cage==1){

I've done programming before but it's a little different for actionscript.

Thanks.

View Replies !    View Related
Going To A Random Frame Number?
I am trying to set up a small banner that has 4 different frames. When the flash file loads it will go to one of those frames at random and stop.

In my first frame I have:
c=random(5);

In my second frame I have

if(2>c<5){gotoAndPlay(c);}else{gotoAndPlay(1);}

Then the 4 different frames follow with a stop on each

I don't understand but the movie is only going to frame 1,2 or 3.

View Replies !    View Related
Not-So-Random Frame Number
Can anyone help me with this?

I want my movie to go to a random frame number, however, the frame numbers have to be in increments of 10 starting at 15. Basically, I want a random number generated but it can only be:

15, 25, 35, 45 etc. and no higher than 145.

So far I have:


Code:
gotoAndPlay(Math.floor(Math.random()*145)+1);


Which I figure will give me a number between 1 and 145, but I'm stuck on how to reduce this to 15, 25, etc. I guess this might be more of a math question...

Any thoughts?

View Replies !    View Related
Targeting A Certain Frame Number?
Hello Everyone,

Let's say I'm loading an external movie (swf_b) into my main movie (swf_a). I want to load frame 10 of swf_b. How would I script this???

Thank you,

Liz

View Replies !    View Related
Variable Into Frame Number?
Hello everyone - I have a quick question..

What I am doing is building an e-card that the user can customize and mail to a friend. Here is my problem..

I have the user selecting different backgrounds.. and my actionscript is such that if the user clicks "background 1" then var BackGround gets set to "1" etc..

on the other end of the thing, when the ecard is being reconstructed from my text file it is reading variable "BackGround" - Here is my question - I dont want to have to do a bunch of "if" statements (if BackGround = whatever, gotoAndPlay (whatever)

I would like flash to just interpret "BackGround" as a number and go to the appropriate frame. What is the correct way to do this? Am I way off? I thank you in advance for any help!

View Replies !    View Related
Displaying Frame Number
I just want to show the current frame number on the stage as the movie plays.

So under Properties I set the text to Dynamic Text, (color is black), dragged a text box on the stage, leaving an empty rectangle. Named the text field "mytext".

Then on the first frame of the movie I put this code:

onEnterFrame = function () {
mytext = _root._currentframe;
};

Not doing anything. What did I do wrong?

thanks,
Dennis

View Replies !    View Related
Reading Frame Number
I got a small problem reading frame numbers. To test it I entered following code into the first frame of a movieclip:

Code:
trace(this.frame);
trace(root.McHolder.frame);
Now the first line gives the feedback: 'undefined'
The second line gives an error message: '1119: Access of possibly undefined property McHolder through a reference with static type flash.display:DisplayObject.'

What I actually expected, was to get the currentframe of 'this' and 'root.McHolder' though.

So, unknowing and noobish as I am I thought I'd try this:

Code:
trace(this.currentFrame);
trace(root.McHolder.currentFrame);
Now I actually didn't get any feedback or error messages at all.

Aparantly I'm not yet getting this. Would anyone be so kind to show me the error I'm making?

View Replies !    View Related
Getting Current Frame Number?
Is there a way to check what frame a movie clip is on with out tracking it from the start via var's?

View Replies !    View Related
Get Current Frame Number
Well, I'm very new to ActionScript. I began yesterday by making a simple ball bouncing animation. I made the ball bounce around the walls and created two buttons with scripts (one is start, other is stop). It compiles and runs fine. What I want to do is get the current frame number when the animation stops sot that I can restart it from that point rather than the beginning. Here's the code so far:


Code:
import flash.events.MouseEvent;
import flash.display.MovieClip;

this.stop();

this.startB.addEventListener(MouseEvent.CLICK,beginMain);

function beginMain(event:MouseEvent):void {
gotoAndPlay(1);
}

this.stopB.addEventListener(MouseEvent.CLICK,stopMain);

function stopMain(event:MouseEvent):void {
this.stop();
}
(Dunno if I used the correct tags for code...)

Does anyone know of a function that returns the current frame number?

Thanks to everyone for helping.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved