Topic: Flash Action Script (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=23948" title="Pages that link to Topic: Flash Action Script (Page 1 of 1)" rel="nofollow" >Topic: Flash Action Script <span class="small">(Page 1 of 1)</span>\

 
Mikxel
Nervous Wreck (II) Inmate

From: Schaumburg, IL, USA
Insane since: Mar 2004

posted posted 11-07-2004 14:05

I wasn't sure where to post this, but here goes...

I'm having trouble (as usual) with action scripting. This is the scenario.

I have four movie symbols on the stage that are activated by the mouse release. What I want to happen is have the player go to the next scene after all four symbols have played their entire length.

I know this has to be simple, but I'm still having trouble.

Any help would be greatly appreciated.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 11-07-2004 15:27

well, define four global variables.
on the end of each symbol, set its variable to true.
and also trigger a function which checks if all four are true, then advance to the next scene.

Mikxel
Nervous Wreck (II) Inmate

From: Schaumburg, IL, USA
Insane since: Mar 2004

posted posted 11-08-2004 00:59

I'm gonna give this a shot... thankyou thankyou!

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 11-08-2004 02:13

The movie goes to the next scene only after all 4 clips get clicked? You have to click all four before it advances? It doesn't matter what order, just so long as they have all been clicked before advancing to the next scene?

I don't know the structure of your movie, but each symbol could have a property as Grumble suggested. All four get initialized to a boolean "false":
clip1.played = false;
clip2.played=false;
etc.

Each clip as part of its onRelease event or whatever, would trip the value to true:

clip1.onRelease = function () {
this.played = true;
this.play();
}

At the end of each clip's timeline, check for something like
if (clip1.played ==true && clip2.played == true && clip3.played == true && clip4.played == true) {
gotoAndPlay(someSceneOrFrame);
}

Enzo
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Feb 2006

posted posted 02-17-2006 19:41

I am creating a game and want a action script code to go to the next scene when I touch the door
what is the code pleez?

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 02-19-2006 11:45

from the AS2.0 reference:

gotoAndPlay([scene:String], frame:Object) : Void

Sends the playhead to the specified frame in a scene and plays from that frame. If no scene is specified, the playhead goes to the specified frame in the current scene. You can use the scene parameter only on the root Timeline, not within Timelines for movie clips or other objects in the document.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu