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


Similar Posts:


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 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 3 :: Counting Number Of FlashVars Before Entering If Statement

Jul 11, 2011

I am creating a simple image viewer using AS3 and getting image URLs from flashVars in the HTML. I want to use an if argument to have it perform one function if there is only one flashVar and another if there are more. I have it reading the flashVars fine and can write if statements all day long, the trouble I am having is counting the number of flashVars being passed from the HTML.

var numberOfVars:Number = 0; // to store the number of flashVars
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; //get the flashVars
for each (paramObj in LoaderInfo(this.root.loaderInfo).parameters){
numberOfVars + 1;
} var tf:TextField = new TextField();
addChild(tf);
[Code] .....

View 3 Replies

ActionScript 3.0 :: Listen For The Frame Number And Display Current Frame?

Nov 17, 2009

I have tried this a dozen different ways and I really am at my wits end.

I have a presentation that works like a powerpoint. Everything is working as it should, except one part. I have a movie clip with an instance named slides, and I want to actively display which frame number you are in this move clip.

I have tried more than one why but I see no reason why this should not work:

var frameNum:Number = this.slides.currentFrame;
this.frameText.text = "P�quina " + frameNum + " de 173";

It appears to work at first, but does not update when I navigate the slides. It constantly says 1. Before I just added a function to the back and next buttons to frameNum++ and frameNum--, but after I created the Menu I would prefer it to automatically detect what frame it is on.

View 4 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

ActionScript 3.0 :: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference At "frame Number:raw Number"

Oct 11, 2009

I created the following AS for a particular frame

Code:
cnx.addEventListener(CNXConnection.DIGITAL, onDigital_10);
function onDigital_10(e:DigitalEvent)
{

[code]....

While debugging everything works properly if I'm testing that frame.But, pushing a button in another frame, I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference at "frame number:raw number"

I'm quite sure that the problem is that the variable e.Join changes its corresponding e.Value pushing a particular button in another frame (as must be). Any ideas how to link that information to the frame that create the error?

View 1 Replies

ActionScript 2.0 :: Finding Frame Number Of Frame Label?

Jun 20, 2007

is it possible to find the frame number of frame label with AS if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.

View 5 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 :: [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

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

Actionscript 3 :: Get The Frame Number Of A Frame Label?

Jan 31, 2011

Is there a simple way to get the frame number of a frame label?

View 2 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 :: 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 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 1/2 :: Execute Code In Previous If Statement If Second If Statement Is Executed?

Aug 31, 2011

if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code

[Code]...
 
I dont want to copy the code from the first into the second and the first and second into the third.
 
My mind isn't working and there is probably an extremelly simple way to get this working.
 
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.

View 7 Replies

ActionScript 2.0 :: Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails?

Oct 10, 2008

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) {

[code]....

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.

View 1 Replies

ActionScript 2.0 :: Get Frame Number By Name?

Aug 16, 2009

If I know a frames name, is it possible to get the frame number from the frame name?[code]...

View 9 Replies

AS3 :: Display Current Frame Number?

Jan 9, 2009

I feel like such an idiot but after trying endlessly I still haven't managed to come up with a way to display the current frame number of nested movie clip ("ecke1") (in a dynamically created text field).The problem really is that I don't know how to have flash keep updating the variable. Here's my latest attempt:

Code:
var frame:int = 0;
addEventListener(Event.ENTER_FRAME,updateframe,false,0,true);

[code]....

View 4 Replies

Make Something Happen On Frame Number?

Oct 12, 2010

I want to change the text of a dynamic text box based on the frame number. Something like this:

Code:
if (_currentframe > 222 && _currentframe < 2222) {
txtMessage.text = "Pump turned on";
}else{[code]......

But this doesn't work.

View 2 Replies

ActionScript 1/2 :: Get Frame Number Of A Label?

Sep 17, 2009

Is it possible to find out the first frame of a label without going there then put it in a variable in AS2 or AS3?

View 2 Replies

ActionScript 3.0 :: Get Frame Number Of Its Label?

Dec 11, 2009

Is there a simple way to get the frame number of a frame label?

I have a bunch of labels on a long timeline, but want to create some calculations based on the number of frames between labels.

View 2 Replies

ActionScript 2.0 :: [mx] Get Frame Label's Number?

Dec 19, 2003

I would like to use a conditional to determine if my location is before or after a frame.However, to make it portable I would like to base it on the label name.e.g.

if (_currentframe < "p2")

however, "p2" is the label of a frame.So how do I get the frame number from the frame label? I am making something that when it detects a click, jumps to the next point in the movie. These P1,P2, etc. will be distributed through the movie.

'if jump detected'{
if (_currentframe < "p2"){
gotoAndPlay("p2");
} ELSE IF (_currentframe < "p3") {
gotoAndPlay("p3");

I guess the problem with this is what if the one of the movies isn't as long and doesn't have a "p4" location for example.Probably I can handle this case when I am setting up the variables that contain the frame number of "p2", "p3", etc... checking agains the max number of frames.

View 1 Replies

ActionScript 2.0 :: How To Address Frame Number

May 7, 2006

I dont know if it sound stupid if i ask this kind of question as i really dont know how to address frame number below is the code, i have movie clip, i set a condition tat if apple equal true and also if the movie clip inside the movieclipball's frame reach frame 25, the movie will play.[code]

View 1 Replies

ActionScript 2.0 :: Can A Rollover Go To A Different Frame Number

Nov 5, 2007

Can a rollover go to a different frame number...

View 2 Replies

IDE :: GO To Frame Number After Video Is Finished?

Feb 27, 2009

The first Scene of my movie has a video that is streaming on frame one what i would like to have happen is once that video is completed then the flash takes you to the next scene of a specific frame Number.

View 3 Replies

ActionScript 3.0 :: EventListener For Frame Number?

Mar 15, 2010

I am making a website, I have a loaded swf that I want to animate off screen AND THEN unload on a button click, the home button in this case. I have had a shot at making this happen but to no avail.This is the code I have, which currently doesn't work. The function 'frame30' does not fire. I have annotated it so you can see what works and what doesnt.[code]

View 1 Replies







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