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








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!




KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-19-2006, 05:14 PM


View Complete Forum Thread with Replies

Sponsored Links:

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

View Replies !    View Related
GotoAndStop On The Over Frame Of A Button
Can I turn a button to its over state by telling the playhead to gotoAndStop on the Over frame? Is there another simple way to do this? Will I have to turn my buttons into MCs? I am hoping to aviod doing that.

Thanks a lot!

View Replies !    View Related
_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);
}

View Replies !    View Related
GotoAndStop Will Not Stop On Frame
I have a movie clip, with several nested clips...

At the end of one of the clips I have a line of code that says:


Code:

gotoAndStop(main1);



main1 is the label of a frame in the _parent movie clip.

Unfortunately this doesnt work and it just starts at frame one in the same clip.

I have also tried the following code:


Code:

this._parent.gotoAndStop(main1);



which has the same result.

when I use this code.. it returns to a previous scene, but not the scene i want to work in.


Code:

this._parent.gotoAndStop(1);



Anyone have any ideas?

Cheers

Dirk

View Replies !    View Related
Targeting Frame Label In Scene From Movie Clip In Same Scene
Hey Pals,

I'm trying to target a frame label on the timeline of a scene from a movie clip within the same scene, using Flash MX 2004 Pro. The scene is ultimately used as a .swf to load as a page of a website. The frame label is called "miscOn", the scene is called "misc". The below code is attached to a button within the movie clip.

on (release) {
loadMovieNum("tajwebsite_main.swf",1);
gotoAndPlay(miscOn);

}


Thanks!

Stu

View Replies !    View Related
Play... Then... GotoAndStop Various Frame Options
I can do this by creating three seperate MC's but I'm trying to avoid that when one MC will do if I can figure this out. Here's the scenario:

I have three buttons sitting within an MC on the same frame where a STOP action sits on another layer.

When one of the buttons is clicked I want an animation to play, the same animation for all three buttons. AFTER this animation is completed, I want the playhead to gotoAndSTOP at a specific labeled frame, based on which button was clicked. All that will be displayed on this frame is the last frame of the animation and text, specific to the labeled frame.

I'm not sure how to do this. A "play" action will start the animation, but how I get the playhead to go to a specific frame after the animation is over is where I'm lost.

I'm sure there's an obvious answer, but I'm missing it.

Thanks

View Replies !    View Related
////Loadmovie Level1---->GotoAndStop Frame 2 ?////
Hello. Im making a help window that is loaded on level 1 when the user press a button.
My problem is that i want to go to "frame 2" in this window. I tried many times and nothing...i need help please.

View Replies !    View Related
Gotoandstop Specified Frame On Main Level
I have a flash movie that plays an intro and then stops. the last frame contain buttons etc for navigating the site. The buttons are in a movie clip named menu. when a user clicks a button it loads a new swf over the top of the original intro (stopped frame), amongst other actions see below:



on (press) {
gotoAndPlay(15);
loadMovieNum("wwd.swf", 2);
}
on (rollOver) {
unloadMovieNum(1);
loadMovieNum("navigatewwd.swf", 1);
}
on (rollOut) {
unloadMovieNum(1);
loadMovieNum("infocenter.swf", 1);
}


To these actions i want to add an action to gotoandstop a specified frame (lets say frame 20 for example) on the main intro. (this will be a plain white frame) I want it to do this before loading the movie onto level 2.



does this make sense?



my reason for doing this is so that the main intro frames are not visible behind the movies loaded to level 2. as i transition through the various pages of the site the background (ie the stopped frame of the intro) flashes briefly before the new swf is loaded on level 2.



any help would be greatly appreciated.

thanks

View Replies !    View Related
Flash 8 Gotoandstop Random Frame
im having some simple actionscript problems

I have a flash header here:

http://nikibrown.com/archworks/home.html

I have 3 frames and i want it to go to one of the 3 frames and stop when it loads.

This works fine in safar, but when i use FF for mac it will randomly go to frame 1 and frame 2 but not frame 3? it flashes frame 3 but then goes back to frame 2. God only knows what it does in IE (anyone care to tell me as i am on a mac and dont have ie...)

I have this in frame 1 on my actions layer:

gotoAndPlay (Math.round(1+Math.r andom()*2))
stop();

here is my .fla:

http://nikibrown.com/archworks/headnav.fla

thanks for all the help guys!
nebrow

View Replies !    View Related
[F8] Gotoandstop Frame With Radio Buttons
Hello,

I'm trying to create a questionnaire without an xml file. I want to use the timeline and frames along with the gotoandstop function.

The first question works fine and and it sends the user to the correct frame according his selection.

The second question doesn't work. How can I correct this problem?
Fla file is attached. Any help would be appreciated. Thank you.



Code:
stop();
// Listener
var radio_listener:Object = new Object();
radio_listener.click = function(evt:Object) {
var frame:Number = evt.target.data;
btn_1.onRelease = function() {
gotoAndStop(frame);
};
};
// Add listener
rbtn_1a.addEventListener("click",radio_listener);
rbtn_1b.addEventListener("click",radio_listener);
rbtn_1c.addEventListener("click",radio_listener);
rbtn_1d.addEventListener("click",radio_listener);

rbtn_100a.addEventListener("click",radio_listener);
rbtn_100b.addEventListener("click",radio_listener);
rbtn_100c.addEventListener("click",radio_listener);

rbtn_200a.addEventListener("click",radio_listener);
rbtn_200b.addEventListener("click",radio_listener);
rbtn_200c.addEventListener("click",radio_listener);

View Replies !    View Related
On MouseOver Tell Movie Gotoandstop At Frame 2
why is this so difficult?

www.mr-bunny.com/nav.fla
its a 7 meg file

I have tried so hard to get the simplest of answers.
all i want to do is:

on mouse over of each button,
tell the movie called TEXT to goto and stop at a specific frame

so when you point to a navigation button, it tells you what page it goes to.

i used to be able to do this long ago on flash 4
now im beating my head against the wall trying everything.
I know it has to be the stupidest thing why it dosent work.

dear god someone PLEASE help me!

View Replies !    View Related
Why GotoAndStop() Always Flash The Previous Frame?
Dear all, I found a strange thing like below:

ActionScript Code:
stop();
var mcAthlete:MovieClip = new Athlete();
addChild(mcAthlete);
addEventListener(Event.ENTER_FRAME, Loop);
Athlete.prototype.ChangeShoe = function()
{
    if(this.Shoe)
    {
        this.Shoe.gotoAndStop(2);
    }
}

function Loop(evt)
{
        mcAthlete.ChangeShoe();
}
the flash always show a flash with the "Shoe.Frame1", But I want to keep the Shoe always in frame2(Shoe.gotoAndStop(2). How I should do?

View Replies !    View Related
GotoAndStop(frame) Caching Issue
hi,

as a kind of an image container i created a swf file (using adope Flash CS3) including about 100 single Images(512x512).

On my main as3 application i use the LoaderClass to load this cont.swf.

so far fine, i am able to move to every frame using gotoAndStop(frame).

but it seems that each gotoAndStop(frame) allocates the memory for the frameimage and never release it.

as example:

PHP Code:



var Mov:MovieClip = mapSWF.loaderObject.content;for(var frame:uint = 0;frame<128;frame++){    Mov.gotoAndStop(frame);} 




Memory usage dramatically increases with each step. even if i unload the whole swf file using Loader.unload() there is still a huge amount of allocated memory.

is there any way to free the cached memory or extract each frame by its own?


i wonder what is the common way to assemble images? I build that swf file because it is much faster to load a whole container.swf instead of requesting each single image.


thx a lot

View Replies !    View Related
GotoAndStop(x) Instantiates Everything Between Current Frame And X?
So, I'm starting to become truly frustrated with a combination of two pernicious aspects of Flash CS3. One of which, the way it handles sound, there's not much to do about... but it gets worse when coupled with this:

So, let's say you have a main timeline that is 10 frames long, and each has a keyframe containing:

someClip_mc
- Which contains someClipChild_mc (a clip with a sound on the timeline starting on frame 2. Frame 1 has a stop action to prevent sound from playing).

Each instance of someClip_mc, s well as the someClipChild_mc inside it is from a different library item, so we have ten different sounds on the timeline.


Now, on your main timeline do this: gotoAndStop(10);


And now all of a sudden you hear a cacophany of sound! It is as though gotoAndPlay(10) caused flash to instantiate every clip that exists on frames 2 - 10, but then before the clips have a chance to execute their frame scripts they are 'removed' from the display list if they ever existed in the display list at all. Since the default action of a movieclip is to play, this is exactly what those nested clips do and because they aren't on the display list they don't execute the stop() action on frame 1! The same can happen if you "gotoAndStop(1)" from frame 10. Any time you use gotoAndStop() it seems to provoke this behavior if you use it to skip over frames in any direction.

So... why in the world does this happen? How can you stop it?

View Replies !    View Related
Disabled Button...NOT At GotoAndStop Frame
I don't understand why this is not working. I have two different buttons that should BOTH disable the but0-but8 buttons (i tried using the same function for both, but it didn't work, so I tried this). The problem is that when I click on "im1", "but0" becomes disabled, but it's not going to frame "_active". Can anyone help?:


Code:
function setB(arg) {
for (i=0; i<9; i++) {
_root.portMC["but"+i].enabled=true;
_root.portMC["but"+i].gotoAndStop("_up");
}
_root.portMC[arg].enabled=false;
_root.portMC[arg].gotoAndStop("_active");
}
//
function setBim(arg) {
for (i=0; i<9; i++) {
_root.portMC["but"+i].enabled=true;
_root.portMC["but"+i].gotoAndStop("_up");
}
trace("button should be on active state");
_root.portMC["but"+arg].enabled=false;
_root.portMC["but"+arg].gotoAndStop("_active");
}

but0.onRelease=function() {
setB(this._name);
loadMovie ("port1.swf", MC);
immenu._visible=0;
portTxt._visible=0;
}

immenu.im1.onRelease=function() {
setBim(0);
loadMovie ("port1.swf", MC);
immenu._visible=0;
portTxt._visible=0;
}

View Replies !    View Related
If Date/time = GotoAndStop Frame
Hi,

I'm after some scripting that will check the data and time and then depending upoon that date/time, the movie is moved to a certain keyframe.

So say that the date is set for 6th October at 12 noon. When that time comes, the movie moves to a keyframe in the movie and stays there.

Anyone done anything like this before?

View Replies !    View Related
GotoAndStop - Problem - Wrong Frame
Hello,

I'm a newbie and having a problem with a flash website I am working on.

My code for
_root.instancename_mc.gotoAndStop(2) is taking me to frame 2
but
_root.instancename_mc.gotoAndStop(10) is taking me to frame 2 as well
so are
_root.instancename_mc.gotoAndStop(20)
_root.instancename_mc.gotoAndStop(30)
_root.instancename_mc.gotoAndStop(40)

I have stop actions in frames 1,2,10,20,30 etc

I am using Flash MX2004 Pro.

Any help or suggestions would be greatly appreciated

View Replies !    View Related
GotoAndStop To A Frame In The Parent MenuClip?
Hello.

I have a menuclip inside a menuclip inside a menuclip. The third menuclip down has a button in it, where I have a rollOver handler. I would like to send the animation to the first frame of the second movieclip with that handler, which is the movieclip that houses the third one. Is it possible to do that?

Thanks,

Brian

View Replies !    View Related
Button Script To Play To A Frame I Don't Mean GotoAndStop
How can I make a button to play upto to a specific frame number and stop?

I need it to run all scripts on all other frames along the timeline but to ignore all the stop commands.

How do I do this?

View Replies !    View Related
GotoAndStop Random Frame Browser Issue - Help Please
Hey guys,

I am creating a flash banner for a non-profit journalism institution in Flash CS3 Pro.

What I want to do is when someone goes to the website, the flash movie automatically loads a random member's organization (with a button link) into the center area.

The file works in IE7:
http://www.cnjo.org/

but in FireFox, the flash file is stuck on the first logo, and will not randomize.

Here is my action script 2.0 code:

r = int(Math.random()*12)+2;
_root.gotoAndStop(r);
stop();

_root.btn_ahcj.onRelease = function(){getURL("http://www.healthjournalism.org/");}
_root.btn_apme.onRelease = function(){getURL("http://www.apme.com/");}
_root.btn_asbpe.onRelease = function(){getURL("http://www.asbpe.org/");}
_root.btn_bea.onRelease = function(){getURL("http://www.beaweb.org/");}
_root.btn_ewa1.onRelease = function(){getURL("http://www.ewa.org/");}
_root.btn_ire.onRelease = function(){getURL("http://www.ire.org/");}
_root.btn_nsnc.onRelease = function(){getURL("http://www.columnists.com/");}
_root.btn_poynter.onRelease = function(){getURL("http://www.poynter.org/");}
_root.btn_rel.onRelease = function(){getURL("http://www.rna.org/");}
_root.btn_sci.onRelease = function(){getURL("http://www.nasw.org/");}
_root.btn_sej.onRelease = function(){getURL("http://www.sej.org/");}


Like I said, the button instances are set and working in IE7 but not in Firefox, whats up with this?

View Replies !    View Related
Problems Trying Populate Fields Frame And GotoAndStop
Hi!

We are trying to populate some fields (textArea, dynamicText, Buttons' names) in a frame and after go to it using gotoAndStop(). It goes, but the fields are all blank. The second time we try it we get the values! Crazy behaviour!

Does any one have any clue?

Thanks in advance

View Replies !    View Related
GotoAndStop Frame Label In Different Movie Clip
Hi!

I'm having a problem with this one...

On my main timeline, in frame one, I have a movie clip called "mc" (for sample sake)
Inside that movie, I have a frame "playme"

On frame two of the MAIN timeline, I have another movie clip. Inside that movie clip I have a button where I simply want the action for it to gotoAndStop to the mc to frame "playme"

I've been able to figure out much more complicated _root/_parent/_level0 scenarios before, but for some reason I cannot get that second button to go to the mc"playme" frame.

I've tried:

this.mc.gotoAndStop("playme");

this._parent.mc.gotoAndStop("playme");

and basically about 9,000 other versions, none of which work. If I put the button on the main timeline(stage) of course it works. So it's a path thing.

I'm sure this is simple but if ANYONE can help me it would be much appreciated. The swf file that I am using will be using this same scenario several times throughout.

THANKS!

Suz

View Replies !    View Related
Target Frame In Scene From Movie In Same Scene
I know this is probably really basic, but I'm stuck here. Here's what I want to do: I have Movie1 on a layer in Scene1, and Movie2 on another layer in Scene1. In Movie1 is a button that, when pressed, goes to a particular Frame in Movie2. How do I do this!? Thanks!

View Replies !    View Related
Buttons Going To Scene 1 Instead Of Frame In Current Scene
Looks like I've got another problem...!!

In scene 3 of my file I've got four mcs working as a menu (with buttons inside them). When I test just the scene on it's own and the mcs use the "on(release)" command to do gotoAndPlay(2), it doesn't do it unless I put in a tellTarget (_level0 or _root).

When I test the entire movie, clicking the buttons just goes straight back to frame 1, scene 1...!!

What am I doing wrong? Is it the target path that the mc opens?
It's driving me mad... and this is my second post today!

I've tried gotoAndPlay("Scene 3", 2) but it still goes back to scene1. Help!!

Thanks again for any advice

View Replies !    View Related
Strange Error: Gotoandstop Going To A Frame For A Split Second Then Returns
Hello,

I have the following code in a frame

Code:
//shared object code adapted from macromedia livedocs, URL:
//http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001664.html

doScore();
stop();


function doScore()
{
//create the name of the shared object so each level and game type has sep scoreborad
var so_name:String = "kosina" + game.type + "_" + game.level;

//create the local Shared Object
var my_so:SharedObject = SharedObject.getLocal(so_name);

//if any of the score values are undifieded, ie first time this is run
//set them to 0 so that the logic to place scores works
if (my_so.data.score1 == null)
{
my_so.data.score1 = 0;
}

if (my_so.data.score2 == null)
{
my_so.data.score2 = 0;
}

if (my_so.data.score3 == null)
{
my_so.data.score3 = 0;
}

if (my_so.data.score4 == null)
{
my_so.data.score4 = 0;
}

if (my_so.data.score5 == null)
{
my_so.data.score5 = 0;
}

//logic to determin where the score should be in the high scores
//and move down other scores if displaced by current score.
if (game.score > my_so.data.score1)
{
my_so.data.score5 = my_so.data.score4;
my_so.data.score4 = my_so.data.score3;
my_so.data.score3 = my_so.data.score2;
my_so.data.score2 = my_so.data.score1;
my_so.data.score1 = game.score;
msg.text = "You rank number 1";
}
else if (game.score > my_so.data.score2)
{
my_so.data.score5 = my_so.data.score4;
my_so.data.score4 = my_so.data.score3;
my_so.data.score3 = my_so.data.score2;
my_so.data.score2 = game.score;
msg.text = "You rank number 2";
}
else if (game.score > my_so.data.score3)
{
my_so.data.score5 = my_so.data.score4;
my_so.data.score4 = my_so.data.score3;
my_so.data.score3 = game.score;
msg.text = "You rank number 3";
}
else if (game.score > my_so.data.score4)
{
my_so.data.score5 = my_so.data.score4;
my_so.data.score4 = game.score;
msg.text = "You rank number 4";
}
else if (game.score > my_so.data.score5)
{
my_so.data.score5 = game.score;
msg.text = "You rank number 5";
}
else
{
msg.text = "No high score this go";
}

//set the score values to the text boxes
score1.text = my_so.data.score1;
score2.text = my_so.data.score2;
score3.text = my_so.data.score3;
score4.text = my_so.data.score4;
score5.text = my_so.data.score5;

//set the text to show what the highscores are for
if (game.type == 1)
{
scoretype.text = "Arcade Level " + game.level;
}
else
{
scoretype.text = "Challenge Level " + game.level;
}

}//end function do score



function keyHandler(keypress)
{
if (keypress == "right")
{
if (menu_mc._currentframe==1)
{
menu_mc.gotoAndStop(2);
again_mc.gotoAndStop(2);
menu_mc._alpha = 100;
again_mc._alpha = 30;
}
else
{
menu_mc.gotoAndStop(1);
again_mc.gotoAndStop(1);
again_mc._alpha = 100;
menu_mc._alpha = 30;
}
}
if (keypress == "left")
{
if (menu_mc._currentframe==1)
{
menu_mc.gotoAndStop(2);
again_mc.gotoAndStop(2);
menu_mc._alpha = 100;
again_mc._alpha = 30;
}
else
{
menu_mc.gotoAndStop(1);
again_mc.gotoAndStop(1);
again_mc._alpha = 100;
menu_mc._alpha = 30;
}
}

if (keypress == "space")
{
if (again_mc._currentframe == 2)
{
gotoAndStop(2);
}
else
{
gotoAndStop(3);
}
}

}

and it all works fine apart from that last bit with the goto and stops. The one to go to frame 3 works fine but when it goes to frame 2 it just directly there for a split second then returns.

I've tried swapping the 2 and 3 around and still have the problem with directing to frame 2. Also ive tried directing it to a blank frame and still it just directs back.

I'm pretty sure there is nothing in frame 2 to cause it to direct back. but anyway here is the code for frame 2.


Code:

stop();
//menu control function

function keyHandler(keypress)
{
if (keypress == "up")
{
menu_mc.gotoAndStop(menu_mc._currentframe - 1);
}
else if (keypress == "down")
{
if (menu_mc._currentframe != 4)
{
menu_mc.gotoAndStop(menu_mc._currentframe + 1);
}
}
else if (keypress == "space")
{
switch (menu_mc._currentframe) {
//arcade
case 1:
menu_mc.gotoAndStop(5);
break;

//challenge
case 2:
menu_mc.gotoAndStop(10);
break;


case 5:
game.level = 1;
game.type = 1;
gotoAndStop(3);
break;

case 6:
game.level = 2;
game.type = 1;
gotoAndStop(3);
break;

case 7:
game.level = 3;
game.type = 1;
gotoAndStop(3);
break;

case 8:
menu_mc.gotoAndStop(1);
break;

case 10:
game.level = 1;
game.type = 2;
gotoAndStop(3);
break;

case 11:
game.level = 2;
game.type = 2;
gotoAndStop(3);
break;

case 12:
game.level = 3;
game.type = 2;
gotoAndStop(3);
break;

case 13:
menu_mc.gotoAndStop(1);
break;
}
}
}

any help or suggestions would be much appriciated, if anyone thinks they can help if they have the full fla please pm me,

Thanks

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