ActionScript 2.0 :: Gettomg Frame To Attach 2 Conditions Which An Action Has To Fulfill Before It Can Execute Something?

Sep 9, 2003

to a frame I want to attach 2 conditions which an action has to fulfill before it can execute something.

so:

if (particularVar == Yes AND anotherniceVar == 25) {
thisfunkyMC.gotoandStop(49);
}

but obviously, this doesn't work.How do I have to correctly formulate it so I can put two conditions side an If statement, before something will be executed?

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Attach Movie - Put The Action On The First Frame On The Root And Not Inside Th MC

May 20, 2003

here is the fla file - [URL] I have an attached movie on root level that movie has a button inside it and I want to tell that button to do some function. simple----BUT I want to put the action on the first frame on the root and not inside th MC. here is the code Iam working on and the same is in the fla file in the above link.

[Code]...

explanation of the above code-- but1 is the button on root that tells clip1 to attach on blank MC(thats also on root) clip1 has the button inside it call but2 and tried to tell that bloody but2 to open that the URL link but its not doing so NOTE - I want to put all the action on the action on the first frame and not inside th MC.

View 1 Replies

Action Doesn't Execute In Player

Nov 9, 2009

In the app I'm working on (AS 2.0) I have several buttons. I've added an action to each of those buttons:
 
on (release){    gotoAndPlay("fr_test");}
 
When in Flash, if I enable (Control) Simple Buttons and Simple Actions, this action works like it should. If I test the movie or publish it, the action doesn't execute.
 
I've tried another approach with one button. I added an empty layer for actions only, and added the following code:
 
this.test_btn.onRelease=function(){    gotoAndPlay("fr_test");}

This doesn't work at all, nor in Flash nor in the player. I wonder what I'm doing wrong here. Changing fr_test to the frame number does not change anything.

View 1 Replies

ActionScript 2.0 :: [FMX] Action Following LoadMovieNum Won't Execute

Jul 20, 2005

This is my as:

[Code]...

For some reason, the external movie I'm loading into level 5 in the first red line won't execute the action below it, to make the loaded movie play a clip on its main timeline (contentSlider) from frame 16. It just keeps going to the first frame of the movie and nothing else.

View 3 Replies

ActionScript 3.0 :: Clear Stage To Execute Next Action?

Oct 21, 2009

This would be done upon click of one of the buttons I have on the stage. That button also needs to execute a different class I have programmed. You can even just tell me what to search under to find out this data.xplanation: I have 2 different classes. Buttons class and Videos class. Buttons class loads the stage with 9 different buttons. Each button is supposed to lead to its own video. (I have the buttons ready with programming to load the video and all of the programming works). The Video class loads the video onto the stage and has the controls for it to play, pause, stop etc (works pretty much..).

View 2 Replies

ActionScript 2.0 :: Get A Letter To Execute A Key.isDown Action?

Oct 9, 2002

How do i get a letter to work inside of a key.isDown action?

View 6 Replies

ActionScript 3.0 :: Clear Stage And Execute Next Action With Button?

Oct 20, 2009

how to clear the stage of everything I have loaded it with. This would be done upon click of one of the buttons I have on the stage. That button also needs to execute a different class I have programmed. You can even just tell me what to search under to find out this data.

Explanation: I have 2 different classes. Buttons class and Videos class. Buttons class loads the stage with 9 different buttons. Each button is supposed to lead to its own video. (I have the buttons ready with programming to load the video and all of the programming works).
 
The Video class loads the video onto the stage and has the controls for it to play, pause, stop etc (works pretty much..).

Now, I am not sure what code to put under each of the buttons to clear the stage and load the Video class.

View 2 Replies

ActionScript 2.0 :: Does Flash Execute Codes Only In The Keyframe Or It Execute Whatever Is In The Frame Regardless Whether Its A Keyframe Or Not

Mar 16, 2005

When I place some codes in a keyframe, these codes are showing on all the following frames up till the next keyframe with codes. My question is, does Flash execute codes only in the keyframe or it execute whatever is in the frame regardless whether its a keyframe or not?

View 1 Replies

ActionScript 2.0 :: How To Attach A Sound To An Action

Mar 19, 2009

I am making a little hidden object game and I want a sound to play everytime an object is clicked on, but I can't figure out how to do it.my sound is a movie clip called "meow". Anyone know how to do this?here is the code:

onClipEvent (load) {
found = [];
for (i=0; i<7; i++) {

[code].....

View 3 Replies

ActionScript 2.0 :: Change An Action From A Button Click To A Frame-based Action

Oct 2, 2006

Code:
_root.navigationMC.onPress = function() {
startPreload("blue.swf");
}

If I wanted to change an action from a button click to a frame-based action, what do I use instead of onPress? The hints from the AS editor are all click-based.

View 1 Replies

ActionScript 3.0 :: Change The Default Key (space Bar Key) To Execute The Action Of The Focused Element In The Stage?

Jun 3, 2011

it's possible to change the default key (space bar key) to execute the action of the focused element in the stage?If you ever worked with the Focus Manager you've possibly seen that when you press the space bar the focused item is "executed".Can you disable that "executor" or can you change the space key with the enter key?

View 2 Replies

ActionScript 2.0 :: How To Attach Action To Submit Button

Jun 4, 2003

I am fairly new to Flash. Need assistance in how to attach action to a submit button in order that all collected information in a form is sent to an e-mail address.

View 3 Replies

ActionScript 3.0 :: Frame Labels And Conditions - Get Movements To Start Where It Last Stopped?

May 14, 2010

I have two different movieclips on my stage, one with a number of buttons and one with a moving object that I want to control with my buttons. The reason for having the buttons in their own movieclip is that I want to be able to move them as well. Let's say I have an object in "myMovieClip" that moves between three different positions when I press three different buttons, the buttons might say "up", "left" and "right".

[Code]....

How do I get my movements to start where it last stoped? If my object starts out at the "Up"-position and I press "Left", I want it to move from Up to Left and if I then press "Right" I want it to move from Left to Right. If my object is at Left and I press Left I want it to stay where it is.

View 1 Replies

ActionScript 3.0 :: Attach Function To Only Start On Certain Words At A Certain Event Action

May 12, 2011

[URL] - which works fine on start, but I want to attach this function to only start on certain words at a certain event action. With what I got can anyone see how I can stagger the function to a specific event? Here is what I have so far, which starts the letter cycling, but it ends on the first letter and does not complete the full word:

[Code]...

View 3 Replies

ActionScript 2.0 :: CS4 Play Check For Key / Play At End Execute Action

Apr 6, 2011

Root timeline: keyframe 1, keyframe 2, etc...

-keyframe 1 has a MC "frist MC"
-keyframe 2 has a MC "second MC", etc.
-the MCs are all duplicates containing different animation, but have the same AS inside them.

The construction of the MC is:Play intro animation -> Stop and wait for key stroke. If key is "space" set variable value to 1, if else set variable value to 0, then continue to play next frame. -> Complete the animation till the last frame.In the last frame check what is the value of the variable to check which key was been hit. If it was a space (var =1) go to root and play current frame +1 (go forward), Else, go to root and play current frame -1 (go back)Its a kind of slideshow.so heres the code in the middle, after the intro animation was played:[code] The problem with var reverse is, it works well in the first frame, its beign filled with value depending on what key is being hit, But in the last frame, when the time comes to check the value, trace says its "undefined".I have tried setting up a _global.variablename = reverse and it works in both frames (the check at the end is succesful, it detects the given value), but still the last frame only plays the currentframe -1 as if always executing the "else" command, no matter what the value of var reverse is.

View 1 Replies

ActionScript 2.0 :: Action On Frame When External FLV Movie Finish Go To Next Frame

Sep 27, 2011

I'm new to actions script. I creating a presentation in which I'm loading external FLV movie files. I have a Navigation menu to go to the different chapters (every chapter is a FLV movie File)This is what I need, when a FLV movie finish I need some action in the frame to take me to next frame where I have the next FLV chapter.if is any help I upload a sample FLA with some FLV for reference.

View 9 Replies

ActionScript 3.0 :: Action When On Frame External FLV Movie Finish Go To Next Frame

Sep 27, 2011

I creating a presentation in which I'm loading external FLV movie files. I have a Navigation menu to go to the different chapters (every chapter is a FLV movie File) what I need? = when a FLV movie finish I need some action in the frame to take me to next frame where I have the next FLV chapter.I upload a sample FLA with some FLV for reference.

View 4 Replies

ActionScript 2.0 :: Make A Simple Movie (call It MovieClip) First Frame Has Stop(); Action, Second Frame Has Label PlayMovie?

Nov 6, 2006

1. I make a simple movie (call it movieClip) first frame has stop(); action, second frame has label playMovie, last frame has action gotoAndPlay(2); (so that movie not stop anymore2. Now I place movieClip on stage3. Question... what is code to make movieClip play frame label playMovie?

I already try to put many different type action in frame one of stage
this.movieClip.gotoAndPlay("2"); //NOT WORK
this.movieClip.gotoAndPlay(2); //NOT WORK

[code].....

View 7 Replies

ActionScript 2.0 :: Go To Next Frame And Execute The Code

Nov 17, 2010

I am new in AS, anyways here is what i want. i have a button in Frame 4 which perform some function on frame on a specific area of movie. now i am on Frame 1, i want to make a button which 1st goto frame 4 then execute that button's code

View 2 Replies

ActionScript 2.0 :: Multiple Conditions - An Object Will Go To A New Frame If Multiple Buttons Are Pressed?

Aug 12, 2009

i have an if statement, an object will go to a new frame if multiple buttons are pressed

PHP Code:[code].....

now i want it so that if one condition is met the mc will goto frame 2, if 2 conditions are met, frame 3 and if 3 conditions are met, frame 4.i know i could do this with a lot of if statements but i have a lot of movie clips to use this code on, so is there any way to write an if statement that will trigger different options if multiple conditions are met?

View 4 Replies

ActionScript 3.0 :: Execute External Javascript On Last Frame?

Mar 29, 2010

I'm authoring in Flash CS4 using Motion Tweens.
 
Here is the situation.  I have a JavaScript that closes the DIV containing my flash object.  It currently closes after 15 seconds. That is supposed to be how long the Flash movie lasts.  however, slower machines run the movie longer.  this means the flash object closes too quickly and they don't see the entire movie. . . if I increase the time, the users of fast machines have to wait around awhile for the movie to disappear.

So, I would like the movie to execute the javaScript when it gets to the last frame.

View 5 Replies

ActionScript 3.0 :: Execute Code Upon Reaching Frame?

Aug 7, 2011

i have created a movieClip in the authoring enviornment. i dynamically get it to play and then it pauses at frame 20. how do i dynamically tell when frame 20 has been reached and then execute the next code?

View 4 Replies

ActionScript 3.0 :: Execute A Piece Of Code Once On A Frame?

Jan 2, 2011

How to execute a piece of code once a on a frame For Example I want to execute this code only once..

/**********************
var rand:Number = (Math.random())%70;
gotoAndPlay(rand);
/**********************

View 2 Replies

Actionscript 3.0 :: Execute Actions That Were Happening In Frame 1?

Apr 29, 2009

I have a movie clip in frame 1 that skips to frame 2, contained in this function:

Code: Select allskipIntro_MC.addEventListener(MouseEvent.CLICK, introClick);
function introClick(pEvent:MouseEvent):void{
if(skipIntro_MC.visible == true && pEvent.target == skipIntro_MC)
{

[Code].....

Am I right in thinking this is happening because it's still trying to execute actions that were happening in frame 1 (fading in of movie clips using transitions) when it goes to frame 2? If so, how do I stop these actions so this error doesn't occur?

View 1 Replies

ActionScript 3.0 :: Track Frame On Movieclip To Execute Different Commands?

Feb 5, 2010

Im doing a movieclip that is an empty square. On the first frame of the movieclip i have this empty square, and on the second i have a square with a cross in the center.What im trying to do is when i click on the square the cross happears, and when i click with the cross, this cross dissapears and the movieclip returns to the frame 1.

View 1 Replies

ActionScript 3.0 :: Track Frame On Movieclip To Execute Different Commands

Feb 5, 2010

Im doing a movieclip that is an empty square. On the first frame of the movieclip i have this empty square, and on the second i have a square with a cross in the center.

What im trying to do is when i click on the square the cross happears, and when i click with the cross, this cross dissapears and the movieclip returns to the frame 1.

View 1 Replies

ActionScript 3.0 :: Execute Functions In Document Class When Main Timeline Reaches A Frame

Oct 16, 2009

I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that? see the code and comments

[Code]...

View 2 Replies

IDE :: If Else "button" - Movie Clips Have A Stop Action On The First And Last Frame With A Frame Label

Oct 10, 2009

I have three buttons, btn_1,btn_2,btn_3, and two movie clips, image_1,image_2. The names listed btn_1,btn_2,btn_3, image_1,image_2. are all instance names. All buttons and movie clips are on their own layer in a single frame on the main time line. the movie clips have a stop action on the first and last frame, with a frame label, on the first frame in the sub time line. For image_1 the frame label is image_1_1 and for image_2 the frame label is image_2_1.

I would like btn_1 and btn_2 to control the movie clips, image_1,image_2. Either button should be able to close the other buttons movie clip and play it's own movie clip. Also i am trying to make the movie clips themselves have the ability to be closed by clicking on the movie clip image area that is playing. Both movie clips when not playing hide behind the appropriate button with an alfa of 0.

When playing they expand to the middle of the window and are at 100% alfa, using a tween. The third button, btn_3 should only be visible when one or the other movie clisp are playing. btn_3 dose nothing else but this for now. As of now, my movies continuously loop and btn_3 is always visible. I can't seem to figure this out. my code for this action is:

[Code]...

View 1 Replies

ActionScript 2.0 :: Attach A Single Movieclip On Frame?

Jun 6, 2009

does anybody know how to attach a single movieclip when it gets to the frame? It is a stopped frame, so it just continually attaches it. The instance name is ast. I tried onLoad but it won't load the attached movie.

View 1 Replies

IDE :: Applying More Than 1 Action To A Frame?

Apr 17, 2010

I am using action script 3 and need to know how to apply more than 1 action to a frame label, ie; I have 5 pages of images and have actions coded as follows:

btn1.addEventListener(MouseEvent.CLICK,play1);
function play1(event:MouseEvent):void{
gotoAndStop("1Lrg");

[Code]....

code continues like this for all the buttons (84 thumbnail images), so they will open a larger image when clicked. So what I now need to do is connect the side navigation buttons to go to the relevant page (frame) when clicked...the problem I'm having is that it is causing duplications in the code ie; I now have, for instance thumbnail (btn4) calling frame 4, but I also need a side navigation button to call this frame.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved