ActionScript 2.0 :: [Flash8] Use An If Statement On A Frame

Jan 7, 2007

I'm trying to use an if statement on a frame, but it doesn't seem to work do i need to put into some sort of function?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Flash8 If Statement - More Than 1 Conditions

Mar 13, 2009

Is there a way to have more conditions in an "if" statement? For example I have 3 conditions:

condition 1: a=5
condition 2: b=3
condition 3: c=12

So, if a=5, b=3 and c=12, I want to trace("success") for example. But it's necessary that all 3 conditions are executed. How can I do that?

View 2 Replies

ActionScript 2.0 :: Flash8 Using The If Statement With An Edit Box?

Nov 17, 2009

all i want to do is to enable a user to check that what they have written in an edit box is the correct answer or not

var element ("correct")
var element ("try again")
var element ("input") = "3"
if (input="3")

[Code]....

and what happens is no matter what is written in the edit box, "correct" shows up

View 1 Replies

ActionScript 2.0 :: Flash8 Numerical Sort - If The One Of The Numbers Has A Higher Digit Value, It Ignores The Statement Entirely?

Dec 17, 2009

I defined an array construct and assigned two variables to part of the array so I can simple sort it:

number1 = array[i]
number2 = array[i+1]
if(number1 > number2){
...swap etc

Problem is, when I try the comparason if the one of the numbers has a higher digit value, it ignores the statement entirely. Eg If 16 > 8 it skips it. So I tried adding '16' and '08' into the array and that worked perfectly with the statement.

View 2 Replies

Actionscript 3 :: If Statement Not Working - Loop Carrera(a Lenghthy Movieclip) From Frame 2 Back To Frame 1

Nov 25, 2011

This is an if stament on a frame on the root. I want to loop Carrera(a lenghthy movieclip) from frame 2 back to frame 1. (For testing purposes) This is the code:

[Code]...

View 3 Replies

ActionScript 2.0 :: Use If Statement With A Frame Label Instead Of A Frame Number?

Jun 30, 2004

I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?

View 1 Replies

ActionScript 2.0 :: Use If Statement With A Frame Label Instead Of A Frame Number?

Jun 30, 2004

I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?

View 1 Replies

ActionScript 2.0 :: Flash8 Variable Set-up - 'if' Statement To Run From Variable When Playhead Encounters MovieClip

Aug 21, 2009

I want to declare a variable on the main timeline that can be called from anywhere in my movie. So, _global var should be the right approach. I want to declare a movie clip 'MC1' "open", or "closed" so that when it is revisited, my flash file knows the user has been there before and performs a different task from the one it does when 'MC1' was first encountered. So, i need a 'if' statement to run from the variable, when the playhead encounters the movieClip.

[Code]..

View 2 Replies

ActionScript 2.0 :: Use A Frame # In A If Statement?

May 21, 2009

How would you use an if statement to say if you're on a certain frame do this.

if(frame is # 2){
something = true
}
if(frame is # 1){
something = false
}

View 2 Replies

Flash8 :: Go To Frame If Key Is Down?

Feb 19, 2010

I have two frames in a movieclip with a stop in the first. I want a script that makes is so that when you hold down the UP or DOWN arrowkey it jumps to frame 2 but if you drop the UP or DOWN key you go back to frame 1.

View 1 Replies

ActionScript 3.0 :: Frame Move On If Statement?

Jul 22, 2009

why this MC always jumps to frame 76...here is my code

function goQuestion(e:Event){
if(e.currentTarget.frame <=(60)){
e.currentTarget.gotoAndPlay(60)

[code]....

View 2 Replies

ActionScript 2.0 :: Using If Statement For Frame Number?

Dec 1, 2009

I'm having difficulty searching it since keyword frame brings up everything. I'm looking to reference the frame number in an if statement.

A small note I'm doing this cause the listeners I'm using to target key presses are interfering with each other when, even when the actionscript is on different frames.

View 3 Replies

ActionScript 2.0 :: If Statement Frame Takes No Time?

Jan 16, 2009

I have a flash file that consists of a number of loops that play in series that allows me to change the duration of each part of the movie dependent on what is in the loop. Therefore loop 1 plays x number of times before moving on the loop 2 that plays y number of times and so on. I had worked out all my timings so that each loop last half a second. The number of times each loop plays is controlled by an if statement on the last frame of each loop. So far so good. In this main movie have another movie clip that runs independently of these loops and I noticed that although it was the same length as the main movie taking the loops into account, it would drift out of sync as the main movie progressed and looked as if it was running slow. However by tracing frame numbers of the two movies, I noticed that each time the main movie reaches on of the if statement frames although it appears to increment by one frame the other movie doesn't. By commenting out all the if statement frames both movie run in sync.

Therefore I conclude that a frame that controls the playhead position in this method does not actually last a full frame in duration, but jumps immediately to the new frame as soon as the command is encountered. Can I assume that this is constant and that frames used to move the playhead occupy no time in terms of the main timeline? Is there any documentation on this?

View 0 Replies

ActionScript 2.0 :: Referencing A Named Frame In An If-else Statement?

Dec 1, 2010

If I have a movie clip with named frames, can I reference the frame names in an if-else statement? For instance,

if (frame name = "frame1")
gotoAndStop.frame2;

etc. Is that doable?

View 5 Replies

Flash8 :: Trigger A Function From A Certain Frame?

Oct 6, 2009

I really just want to know how to trigger a function when my movie hits a certain frame.

I made a very simple flash show to try to illustrate my problem a little more clearly. I have a green and a gray button. Using the 'switch_buttons' command I turned the gray button invisible at the beginning. What I then want to happen is that on the 10th frame the green button will become invisible and the gray button will appear. But I haven't had any luck. It seems like I need to call a function to switch the buttons somehow.

View 3 Replies

ActionScript 2.0 :: 'If' Statement' - Goto Another Frame When Click A Button

Jan 29, 2006

I need help with the 'If' statement I want it so when i click a button till the socre gets to 5 I want it to go to another frame.

View 8 Replies

ActionScript 2.0 :: Flash8 OnInterval With IE - Not Going By The Time Frame

May 14, 2009

Im using a onInterval at a very high speed or you could say, with a very short delay. In IE the onInterval is not going by the time frame i set and is running extremely slowly. In all the other browsers the onInterval is working fine and runs the code as fast as i require. I found a post on another forum but that person had no luck with this issue as well.[URL] Is there a alternative way to call functions at a fraction of a second?

View 1 Replies

ActionScript 2.0 :: Flash8 First Frame Is Shown After Movie

Jun 11, 2009

I have little and easy flash Only problem is - after the last frame of flashmovie should open new file/location (this time index2.html) but before that it dows the first frame is shown for a moment again. [URL]

Flash is built easily:
1st frame with action "stop();"
2nd - 34th with action "play();"
35th - with action getURL("index2.html", "_self");

View 1 Replies

ActionScript 2.0 :: Flash8 - Put The Script On The Button (not The Frame)

Sep 4, 2009

im creatung a sort of virtual tv in flash 8, and ive come across a problem-0 I'll try to put this as simply as possible- picture a black square on frames 1-5, and a white square on frames 6-10. I need to be able to push a button, and if its on frame 1, to go to from 6, and if its on frame 6-10, to go to frame 1 (and stop) If possible id like to put the script on the button (not the frame)

View 2 Replies

Flash8 :: Remove OnEnterFrame Upon Frame Change?

Sep 21, 2009

I am using an AS to create a 3D Carousel gallery. I have button on the same page as the carousel gallery. My problem is that when I click on the button and the frame is changed, the carousel gallery stays on top of my other pages. Hos do I remove this? I have attached the AS code for your reference.

Code:
stop();
var numOfImages:Number = 5;

[code]......

View 2 Replies

Flash8 :: Changing Frame With Arrow Keys?

Oct 28, 2009

Is there a way to make it so that when you press the right key your animation/game goes forward a frame and when you press the left key it goes back a frame? I have a pretty minimal knowledge of actionscript so I'm not exactly sure how it would be done.

View 2 Replies

Flash8 :: Store And Recall Frame Numbers?

Nov 11, 2009

Is there a way to store the number of the frame currently playing in actionscript, and then recall that frame number later?

View 1 Replies

ActionScript 2.0 :: Flash8 : Getting A Pause Between Playing The First Frame And Then The Other?

Dec 15, 2009

I have frames with bits of audio. I'd like to click on a button (movie clip) and have audio from 2 separate frames play. Trouble is, they play on top of each other. What I need is a pause between playing the first frame and then the other.

Basically it looks like this:

Code:
gotoAndPlay(3);
// NEED TO PAUSE HERE ABOUT 750ms
gotoAndPlay(4);

View 2 Replies

Flash8 :: Make 4 Frame Looping Banner Ad Under 40k?

May 4, 2010

I have to make a banner ad for my company's website that is 4 frames. It needs to play each frame about 3-4 seconds and then loop after 4th frame and continuously do so. It needs to begin this process when the web page is brought up without the user doing anything to it (so no clicking)And I have to keep it under 40k.I've found alot of tutorials for using external swf files and images but everything seems to use a button and I can't seem to get the coding down at all.

View 3 Replies

Flash8 :: Creating A Movieclip On The Frame With A Click?

Sep 18, 2010

Say that i have a variable called explosion when this variable is set to yes i'd like it so that whenever you press the screen with the left mouseclick it "creates" a movieclip where you clicked that in the library is named bomb (or duplicate the movieclip from off screen if that is easier)

View 2 Replies

Flash8 : Changing Frame With Arrow Keys?

Mar 12, 2010

Is there a way to make it so that when you press the right key your animation/game goes forward a frame and when you press the left key it goes back a frame? I have a pretty minimal knowledge of actionscript so I'm not exactly sure how it would be done.

View 2 Replies

ActionScript 2.0 :: If Statement - Start At One Frame And Play To It Then Stop Then When Click On It Again

Jul 3, 2006

I have a animation in my loader_mc that I want to start at one frame and play to it then stop then when you click on it again I want it to play from a certain point. But what is happening is that it will initially do everything it is supposed to but than mess up after the initial 2 clicks. Check out the onRelease event and you will see what I am currently trying to do. [URL]

View 2 Replies

ActionScript 2.0 :: Conditional Statement - Once The Puzzle Is Complete You're Taken To A Specific Frame?

Jul 30, 2008

I'm currently working on a puzzle. The objective of the puzzle is to place the numbers in order from 1 - 10. Once the puzzle is complete you're taken to a specific frame.However, I want to be able to go to 1 of 2 frames depending on how long it takes to complete the puzzle.Each number has the following code:

on (press) {
startDrag(this, true);
}
on (release) {[code]....

View 2 Replies

ActionScript 2.0 :: Flash8 Cannot Stop Movie Preloading Before Frame 1

May 21, 2009

I have an as2 slideshow project that has 3 images that are accessed form the library. The movie consists of 3 frames 1) preloader 2) blank 3) slideshow script and some stage elements. All these images have been exported for AS and exported for frame 3.

Even so the preloader in frame 1 still only flashes up on the screen briefly before the slideshow starts. I have also set the flash publishing to "export frame for classes: 3" as I have read that this may help. This still does not help.

The SWF file is around 1.3MB in size and virtually all of this is being loaded prior to the preloader as the bandwidth profiler reports.

I have attached a link to the CS3 fla file in zipped format so you may test this for yourselves and possibly help me figure out what I am doing wrong.

[URL]

View 4 Replies

ActionScript 2.0 :: Flash8 - Recall A Variable From A Previous Frame?

Dec 29, 2009

Is there a way to recall a variable from a previous frame? I have a variable that was mathematically calculated in frame 3, that variable was then used in a dynamic text field. The problem I am facing is that the text field then disappears in frame 4. The only solution I can think of is reposting the text field in frame 4 but I am having trouble recalling the variable from the previous frame.

View 4 Replies







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