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




_root.gotoAndStop (a Scene AND A Frame?) HELP



Hi
I know this must just be a syntax thing but i just can't get it.

I have my main movie loaded into level0 it has 8 scenes.
I have a movie.swf which gets loaded into a blank MC which is in scene 2 in the movie on level0.
There is a button inside the loaded movie.swf which wants to take the user to another scene and frame of the movie in level0.

I think that the AS on the button should be:

_root.gotoAndStop ("scene2", 10)

But it doesnt work. If i take out the "scene2" part it will take me to the frame number specified, but only in the first scene.

HELP!!



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-27-2001, 10:00 PM


View Complete Forum Thread with Replies

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

_root.gotoAndStop(frame);
i store in the database the frame on which a user ended
i retrive it from the database and store it in a variable "frame" when a user clicks "start" button
but when i pass the variable to _root.gotoAndStop(frame);
it doesn't work root doesn't go to that frame ?


on (press){


_root.pauseEnterFrame=true;
var post_get_frame:LoadVars = new LoadVars();
var post_id:LoadVars = new LoadVars();
post_id.ID = id;
post_id.sendAndLoad("http://e-jobs.pl/e-deutsch/getStartF...et_frame,"POST");
post_get_frame.onLoad = function(success:Boolean) {
if (success) {

frame = post_get_frame.start_frame;
trace(frame);
}
else {
frame = 2;
}
};
_root.gotoAndStop(frame);
}

GotoAndStop(Scene, Frame);
Hi I am trying t do this here,
I have 2 scenes, you start out in this first one, I want a button to goto the first frame in the second scene, ive tried about everything and nothing works, please help.

on (release) {
gotoAndStop("Main", "Intro");
}

Main is the scene intro is the frame, please help.

GotoAndStop To Frame On Another Scene
Hello,

I am trying to put action script on a button instance
so that when the button is released
the user goes to the third frame in another scene
but it's not working -
nothing happens when the button is pushed
in the .swf file.

This is the code I have

code: on (release) {
gotoAndStop("Scenephoto, 3");

}

What am I doing wrong?
Is there a scene naming convention
I don't know about?
Does the code only affect one frame of the button instance?

Please help!

Thanks!

GotoAndStop(scene, Frame) In A Mc
how to use gotoAndStop(scene, frame) in a mc?
there's a button in a mc, when I click it, it will change the scene, like this:
on(release){
gotoAndStop("main_scene", 1)
}

but it doesn't work!

GotoAndStop([Scene], Frame) Problems
Hello,

I have the following code in my flash program:

gotoAndStop("mainScene", 1);

When it appears within an on(release) function, it works correctly and transfers to the correct scene.

However, when it appears within a if statement it doesn't work.

Any ideas why this is?

Regards
Rob

_root.mc.gotoandstop ("frame Label") Not Working
I have a button inside a movie clip, that is inside another movie clip. Not that it should really matter!

Anyway, I have a seperate mc on the main time line that I need to control from the said button. This code:

on (release) {
_root.mc.gotoAndstop("label");
}

doesn't work!

I've tried checking everything: frame labels, instance names, spelling, layer order, EVERYTHING!!

I have no idea why it's not responding. It should be relativiley simple, right? Can anyone help?!


telekin:

_root.gotoandplay("Scene", Frame); ?
I have a button which is within a movie clip which is within a movie clip. The button has _root.gotoandplay("Scene", Frame);, in the following syntax.


ActionScript Code:
on (release) {
    _root.gotoAndPlay(AdvancedButtons,1)
}


I know, having separate scenes is a bad thing. However, I'm going to have so many different "Tutorials", that I need to separate them so. Can someone tell me what the best way to skip to another scene in this fashion is?

The design is lousy, and it is basically an exercise on Advanced buttons. All the different buttons will ultimately be different. The code you need to get in is A346. It is not case-sensitive.
The entire animation is here:

http://www.mediahug.com/home/index.p...d=22&Itemid=46

_root.gotoAndStop(2);
First frame in the main timeline
code:
stop();

in this frame I have a movie clip
at the end of the movie clip (last frame I have :
code:
stop();
_root.gotoAndStop(2);


All i want it to do is goto the next frame on the maintimeline where I have another movieclip.

All that happens though is it stays on that first frame and loops the movie clip... even though there is a stop action in there?

what's going on guys...

[F8] GotoAndStop In _root.hitTest?
Is this possible?
when one object hits into the other it wont goto the other frame, here's the code im using!


PHP Code:




if (_root.exit.hitTest(_x, _y, true)) {
        gotoAndStop(3);
    }







whats the problem here?

if it helps im also using other hitTest's for walls n' that



thanks!

Is _root.gotoAndStop(x) Proper?
hi all -

I have an swf that loads others into higher levels, and the only time I've ever had any problems with a button in one swf unloading another one was when I had changed the layout of my project, and changed the layers of some of the swfs - and forgot to change the AS on the old buttons to match the changes - so that I'd push them and they'd unload the 'wrong' swf -

of course this was my fault, and the fix was to correct the old button code so that it matched the new level location of the swf it loads/unloads

but recently I started a huge addition to my project that involves playing sounds using arrays, and I started noticing an irritating glitch - for some reason when I would hit the play button on my array it was loading/unloading movies on other levels

I scoured the fla looking for any instances in the AS for "_level" and couldn't find any errant AS!

eventually I deleted temporarily all the swfs from my root folder except the the problem swf and the level0/loader swf, and started putting swfs back in one at a time, hitting the play button until I'd figured out what swfs the problem swf was loading/unloading

once I knew that I looked at my loader swf and found out what layers those swfs were being loaded into on start and then re-searched my problem swf

what I found was that in my problem swf, I was using this code:

_root.gotoAndStop(42);

which was part of a larger code that used onSoundComplete after playing a sound file in an array in my problem swf, and frame 42 was where I refreshed the text boxes to update the new array position before going back to frame 1. Sure enough, in my loader swf, frame 42 was the frame where, on start, I loaded the swfs that the problem swf was loading/unloading

I hope all of this has made sense so far...

What is really confusing me is that, ever since I started using movie clips, I've been using the _root.gotoAndStop(1); command - because I was running into problems (I think, I can barely remember), with flash thinking I meant for the movie button to go back to frame 1 unless I put _root. before the gotoAndStop(1)

I've never had any problems using this command - I have an swf that loads about 40 other swfs into higher levels, and every one of them has at least one button with the _root. prefix to gotoAndStop - and none of them command the loader swf to change to a different frame

the only difference that I have been able to come up with is that the _root.gotoAndStop command in my problem swf is not on a movie clip, but on a frame -

Wait - - - is the _root. prefix a hierarchical thing - like if it's on a button, _root. means the swf holding the button, but if it's on a frame, then _root. means the swf that loaded that swf?

I just know had that epiphany - I'm going to do some messing around and see if that's what it is -

if that's the case though, it's strange that I never had any problems until now

I'll bet that's what this is - of course now that I think of it, because the command is on a frame within the problem swf, and not on a movie button, I don't have to use _root. at all - but I do most of my work with buttons, so I must have just included it from habit.

anyway - if anyone can give me any insight to this I'd appreciate it

_root Timeline GotoAndStop
Hi

I'm having problems getting a movie clip button on the main timeline to tell the main timeline to gotoAndStop a label when clicked.

This shoulbe be straight forward.

The script is below - any ideas on what the issue is?

Thanx

Dirk



on (press) {
//Start Dragging Movieclip Behavior
startDrag(this, false, 168, 224, 564, 476);
this.swapDepths(this._parent.getNextHighestDepth() );
n=this.getDepth();
_root.introBox.swapDepths(n+1);
//End Behavior


}
on (release) {
if(getTimer()-lastClick < 500){
_root.gotoAndStop("nointro");
loadMovieNum("http://www.dirksmith.com/flash_2/port_allianz.swf",50);
}
lastClick=getTimer();
stopDrag();

}
on (rollOut) {
stopDrag();

}

_root.gotoAndStop Problem (BUG?)
Hello. My First post.
I'm designing website and i discovered a problem that i have never had before... I dont know if its my mistake or not but i feel like its a flash bug.

I have a little preloader animation then a progress bar and after the loading is done it should play the rest of the animation and then stop at frame 5 at _root. Insted it restarts the movie and plays it again... well the second time its played it works....

The movie i uploaded is cut off version of the original but the same idea...
Please Help.

http://7788studios.com/stuff/gotoAndStop_BUG.fla
http://7788studios.com/stuff/gotoAndStop_BUG.swf
(35K each)

_root Timeline GotoAndStop
Hi

I'm having problems getting a movie clip button on the main timeline to tell the main timeline to gotoAndStop a label when clicked.

This shoulbe be straight forward.

The script is below - any ideas on what the issue is?

Thanx

Dirk



on (press) {
//Start Dragging Movieclip Behavior
startDrag(this, false, 168, 224, 564, 476);
this.swapDepths(this._parent.getNextHighestDepth() );
n=this.getDepth();
_root.introBox.swapDepths(n+1);
//End Behavior


}
on (release) {
if(getTimer()-lastClick < 500){
_root.gotoAndStop("nointro");
loadMovieNum("http://www.dirksmith.com/flash_2/port_allianz.swf",50);
}
lastClick=getTimer();
stopDrag();

}
on (rollOut) {
stopDrag();

}

_root + Scenes + GotoAndStop() = *beep*
I've been making a game in which you shoot meteors and UFOs etc. which now *beeps* up my *beep* when I include all the scenes.

The game itself is in scene 4 after a menu and an intro etc.
Inside the game I often controll the main timeline from whitin MCs using:

_root.gotoAndPlay(frame);

refering to the proper frame in that scene. But now when I include all of the scenes (I've only been using 'test scene' before to save time) Flash seems to take them into account too when going to the frame, so instead of frame nr 2 in the game scene it goes to nr 2 in the first scene.

Whatever am I to do? Convert all the frame numbers by adding the sum of all the previous frames? Include the scene name in every goto statement? Isn't there some better way to do this?

GotoAndStop FROM Loaded Swf TO _root Movie
I have made a base Flashmovie. Within this movie i load a SWF in layer 5. In this SWF file is a button which tells the base Flashmovie GotoandStop("form");
(form is a frame label in the base Flashmovie)

This is the code i made but it needs adjustment to reach to the _root movie (or _parent movie)


ActionScript Code:
on (release) {
    _root.gotoAndStop("form");
}

A Button In A MC In Frame 1 Of _root Hiding An MC In Frame 2 Of _root?
Hi. I have a button, "auroraB" in a movie clip "startupMC" which is in frame 1 of _root. There is another MC, "scenic" in frame 2 of _root.

The button "auroraB" is clicked and takes the user to frame 79 of the MC in frame 1. From there the user clicks another button to go to frame 2 of the _root.

How do I get it to hide MC "scenic" in frame 2 of _root when the button "aurroraB" is clicked? Thanks

Simple _root.gotoAndStop Not Working, Any Ideas?
I have a movie clip playing, once the movie clip finishes there are two buttons displayed on the last frame of the movie clip (which has a stop action on it); thus giving you the choice to proceed to one of two pages. I want the button to send you back to the main timeline, so I had this script:

on (release) {
_root.gotoAndStop(6);
}

And the other button was the same script, but frame 5 instead of 6. The button that is supposed to send you to frame 5 doesn't work at all, and the button assigned to send you to frame 6 sends you to frame three.

EDIT: I noticed that frame six was going to 3 (half the value of what it was supposed to go to) and frame five wasn't going anywhere (I guess because there is no frame 2.5). I tried changing the code to:

on (release) {
_root.gotoAndStop(12);
}

And the other code to (10); The above code places you on frame 6, and the code set to (10); sends you to frame 5. Why is it cutting the numbers in half? I can leave it like this for now because it works fine.. I'm just wondering why it is doing this.

Problem With For...in Loop Called From MC, And _root Not Hearing A GotoAndStop...
[I've posted this on Actionscript.org as well, apologies to those on both forums]

I have a series of MCs that open up from _root. _root is still visible since the MC's only take up about 2/3 of the screen. They also tell the main timeline (_root) to go to a "disabled" frame that has no button objects in order to not have the mouse react to what's behind the currently opened MCs. Because of this I have a "main" button that is supposed to close all open MCs and move _root's playback head back to a specific frame once the MCs are closed.

Each of the MCs that open add themselves to an array stored at root with gSceneList.push(this);

Subsequently, clicking _root's "main" button calls a global function:

Code:
_global.clearSceneList = function (){
for (var index in gSceneList){
gSceneList[index].gotoAndPlay("fade");
gSceneList[index].pop();
}
}
Every MC that pushed its reference into the array with gSceneList.push(this) goes to their respective "fade" frame but the "main" button that calls this also includes a _root.gotoAndStop("mainFrame");
For some reason, the _root timeline won't go to the "mainFrame" frame label. It's as if the for...in loop is not releasing to the main timeline, like it never broadcasts that it's finished.

If I click the "main" button a second time, it behaves properly and then returns to the "mainFrame" label.

Any ideas as to why the root timeline doesn't go to the necessary frame when told to do so after this for...in loop?

Any help or insight is greatly appreciated.

-PBME

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.

Can't GotoAndStop To Certain Scene
For some reason I've always been having trouble using gotoAndStop("scene", frame#). I can only wish for luck on it. I have this button that I want to go to the main menu. It's a "Try Again" button on a game over screen and I want it to go to that scene, which is before all of the levels. (Of course.) Here's the code I've been using in the button.


Code:
on (release) {
nextScene();
}


I've also been trying:


Code:
on (release) {
_root.gotoAndStop("Main Menu", 1);
}


..and taking off the _root. Hope someone can help me. Thanks in advance.

[F8] GotoAndStop(1) For ALL Mcs In A Scene
Hi there,
I didn't find anything helpful for my problem on the board or with Google, so I decided to start a new thread...

I've got a file with two scenes. The first one is the main scene, and when the user plays around with what's in there, a lot of different MCs move from their frame 1 (empty frame, so MC is "invisible") to frame 2, 3, 4...
There are about 30 different MCs in that scene.
But the user also has the option to go to scene 2 (which is like a goodbye-animation). What I would like to happen is, that, when the user chooses to go to scene 2, all the MCs that are still open in scene 1 move to their frames 1 (otherwise they're still visible in scene 2).

There are too many MCs with all different names in scene 1, so I thought about something like

Code:
MovieClip.prototype.gotoAndStop(1);
which I put in the main timeline in scene 2.

But that doesn't work...

I've been searching the WWW for an answer for quite a while though, but nobody ever seemed to have encounterred that problem... or is is that easy that noone has to ask...? Ooops...

Cheers, Annie

GotoAndStop Next Scene
^^^
on release of a button, i want to go to scene 2, frame 1.

Gotoandstop Scene
Hi everyone, I cannot get to a different scene when i press my button. I have tried putting
_root .gotoAndStop("Framelabel")
I have tried using it in a function
btn.onRelease = function(){
gotoAndStop("sceneTwo", 1);
}; but nothing works. I know there are problems with this and it looks simple but its not. I would really appreciate any help with this.
It works if its in the same scene but that doesn't help me.
Waiting for any reply Thanks

Bethann

'gotoandStop' To A Scene Within A Telltarget Movie ?
Hi,
I'm trying to get to a next scene from a tell target movie. The scenario is when a button is pressed a telltarget movie is played simular to a transition over the current frame 'erasing it' after which point i would like to jump to another scene. I have set a keyframe in the end of my telltarget movie clip however i can't seen to 'gotoandStop' at another scene. can anyone out there help me ?

GotoAndStop(); At Beginning Of Scene One, From Within A Movieclip.
Hello everyone,

Ok, I'm making a slideshow for a friend. I have a movie clip within the slideshow that plays for about 1300frames. At the end of the movieclip, I would like flash to return to scene 1, frame one.

on the last frame of the movieclip, I have tried using the code
Code:

gotoAndStop("Scene1", 1);

but this just starts at the beginning of the movie clip, not the flash movie.

I've also tried labelling frame one 'beginning' and used the
Code:

gotoAndStop(beginning);


but this also did not work.

Any suggestions.

Thanks

[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.

NextScene, PrevScene GotoAndStop - All Not Changing Scene
Hi All,

I am building some software for special needs children, however, I am experiencing difficulties in changing scenes. I am using FlashMX.

At the end of the first scene (named Ovals) I have tried both:

nextScene;

and

gotoAndStop("Rectangles", 1);

however, both result in the Ovals scenes repeating it's self.

Can anyone help?

Chris

Play To Frame#, Then Gotoandstop At Another Frame#
Can anyone help me with this? I need to assign a button action that on (press) tells the timeline to simply start to play, but then at a designated frame number (29), it needs to gotoandstop at frame (240).

For example:

on (press) {
play();
}
then at frame (29) gotoandstop(240)

Due to the way I've set up the main timeline, with some overlapping stairstepped buttons, I can't simply put the gotoandstop action in the actions layer. I need to embed this in each button, otherwise I'm looking at a major rebuild of the layout. For example, it will work like this:

Contact button - on press plays to 29, then when 29 is reached, it jumps to 240
About Us button - on press plays to 29, then when 29 is reached, it jumps to 230
News button - on press plays to 29, then when 29 is reached, it jumps to 220
etc. etc.

Any ideas?

GotoAndStop(frame);? ... Won't Go To Correct Frame
i have a small flash website. each page is 10 frames apart on the timeline. the menu buttons(movieclips) are on a "global" layer spanning across the entire document. when i use the following code (placed on a global layer) for each instance of the movieclip it moves to the right frame but the movieclip animation does not play (basically the button does not spin):

ABOUT.onPress = function() {
gotoAndStop(10);

}

SERVICES.onPress = function() {
gotoAndStop(20);

}

NEWS.onPress = function() {
gotoAndStop(30);

}

CONTACT.onPress = function() {
gotoAndStop(40);

}

when i try to use (onMouseDown), the movieclip animation plays but it does not move to the correct frame... it moves to frame 10 no matter which movieclip you press and then its stuck there...

here's a snapshot of my flash gui to get a better idea of my project:
[img http://www.thinkcreativ.com/myflashproject.gif]

Tell _root To Goto Frame And Then Play Certain Frame Of Movieclip?
Hi!

How do I get this to work?

When you click a button I want my flash to go to the frame label where the movie clip is located, and then play a certain frame of that movie clip.

Thank you!

_root.Movie_Clip.gotoAndStop("frame_02") Is Not Working
On a frame # 1 of the main timeline I have a movie clip "MovieClip_1" which has nested animated "MovieClip_2" inside. That nested internal "MovieClip_2" was animated with only two keyframes. First keyframe was set on first frame with given framename "frame_01". And another keyframe was set on frame # 25 and it was named as "frame_02".

Now. On a main timeline, on frame # 10 I have a button with ActionScipt command attached to it. The command should send an animation to the second keyframe of internal (nested) movieClip (as I mentioned that keyframe was called "frame_02".
But something apparently is not working. I think I set wrong an absolute path to that second frame of nested movie clip. I wonder what would be a proper command to send an animation to one of the internal movie clips from main timeline.
The button command I am using is:

on (release) {
_root.MovieClip_1.gotoAndStop("frame_02");
}

Here is a simple example file to illustrate the problem.

http://www.pashart.net/test.fla



I would appreciate any help resolving this problem!
Thanks in advance!

I Want My _root To Take Me To It's Scene
i have the on release script:

_root.gotoAndPlay(55);

on a button in a movie clip on a scene.

I thought that that would take me to frame 55 in that scene (scene2) but it takes me to frame 55 in scene 1. I want it to go to frame 55 in scene 2. why is this happening and how do i get what i want?

It works properly when i re-stack my scenes and have scene2 first.

thanks

-josh

_root And Scene
has anybody got an idea why

_root.myMc.gotoAndPlay ("frame");

works, and


_root.gotoAndPlay ("scene", 1);


doesn't?



robin

Gotoandstop (NEXT FRAME) ?
okay i ahve a button and a movie clip

is there a way to script the button so on each click it will then gotoAndStop on the next frame of the movie clip?

thanks

GotoAndStop Last Frame?
It is probably extremely easy an obvious but could someone educate me on this!

I have built a controller that should work in any timeline to conrol a video. One of my buttons is suppose to goto and stop at the last frame of the root timeline. Every root timeline might have a different number of frames so how do I tell it to figure that out?

Thanks in advance.

Mc.gotoAndStop(frame);
inside a if statement the mc.go.... is not working correct, is there there something that I should take care that maybe messing up its funcionality?
if the apresentacao button is clicked at the inicial point the logo should not move but it does, and if the other links are clicked it should move to the top right corner and not move until the apresentacao button is pressed again.
thanks for the help. The file is attached.
Joćo Gabriel

Mc.gotoAndStop(frame);
inside a if statement the mc.go.... is not working correct, is there there something that I should take care that maybe messing up its funcionality?
thanks for the help. The file is attached.
Joćo Gabriel

Why Doesn't "_root.gotoAndStop" Work?
hi,

I am having trouble trying to control the main timeline.

are there any other ways of controlling the main timeline from within a MC or container besides:

_root.gotoAndStop (217);

or do i have to already in in "_root" to control it's timeline?

thanks for your time

Link To Another _root In Another Scene
hi guys...

Does anyone know how to link to another _root in another scene?

you would think that this code would do, but... for some reason, it doesn't work:

on (release) {
_root.gotoAndStop ("scene2", 1);
}


Eirik

Why Is _root Pointing To A Different Scene?
Hi -

Total newbie here. Im having a problem. I have 5 scenes. On Scene 5 I have a movie. The movie contains a button and it has the code:

on(release){
_root.gotoAndStop(10);
}

now when I click the button it goes to Frame 10 of Scene 1 and not of Scene 5 which is where it is currently at...I thought _root referenced the current timeline? I have a feeling I'm just missing something but I can't figure out how to reference my current timeline...I've tried _parent as well but it's not working.

Thanks for the help!

focus

Frame Wont Gotoandstop
im trying to get the movie to gotoandstop at frame 7 when the first menu item has been rolled over.

for some reason its ignoring the line of AS thats telling it to stop and it keeps playing

http://uploadhut.com/view.php/401326.fla

[F8] GotoAndStop At A Frame In External Swf
Hi

I have for example 3 btns in the main movie, a container with instance name container and an external swf with an intro and 3 labels to match the 3 btns. How do I gotoAndStop to the relevant frame within the externally loaded movie?

Code I'm using is;


Code:
on (release) {
_root.container.loadMovie("portfolio_cats.swf");
gotoAndStop("_root.container.cat2");
}


Where am I going wrong? as the external movie just plays at the start??

Thanks in advance
Wayne

[F8] GotoAndStop Fails In Frame 1
If I put a gotoAndStop in frame 1 of my movie, it fails. If I put it in frame 2, it succeeds. However, by putting it in frame 2, the user gets a brief flash of frame 1. I want to conditionally skip frame 1. Here's what my code looks like:

if (_root.myFlag == "a")
gotoAndStop("a");

I've also tried it like this, but with the same result:

this.onLoad = function()
{
if (_root.myFlag == "a")
gotoAndStop("a");
}

I've even simplified it like this, with the same result:

gotoAndStop("a");

Why doesn't this work in frame 1?

GotoAndStop Goes To Wrong Frame
Hi guys,

First post. I'm a fairly new Flash developer and I'm having a problem with a project I'm working on.

I have a button that loads a movieclip on level 4 and passes a string value to it. This movieclip (let's call it web.swf) has it's own timeline and frames are labeled. In the first frame of web.swf, i have an init() function that reads the string and goes to the proper frame.

basically:

if (_level0.string == "fred flinstone")
{
_root.gotoAndStop("frameFred");
}

So everything works pretty well, except that for this certain if statement, it goes to the wrong frame!

I created a dynamic text field to populate with _currentFrame just for testing, and this particular if statement stops at frame 30 (should be 31.) I even tried gotoAndStop(31); and yet, _currentFrame returns 30..... what gives?

To make this even more confusing, frame 31 has some images on it. If I remove the images, the function does go to frame 31! if i leave the images, it always stops at frame 30. arghhhh.

Anyway, anyone experienced this problem before? I'm using Flash mx 2004. Any help/tips would be appreciated!

Thanks!

GotoAndStop At A Frame In External Swf
Hi

I have for example 3 btns in the main movie, a container with instance name container and an external swf with an intro and 3 labels to match the 3 btns. How do I gotoAndStop to the relevant frame within the externally loaded movie?

Code I'm using is;

Code:
on (release) {
_root.container.loadMovie("portfolio_cats.swf");
gotoAndStop("_root.container.cat2");
}


Where am I going wrong? as the external movie just plays at the start??

Thanks in advance
Wayne

Gotoandstop On Frame Label
This what i have....

I have one Scene in this scene are 4 movie clips. In each of these movie clips are 30-40 frames, each of which has frame labels and buttons for each frame. I want to know the actionscript for a button when i am in "movieclip4" when released I want to go to "movieclip2" on a certain frame label inside movieclip2.

Please help. Thanks in advance.

GotoAndStop On Random Frame
I have an MC called asteroid. In the script, every 1000 whatever units its in a new asteroid is attached at the center of the stage. There are two things i cant get to work. #1 i can get the asteroid to stop at a random frame(it has 100 frames). #2 after it's made and has gotten its random frame to stop at i need it's width and height to grow. Here is what I have so far:
i=1;
setInterval(rocks, 1000);
function rocks(){
rock= _root.attachMovie("asteroid","asteroid"+i, i);
i++;
rock._x = 300;
rock._y = 300;
rock.movef = setInterval(rockmove, 10);
}
function rockmove(rok){
// I dont know what to put here; what I tried did not work
}

What would I add to my script to accomplish this task?
thanks

GotoAndStop At A Frame In External Swf
Hi

I have for example 3 btns in the main movie, a container with instance name container and an external swf with an intro and 3 labels to match the 3 btns. How do I gotoAndStop to the relevant frame within the externally loaded movie?

Code I'm using is;

Code:
on (release) {
_root.container.loadMovie("portfolio_cats.swf");
gotoAndStop("_root.container.cat2");
}


Where am I going wrong? as the external movie just plays at the start??

Thanks in advance
Wayne

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