Topic: Flash Action Script Pages that link to <a href="https://ozoneasylum.com/backlink?for=23948" title="Pages that link to Topic: Flash Action Script" rel="nofollow" >Topic: Flash Action Script\

 
Author Thread
Mikxel
Nervous Wreck (II) Inmate

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

IP logged posted posted 11-07-2004 14:05 Edit Quote

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

IP logged posted posted 11-07-2004 15:27 Edit Quote

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

IP logged posted posted 11-08-2004 00:59 Edit Quote

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

Steve
Maniac (V) Inmate

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

IP logged posted posted 11-08-2004 02:13 Edit Quote

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

IP logged posted posted 02-17-2006 19:41 Edit Quote

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

IP logged posted posted 02-19-2006 11:45 Edit Quote

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