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




GotoAndStop("Scene", 1) Within IF Statement & OnEnterFrame



Hello,

How do you get the gotoAndStop("Scene", 1) method to run in an IF statement within an onEnterFrame method?

Regards
Rob



FlashKit > Flash Help > Flash ActionScript
Posted on: 04-19-2004, 08:33 PM


View Complete Forum Thread with Replies

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

MX ActionScript - GotoAndStop Within An If Statement.
Hello everyone!

I have 2 keyframes, both containing buttons and then i load a variable from another document, "messages.txt". This document only contains one line atm, which is:

messages=1

When messages are more then 0, i want to go to my second keyframe.
This is the code I'm using in keyframe 1:

stop();
loadText = new LoadVars();
loadText.load("messages.txt");
loadText.onLoad = function() {
if (messages>0) {
gotoAndStop(2);
}
}

The problem is, it won't go to keyframe 2, it stops at keyframe 1 even though my var messages is set to 1.

The messages.fla, messages.html/swf and messages.txt are located at http://213.113.144.74/flash/ (One of the above must be put in too, or my webserver will say forbidden.)

Would be very grateful if someone could come up with an answer for this.

Thanks.
/infamous

MX ActionScript - GotoAndStop Within An If Statement.
Hello everyone!

I have 2 keyframes, both containing buttons and then i load a variable from another document, "messages.txt". This document only contains one line atm, which is:

messages=1

When messages are more then 0, i want to go to my second keyframe.
This is the code I'm using in keyframe 1:

stop();
loadText = new LoadVars();
loadText.load("messages.txt");
loadText.onLoad = function() {
if (messages>0) {
gotoAndStop(2);
}
}

The problem is, it won't go to keyframe 2, it stops at keyframe 1 even though my var messages is set to 1.

The messages.fla, messages.html/swf and messages.txt are located at http://213.113.144.74/flash/ (One of the above must be put in too, or my webserver will say forbidden.)

Would be very grateful if someone could come up with an answer for this.

Thanks.
/infamous

Simple OnEnterFrame Statement Not Working?
This should randomly decide whether to continue playing on through the clip or waiting on frame 112 until random is high enough. But for some reason it's not even detecting currentframe == 112 :S I tried a trace statement just after the first if and i get nothing.

Any ideas?


ActionScript Code:
stars.onEnterFrame = function() {    if (this._currentframe == 112) {        if (Math.random() >= 0.99) {            this.gotoAndPlay(113);        } else {            this.gotoAndPlay(112);        }    }}

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(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!

_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!!

'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([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

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

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

Scrolling Scene With IF Statement That Won't Work
I've got a scrolling scene that works fine, except that I want the scene to stop scrolling completely if the user's mouse isn't near one of the sides of the movie (like this scene: http://www.campariusa.com).

I found a scrolling script that works fine, except that the scene is always scrolling a little bit. I added an additional IF statement saying that if _xmouse is between 155 and 485, then the scroll should be 0, but it's not working, can anyone tell me why?

Here is the script...thanks so much for any help that you can give me.

onClipEvent ( enterFrame ) {
//slows down scroll
scroll = ((320 - _root._xmouse)/100)
//if then statements
if (((this._x >= 0) && (scroll > 0)) ||
((this._x <= -500) && (shift < 0)) || ((_root._xmouse >= 155) && (_root._xmouse <= 485))) {
shift = 0}
this._x = this._x + shift;}

If Statement? Jump To Different Scene Depending On Button.
Hi,
What sort of scripting would i need for a frame action if i want to jump to a specific scene depending on the button pressed. ie: if main button is pressed goto main scene or if exit button is pressed goto exit scene. I have the two buttons so that when either is pressed it plays a transition animation in that scene then it gets to the last frame and this is where I need the frame action.

Syntax For Using Scene Variable In To Goto Statement
I have a variable named "destination" that I set based on button selections at various points.

My intent is to run some more frames then redirect the movie flow to the scene with the name that matches the value of the "destination" variable.

I can't figure out the correct syntax for the goto action, though.

Please help!!!

Thanks in advance.

OnEnterFrame=null, OnEnterFrame=undefined & Delete OnEnterFrame....
onEnterFrame=null, onEnterFrame=undefined & delete onEnterFrame....


Which one to use??? What are the performance considerations. If all my movieclips on-stage are running a MovieClip.prototype.onEnterFrame = function() {run initial stuff before setting onEnterFrame=null/undefined... }, will there be performance hits? It's sad that delete onEnterFrame doesn't work unless I delete the prototype enterFrame as well, which would make the clips reinitailise itself again once you declare the enterFrame prototype again (i need to do this since there's more movieclips that end up appearing on-stage, and they need to automatically initialises themselves the moment they appear).

It seems that setting enterFrame to null or undefined is the safest way to go about it, since dealing with multiple .swfs would mean using the same MovieClip.prototype, which means I can't afford to flush out one zone of enterFrames (by deleting both null enterframes and MovieClip.prototype.onEnterFrame) if it means the other zones still needs to initialise their clips first...it's just too troublesome and buggy a mechanism to implement! Once MovieClip.prototype.onEnterframe is declared, it should stay. Will there be performance hits as a result of this?

Is there anyway to do this without tricking the engine to call the onLoad function for MCs by typing "//" into each movieclip actionscript box --- or by troublesomingly creating linkage-ids for every movieclip library item!? NO! That's not what i want...they'll only add to the fiile size! How do i execute a certain "constructor/initilisation" function to all Movieclips without linking them to a class in a library? Something to think about.....

GotoAndStop("Scene 2", 1)
Bleh.

Ok i have a movie clip animation. After its finished i want to go to scene 2.
I put the actions
gotoAndStop("Scene 2", 1)
but it doesnt work.
Why in the world?

I am not a noobie. Just a stupid person.

What Difference Between Mc.onEnterFrame And Funtion OnEnterFrame()
Dear, All,
Could anybody tell me the difference about them, I am fresh......

thanks in advance

Problem With OnEnterFrame And Delete OnEnterFrame
Ok here is the nuts of the problem,

When I delete the onEnterFrame function programatically I can't reassign it later.

Here is what is happening:
I have a method that I call to build a box on the screen over time. I build it overtime using the onEnterFrame function.
When the application is done it delete the onEnterFrame just fine.

Everything works as expected until you try to assign the same method over again to say for instance make the box smaller. Once I try to call it again I can't assign the onEnterFrame again... I have no idea why it is totally strange.


Code:
//Create an interface
//mc:MovieClip, x:Number, y:Number, w:Number, h:Number
InterfaceBuilderClass.prototype.createInterface = function(mc,x,y,w,h)
{

mc.dy = (h/2)*-1
mc.dx = (w/2)*-1
mc.dy1 = h/2
mc.dx1 = w/2
mc.NFRAMES = 40;
mc.controller = this;
mc.t = 0;

mc.onEnterFrame = function()
{
if (this.t++ < this.NFRAMES) {
trace(this.t);
//DELETED DRAWING STUFF THAT IS NOT AFFECTING THE PROBLEM

}else
{
//redraw with rounded corner
//DELETED DRAWING STUFF THAT IS NOT AFFECTING THE PROBLEM

this.controller.executeCallBack()
delete this.onEnterFrame;
}
}
}

Try it for yourself and see if you can make it work.

If anyone else has run into this problem I'd love to know how you resolved it.

Thanks,
Mark

Re-initialising OnEnterFrame After Deleting OnEnterFrame
Hello to all the actionscript guru's!

I have this thing where when I click this other thing which is controlled by a different thing which gets deleted after I click the other thing and I would like to know if I can sort of undelete the different things thing????

Okay, now in English.

I have some movieclips that move using an onEnterFrame. When you click on a movieclip, I stop the movement by deleting the onEnterFrame. Is there a way to re-initialise the onEnterFrame to get the movieclips moving again?

A thanks in advance for everyone who reads this question

Delete OnEnterFrame; Start OnEnterFrame?
Hi, title says it all.... any consise methods to restart a deleted onEnterFrame that has been deleted?

Thanks!

Delete OnEnterFrame Re-establish OnEnterFrame
i'm trying to stop an onEnterFrame [via the delete onEnterFrame] but later re-establish it, or restart it. is this even possible?? anyone got suggestions if it ain't??

Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails.
[Flash CS3 (Flash 8 available as well)]
[Actionscript V2 (AS3 Not available for this project. End result must be in AS2. Plus I haven't learned AS3 yet)]

Hi

Sorry about running two posts so close together, but I couldn't change the other one to reflect the changes I've made in my problem.

The 1st post dealt with my theory that my IF statement wasn't written correctly, and so failed. But I've since disproved that.

Okay here is the situation.
I isolated elements from a larger app that I'm putting together and the problem still followed.
The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.
The purpose of the application is to load an XML file(works)
Populate 2 text fields with information from the XML file(works)
Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {

data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {
if (success) {
//point to the first node with information
var track_xml = data_xml.firstChild;
//loop through each node
while (track_xml != null) {
//print out each node
test1 = track_xml.toString();
//point to the next node
track_xml = track_xml.nextSibling;

//Runs my code

//Define the contents of two text fields located in the movie
textOne = data_xml.firstChild.childNodes[3].firstChild;
textTwo = data_xml.firstChild.childNodes[5].firstChild;
trace("data_xml.firstChild.childNodes[3].firstChild = " + data_xml.firstChild.childNodes[3].firstChild);
trace("data_xml.firstChild.childNodes[5].firstChild = " + data_xml.firstChild.childNodes[5].firstChild);
/*dummyYes = data_xml.firstChild.childNodes[5].firstChild;
dummyNo = data_xml.firstChild.childNodes[6].firstChild;
dummyMaybeEmail = data_xml.firstChild.childNodes[3].firstChild;
dummyMaybeFax = data_xml.firstChild.childNodes[4].firstChild;*/

//Checks between the two text fields for a match
if (textOne == textTwo) {
trace("It is selected!" + textOne + " " + textTwo);
check_fax.selected = true;
} else {
trace("Ir is NOT selected!" + textOne + " " + textTwo);
check_fax.selected = false;
};


}
} else {
trace("error reading file");
}

delete data_xml;

};

data_xml.load("XML/dummy2 - email.xml");

};
After you read the code, you'll have noticed the trace commands I stuck in there.
They send this to the output panel:

Code:
data_xml.firstChild.childNodes[3].firstChild = 1
data_xml.firstChild.childNodes[5].firstChild = 1
Ir is NOT selected!1 1
So as far as I can see, it reads the XML file with no problems, it loads the text fields with no problem. But for some reason the IF statement refuses to recognize that both the XML nodes contain the same information.

If I alter the code like so:

Code:
textOne = 1;
textTwo = 1;
Then the IF statement works. It sees that the two text fields are identical in content, and the checkbox is selected.

So whats wrong with the Data from the XML file?
I haven't a clue.
I tried converting from a string to a Numeral using:

Code:
newText = Number(textOne);
But that didn't work, it just produced "NaN" when traced.
I tried populating the XML file with text versus numbers, still no luck.
What came from the trace:

Code:
data_xml.firstChild.childNodes[3].firstChild = hi
data_xml.firstChild.childNodes[5].firstChild = hi
Ir is NOT selected!hi hi
The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.
CheckBoxes are mandatory.
But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

I'd really appreciate some help and suggestions with this, I think I'm out of ideas.

Thanks

-Lem

Problem With Continue Statement And Label Statement
What am I doing wrong?

ActionScript Code:
var a = {
    a:[1,2,3,4,5,6,7,8,9,0],
    b:[1,2,3,4,5,6,7,8,9,0],
    c:[1,2,3,4,5,6,7,8,9,0],
    d:[1,2,3,4,5,6,7,8,9,0],
    e:[1,2,3,4,5,6,7,8,9,0],
    f:[1,2,3,4,5,6,7,8,9,0],
    g:[1,2,3,4,5,6,7,8,9,0]
}

outerLoop: for(var i in a){
    trace(i);
    for(var j in a[i]){
        trace(' '+j);
        continue outerLoop;
    }
}


Quote:




1039: Target of continue statement was not found.

Converting 'If Else' Statement To A 'switch' Statement
I am attempting to convert the following If statement to a Switch statement and I'm unclear as to the details of the execution of it. If someone could help me with this I would be very grateful. Here is the If statement followed by the shell of my attempted switch statement. TIA.

var spotOne:Boolean = true;
var spotTwo:Boolean = false;
var spotThree:Boolean = false;
var spotFour:Boolean = false;

btn.onRelease = function() {
f (spotOne) {
ball.slideTo(450, 100, 1);
spotOne = false;
spotTwo = true;
} else if (spotTwo) {
ball.slideTo(450, 150, .5);
spotTwo = false;
spotThree = true;
} else if (spotThree) {
ball.slideTo(100, 150, 1);
spotThree = false;
spotFour = true;
} else {
ball.slideTo(100, 100, 1);
spotFour = false;
spotOne = true;
}
};
---------------------------------
(attempt at conversion to switch)

var spotOne:Boolean = true;
var spotTwo:Boolean = false;
var spotThree:Boolean = false;
var spotFour:Boolean = false;

btn.onRelease = function() {
var location:Number = ?

switch(location) {
case spotOne:
ball.slideTo(450, 100, 1);
spotOne = false;
spotTwo = true;
break;
case spotTwo:
ball.slideTo(450, 150, .5);
spotTwo = false;
spotThree = true;
break;
case spotThree:
ball.slideTo(100, 150, 1);
spotThree = false;
spotFour = true;
break;
case spotFour:
ball.slideTo(100, 100, 1);
spotFour = false;
spotOne = true;
break;
}

[F8] OnEnterFrame Inside OnEnterFrame
this is a simplification of what I have:

function fadeOutBorder(thumbnail){
this.onEnterFrame = function() {
if(this["thumbnail"+thumbnail]._alpha>0) {
this["thumbnail"+thumbnail]._alpha-=5;
}else{
this["thumbnail"+thumbnail]._visible=false;
//delete _root.onEnterFrame;
}
};
}


function loadThumbnails(){
onEnterFrame{
//stuff here...
fadeOutBorder(5);
//when that^^ is called... it quits the rest of the script...
//more stuff here...
};
}


So what happens is when I call fadeOutBorder.. It just stops that onEnterFrame in the loadThumbnails function.

Won't Change Scene...neither With Actionscript,neither From Scene To Scene
I have a big problem...why won't my movie change from my intro to scene one...I built my intro, i built my scene one but it won't skip from one to another. At the begining i had a loop problem on my intro,and it would never go on to the next scene,and now even if i build a new page it won't change to another scene either....HELP PLEASE!!!

[F8] Flash Site, Multiple Scenes, Button Moves Scene To Scene Instead Of Navigating
Hi...I am very new at flash, so forgive my ignorance in advance...I really really need help!

I created a site, separated into scenes (intro, main-home, about, portfolio, press, contact).

About half the time the navigational buttons work fine. However, the other half of the time one of the buttons, the Press button, instead of bringing me to the Press scene, just moves scene to scene (for example, say I'm on the home page and I want to go to the Press page, it just goes to the about page...I hit the button again it goes to the Portfolio page, etc.). I think the problem lies somewhere in bypassing the intro prematurely (you can skip intro and go straight to the site/home-main scene), but I'm not positive.

Here's the code for the Press button:
on (release) {
gotoAndPlay("press", "pressframe");
}


where pressframe is the name of the first frames in the Press scene.

I can upload the fla file to my own site for download and review if necessary....

Please help!....I am losing sleep and hair over this.

Help With Passing Number From Scene 1 To Scene 2's Dynamic Text Field
hi all ,
i have 2 scenes on the first i retreve user information from flash and through php to a mysql database then send it back to flash. on one of the lines i retreive a id number

content.htmlText += "&nbsp;&nbsp;<a href='#" + this["id"+i] + "'>" + this["id"+i] + "</a><br><br>";

when the user clicks on this ahref i want to goto scene 2 and insert the id into a dynamic textfield with an instance name of "recorde_id"

this scene is complete and works it retreives more infor about the user..

but i have to manualy enter a id number into a INPUT filed i want it to be automatic that why i have changed it to be dynamic so it can capter the ahref from scene 1.. if you need more code or information just ask and ill deliver, im a flash newbee..

cheers aron.

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

Simple Gotoandplay - Animate The Scene Out Before Playing Selected Scene?
Hey there again,

Just wondering if you guys could point me in the right direction.
Before, when I made full-flash websites, when I clicked a button I'd have it gotoandplay frame 60 or whatever (or scene 2 or 3 or 4 etc.) and that page would start up there and have a nice little animating intro but it would be a very abrupt start because anything on the previous page would just disappeer jaggedly.

But I've seen a lot of nice sites, that once you press a button, it'll clean up the current scene, say have everything burn out or fade or or something instead of just having the next option just appear, then go to the selected page. Say they clicked News or Contact, and they were on products. It would allow me to have a timeline to animate all the objects out (just a simple tween) then once it reached the end and all the objects were out, it knew which button they pressed and where to gotoandplay.

This is probably easy actionscripting (or not, I have no clue) so it would be greatly appreciated if someone could direct me, thanks!

Scene 2 Works Fine, But When Preloaded Added Scene Will Not Work
I have a website at wosso.com which I needed a preloader. So currently the site works fine. I am toying with a preloaded, but when I add it the main part of the site does not function.

There are two scenes, PRELOADER and SCENE 1. My preloader includes this script in the first frame of the preloader: ifFrameLoaded ("Scene 1", 105){
gotoAndPlay ("Scene 1", 1);
}


I have also inluded this line at the end of the preloader, but also tried it without this line:

gotoAndPlay ("Preload", 1);

I haven't used Flash in some time and I am not good at scripting. It seems to make sense, but why is it not working when SCnene 1 works fine by itself.
Any sulotion/suggestions?

Thanks,

Wayne

Play The Rest Of Current Scene, THEN Gotoandplay Another Pre-determined Scene
Hi,

Im my scene contains 6 buttons, I want button '1' to play the rest of the current scene (for example scene '0' then goto and play scene '1'

I want button '2' to play the rest of the current scene (for example scene '0' then goto and play scene '2'


I want button '3' to play the rest of the current scene (for example scene '0' then goto and play scene '3'

etc....

any ideas? this is for actionscript 3. My current script just makes the button goto a certain frame, can I edit it? here it is:

stop();

thumbbtn1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);
}
thumbbtn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndStop(3);


any help greatly appreciated.

Ger

Scene -> Object? Turning A Scene Into An Importable Symbol For Other Projects
Okay I made a scene with movement and everything, but when I convert it to a symbol I lose the movement frames.
I want to be able to import it as an object so that the animation loops for as long as I need it to in the other project.

How do I do this?

Sound Plays From Next Scene, While Playing In Current Scene?
i am making an animation, i have about 8 scenes.
for some reason it starts playing the sound from the next scene in the middle of the current scene.
why?? i checked movie explorer and the sound is in another scene. does that sound like a flash bug, or just me? it is a big file, could that be it. please help it is driving me crazy!!!!!

I Cant Navigate 1 Scene From Another Scene Thorogh Movie Clip
SIr i made a Movie Clip and in the movie clip there are 4 buttons when i want to use the button so go to another scence it cant happen so how can i go to Another scene by the button which is present in the MOVIE clip
i think u understand my Problem
simply summary is that i there is a button in the movie clip and i want to use the button to go to another scene but it cant happen
Thk u in adnvance for any body Consideration

On My Movie, At The Middle Of The 3rd Scene, Goes And Plays The Sounds On 4 Scene...m
on my movie, at the middle of the 3rd scene, goes and plays the sounds on 4 scene...leaving some stuff of the 3rd... then goes blank... then it just gets crazy... no where there in the middle of the scene i gave it a command to go to the next scene... what on earth is going on...

please help...
it never happened before...
mayor deadline/...

urgent care...


thank you in advance:
chesckob

Button Relase; Play Curent Scene And Go (scene)
I need a bit of help, and its hard to explain. I have a menu that consist of 6 buttons on Scene1. I want to be able to click on a button and play scene1,frame37, then after it finishes playing I want it to move over the designated scene from the button pressed.

//This is what I currently have which makes the button play the ending of the scene.
on (release)
{gotoAndPlay( "scene 1", "fadeout");
}

//I need to finish the actionscrip by going to a different scene after it finishes playing the current scene. This is for all the buttons.

Example:
Button1 needs to play "scene 1", "37" then go to scene 3
Button2 needs to play "scene 1", "37" then go to scene 4
(any button) to Play "scene 1", "37" then go to (scnen asign from button)
and so on.

Any feedback is greatly appreciated.

How To Disable The Intro Sound When Switching From 1 Scene To 2nd Scene
hi guys
i got another problem in my project

below is an attacchment
i wanna stop the intro sound from playing when i from scene 3 go to scene 2
how to fix it? T_T


i want the song to autoplay for the scene 1 without adding button to control it.

Buttons Aren't Going To Correct Scene, Just Progresses To Next Scene :(
Anyone ever have the problem when your buttons have the code to jump to a specific scene, they just jump to the next scene on your palette instead?

For instance, I've got 6 buttons that I need to operate as a normal HTML site. So I programmed each button to jump to the corresponding scene with...


Code:

on(release) {
gotoAndPlay("fine, frame1");
}
In this situation, that button needs to jump to the scene "fine", but instead, when I click on it, it simply jumps to the next scene in the scene palette (which isn't "fine").

Interestingly as well, once it scrolls through all 6 scenes (by clicking on any button 6 times), it starts over with the first scene again.

Anybody know what I am doing wrong?

Thanks!

How To Start Play Scene From Movie Located In Another Scene
Please, help,

i need to solve this problem:

what action script i need to put on a button which is located in a movie called "mainmovie" (of scene 2) to play scene 1.

thank you.

therock

Changing Form Preloading Scene Into Main Scene.
hi all,

i've got a problem i can't figure out. i'm working on my website in flash. this is how i will do it:

http://www.auto-i-public.ch/adi/aresthetics.html

now, you see the letters cercling around in the upper left corner. all is well. now i created a preloader (there will be heavy stuff on it...maybe even shockwave files). i chose to do it with a new scene. it's a basic one. bar filling up, a few dynamic texts with the status. this is working too.
but then, when the preloading is done, it jumps into the main scene. everything appears and works. but the circeling letters don't work anymore. they run on a little loop for themselves. it's actually the only loop i have on my mainline. the rest is in mc's. i even tried to put the letters in a mc. didn't work either. it seems as the letters wouldn't initialize anymore. i checked if there are no already set variables coming over from the preloader. negative. i'm out of wisdom. if anyone could help me...i'd send the files, if nothing else helps. it's nothing really to steal.

tnx
adrian

Click, Clear Stage Scene, THEN New Scene
I think this is a common problem, but I haven't found the common solution. We've discussed this a little on a another thread, but we didn't really come up with a solution.

I know a lot of people want to have a button (well, multiple buttons), that when you click on it, it gotoAndPlay()s a scene that clears the stage, and THEN goes to a new scene (or in my case webpage) based on what button was clicked.

I know the answer has to be some use of variables and actionscript, but I haven't been able to puzzle it out, being new to flash.

Does anyone know the solution, or better yet, have a .fla file with the solution (so we can all see greatness in action)?

Thanks!

Button In Scene 1 Loads A Specific Mc In Scene 2?
Unfortunately my brain isn't really designed for understanding or figuring our ActionScript very well... Here's what I'm trying to do and the problem:

The user arrives at a 'splash screen' in Scene 1 which gives them the option to choose to view the demo in 'interactive' or 'autorun' mode (the two modes are slightly different in terms of their content so I'll have two separate scenes, Scene 2 will contain all the 'interactive' movie clips and Scene 3 will contain all the 'autorun' movie clips). The user can then choose whether they'd like to view the demo with the sound on or off. Once they've made this selection they'll be taken to the opening animation of the mode (i.e. interactive or autorun) they selected, with the sound on or off as they specified.

What ActionScript needs to be applied to the sound on or off buttons in Scene 1 to ensure that the correct sound movie clip loads at the beginning of Scene 2 or Scene 3.

If the user initially decided to view the demo in autorun mode they will be able to change to interactive mode at any time... how can I ensure the sound setting they have selected remains unchanged across Scenes (and they can choose to turn the sound on or off at any time)?

I need to create this as a single SWF - I can have as many Scenes and movie clips as is necessary but cannot use loadMovie and multiple SWF's

If anyone has any ideas I'd love to hear them! I just can't figure it out and I'm getting REALLY desperate!

Thanks!

Loader Scene -> Movie Scene Problem
When my preloader finishes loading my movie, and i use gotoandplay ("Movie", 1), something goes wrong. When it is done loading, it continues on to the "Movie" Scene, but keeps switching rapidly between the load scene and movie scene. I need to know how to completely turn off the loader scene when it completes. Thanks

On Release - Finish Scene - Goto Scene?
I have a navigation scene with buttons that is 100 frames but stops to allow navigation at 50.

What is the correct script to add to the buttons that allows me to finish the current scene to frame 100, then go to required scene??

Help is greatly appreciated.
Thanks,
Nick

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