ActionScript 2.0 :: CS3 On Variable="Correct" Go To Frame 147?

Feb 24, 2010

I have the following code which basically drags this circle around and if put on the right symbol "bow", then variable answer1="Correct" and this is displayed in a dynamic text field.

Now I also need to make it so if variable answer1="Correct", in other words if the circle was dragged to the right location, to go to frame 147 or just resume playing. I don't care about what happens to the dragged circle afterwards. I'm using the following code:

[Code]...

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Whats The Correct Syntax For Declaring A Variable Thats Name Changes According To A Different Variable

Dec 21, 2007

I'm trying to do something like this:

[Code]....

whats the correct syntax for declaring a variable thats name changes according to a different variable.

View 2 Replies

FLA To MOV - Unable To Get The Correct Frame Rate?

Dec 22, 2009

I have a problem exporting a flash movie to a Quicktime movie with the correct frame rate. When I try to transfer it to a DVD that will play in loop, the video is jerking. I really need to get a 30 fps video.
 
I'm using Flash CS3 on Mac OS X. I built my flash animation with photos and text only (no SWF or movies linked or embeded, no actionscript, no sound, one scene only). The frame rate I specified in my flash movie is 30 fps. My scene format is 1360 x 768 pixels (16:9).
 
I need to export my flash movie in an almost uncompressed format to bring it to a DVD.

[Code]...

View 2 Replies

ActionScript 2.0 :: Going To The Correct Frame W/ 2 Scenes?

Apr 23, 2007

I have two scenes, 'Preloader' and 'Scene 1The preloader works fine. It is when I want to go to a frame using gotoAndPlay that the problem exists. The preloader is only 2 frames long.The frame I want to goto is frame 40 in 'Scene 1'All the buttons will do this, but for this examples use he "Resume" button on the swf files.if I use _root.gotoAndPlay(40) it will go to 2 frames prior to the one I want. I.e. Frame 38 in Sceneif I use _root.gotoAndPlay("Scene 1", 42) it does nothing as well.if I use gotoAndPlay(40) it does nothingif I use gotoAndPlay(42) it does nothingif I give the frame a label and use that label such as _root.gotoAndPlay("Resume") it will have the same behavior as _root.gotoAndPlay(40), however on the second click it will go to the correct frame. As in here: "resume" once and it will go to the contact info, click it again it will go to the correct frame. Click it a third time and it will go back to the incorrect frame.

if I use _root.gotoAndPlay(42) it works and goes to frame 40, but if that button is clicked a second time it will go to 2 frames after the frame I want. Here ttp://www.blackonyx.net/ Click Resume once it goes where I want. Click it again and it goes two frames ahead and starts to play, which isn't what I want it to do.

View 2 Replies

ActionScript 2.0 :: Correct Syntax For Declaring A Variable Within A Loop?

Mar 25, 2007

Whats the correct syntax for declaring a variable within a loop? Something like this:[code]

View 1 Replies

Professional :: Navigate To One Frame Or Another Depending On Whether There Is A Correct Or Incorrect

Jul 13, 2010

how to navigate to one frame or another depending on whether there is a correct or incorrect answer for the learning interaction. I am using the CS3 drag and drop.

View 2 Replies

ActionScript 2.0 :: Adding A Variable To A GetURL Line (correct Way To Code It)?

Jun 13, 2006

all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable

View 3 Replies

Actionscript 3 :: Correct Way Of Making Variable Accessible To A Child Class / Object

Mar 4, 2011

When you initialize a new object, how can that class have access to a variable from the parent?In this case Blob needs to be able to access scale?[code]

View 2 Replies

ActionScript 3.0 :: Event Listeners Disappearing - Movie To The Correct Frame That The Corresponding Content Is On?

Feb 23, 2010

I am using Adobe Flash Professional CS4 with all the latest updates. The FLA is an Actionscript 3.0 file. I am creating a basic flash site with several pages that change when the user clicks links on a left side navigation bar. on the pages are sub tabs that change out different content(text) based on what the user clicks on the current page. when they click a button it triggers an event listener, the event listener runs its function which changes the definition of an already defined (String) variable, and the page goes on to a frame checks what that variable is and then leads the movie to the correct frame that the corresponding content is on.

here's the issue: it works perfectly the first few times, and then the event listeners stop working, first one of them, then all three once i click one of the two available. i started this site before i even knew what a class was(regretably), and all the code is on the timeline in different frames.

[Code]...

View 2 Replies

ActionScript 2.0 :: F5 - "If The Variable Is Correct AND If It Is Dropped On The Target (g_target) THEN Play The Movie?

Nov 7, 2002

I have an if like this:

on (release) {
stopDrag ();
if (_root.go_blue._droptarget == "/g_target")[code]...

This works. I need to add "if (test = "one")", another drop sets this variable and the drop above should test for it. But I can't get the basics right! I'm a programmer who is new to Actionscript. What I want is:

"If the variable is correct AND if it is dropped on the target (g_target) THEN play the movie, ELSE go back to _x=130, _y=300."

The variable is being assigned correctly, I tested it with a Dynamic text box. The movie isn't running with my code!

View 1 Replies

ActionScript 3.0 :: Basic Buttons - Advance User To Correct Frame Labels And Stop

Sep 13, 2010

I have a flash site that has a presentation page it has a menu of two buttons (1) to take you to a slide show and (2) that takes you to the gallery. These are the only two buttons that seem to work in control test movie, I get no errors. The only button that is connected is the slideshow button (I haven't done the gallery yet). This button takes you to frame two. Where I have the main website. It has its own menu that spans across the entire website which is 25 frames.

Each frame represents a new page. I have mini menus at frames 3, 5, and ten. That are supposed to just advance the user to correct frame labels and stop. The only buttons that work are the ones in the first frames. The rollovers appear to work on all the pages when I advance the movie using the [ . ] key but I get no trace statement which means that it is not being acknowledged, all my buttons are named properly I believe so here is the code as well, all is in frame one:

stop();
//handle events for buttons...
Gallery.addEventListener(MouseEvent.CLICK, clickSection);
Home.addEventListener(MouseEvent.CLICK, clickSection);
Location.addEventListener(MouseEvent.CLICK, clickSection);
Guest.addEventListener(MouseEvent.CLICK, clickSection);
Lodging.addEventListener(MouseEvent.CLICK, clickSection);
[Code] .....

View 10 Replies

Professional :: Animating Step Through One Frame At A Time And Move The Linkage Rod And Piston Into The Correct Position

Dec 19, 2010

how to animate a piston like the one above in flash cs5? Should I use bones? if so how? At the moment the only way I can see to do it is to step through one frame at a time and move the linkage rod and piston into the correct posistion.

View 2 Replies

ActionScript 3.0 :: Get The Depths Of All The Blocks To Be At The Correct Levels At The Correct Times

Dec 30, 2009

I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?

View 4 Replies

Actionscript 3 :: After Shuffling Array - Variable = Array[index] Gives 0, Trace(array[index]) Gives Correct Number

Aug 16, 2011

I think it would be simplest to explain it like this:

[Code]...

View 1 Replies

ActionScript 3.0 :: Pass Variable From Frame 1 Throughout Swf?

Jun 24, 2010

How do I pass variable from frame 1 throughout a swf? - Including all later frames and their children?

View 3 Replies

ActionScript 2.0 :: If The Movie Is On Frame 4 For Example, The Value Of The Variable Would Be 5?

Aug 16, 2007

what I am trying to accomplish is:

-declare a variable

-give that variable a value based on the frame number the movie is currently on

-then add 1 to that variable

so in effect, if the movie is on frame 4 for example, the value of the variable would be 5. The code is in a button, that controls a MC that is on the stage (it doesnt interact with the _level0 stage, just the MC its in, its for a scrolling menu)The code Im trying to use is

var scroller = _currentframe +1;
on(release){
gotoAndStop("scroller");
}

View 4 Replies

ActionScript 2.0 :: Movieclip Frame As Variable?

Jul 9, 2008

how do i get the currentframe of a movieclip being displayed as a variable in flash

View 5 Replies

ActionScript 2.0 :: Set The Value Of A Variable And Then Retrieve It In Another Frame

Mar 26, 2009

how I can set the value of a variable and then retrieve it in another frame. To put this into context, I would like to dynamically load an external text file for different restaurant menus - depending on which button is clicked. I.e. Mains >> "mains.txt". What I have so far in the dynamic text box AS is the following:

[Code]...

View 2 Replies

ActionScript 2.0 :: Different Frame Numbers Depending On The Variable?

Mar 25, 2009

I am having problems with this if else statement. I have a variable (frame number 30) passing into my swf from another swf. This I know is working correctly.

But - I need to be able to direct to different frame numbers depending on the variable, this is working.

But when I place this code:

[Code]...

View 2 Replies

ActionScript 2.0 :: MovieClip To Go To Certain Frame Based On Variable

Jun 17, 2011

I am building a very long and detailed flash training program. I need to get a MovieClip to goto a certain frame based on the value of a variable that is defined on a keyPress.

Here is the code:
fscommand("trapallkeys", "true");
trace(nmhho);//show the value every time this frame loads
if (nmhho == 1){
Nav_Mode_Hdng_Hold_Override.gotoAndPlay(2);
}else if (nmhho == 0){
Nav_Mode_Hdng_Hold_Override.gotoAndPlay(1);
[Code] .....

The MovieClip in question is "Nav_Mode_Hdng_Hold_Override" "nmhho" is a number variable that is already defined and set to 0 initially, on keyPress of 9 it changes to 1, and when u press it again it changes back to 0, the problem is that when the page loads the "IF" statement at the beginning does not tell the movieclip to go to the proper frame.

View 1 Replies

Accessing Variable From Frame With Button In Flash

Mar 24, 2011

I am a beginner in Flash development and I was just recently assigned to fix an old Flash project at my work. Essentially, the application is a video booth whereby users can record up to 60s of video via their webcam and then share it either via email, twitter, or facebook. When the application is started, a video ID is generated, and that is used as the video's file name when it is streamed and saved to the server. I am sure there is a better way to do this, but the way I came up with is to grab that video ID and pass it to the "Share" page as a URL variable, and then use that to access and share the video from the server. How I can access the video ID from the button that is sending the user to the "Share" page.

Here is the code:
var nc:NetConnection = new NetConnection();
var ns:NetStream;
var cam:Camera;
var mic:Microphone;
var vidId:String = configName();
function tracer(p_s) {
[Code] .....

View 1 Replies

ActionScript 3.0 :: Calling A Variable (tween) From Another Frame?

Jul 29, 2009

This is my first time working with flash and actionscript. when my project increased in size, it became frustrating to look through 2 or 3 hundred lines of code to find my mistakes. I decided to code in frames, so that one animation or movieclip could be handled by each frame, making it easy to edit each individually. So far so good, but i am trying to reuse a tween from an earlier frame, and it doesn't seem to work. I was under the impression that if you define a variable in a previous frame, you can use it in a later frame.

here's what it looks like

(frame 5)
var closeMenu:Tween = new Tween(mainMenu_mc, "x", Strong.easeOut, 238, 900, 3, true);

there is a frame in between that does: gotoAndStop(20);I want the animation to start right when it gets to frame 20:

(frame 20)
closeMenu.start();
TypeError: Error #1009: Cannot access a property or method of a null object reference.

I can copy and paste the original var and change the name from closeMenu to, say, closeMenu2 and it will work fine, but I feel like what I did should work.

View 0 Replies

ActionScript 2.0 :: Goto Frame Based On Variable?

Apr 8, 2011

The website I am currently making is quite dark so before the user enters the website I want them to drag a slider until text onscreen is a suitable brightness then when they click enter to continue into the site I need the background mc to go to a frame relative to where the slider was.

[Code]...

View 0 Replies

ActionScript 3.0 :: Get Variable To Goto Button Frame

Sep 15, 2011

I'm pretty new to AS3 but I want to get my buttons to play the same movie then go to their button function. i.e., Picture button > play movie (same as all buttons) > picture frame.

This is the code on my buttons
ActionScript Code:
stop();
import flash.display.MovieClip;
import flash.events.MouseEvent;
var currentButton:String;
[Code] .....
Then at the end of the movie I tried using a variable to link the button to its frame

ActionScript Code:
stop();
if (currentButton == name) {
content.gotoAndStop("music");
} else if (currentButton == name) {
content.gotoAndStop("book");
} else if (currentButton == name) {
content.gotoAndStop("stereo");
}
I know the scripts messed up but not sure I really get the variable thing as yet.

View 2 Replies

ActionScript 2.0 :: Change A MC's Frame Based On Variable?

Jan 14, 2012

I have a very weird idea, but i can't make it work.

Theres a Movie Clip, called "bar"

And there's a variable called "Points"

Whenever we get 2 points, the MC called "bar" is moves 1 frame.

To summarize: Whenever variable "points" increase by 2, "bar" MC's frame increase by 1.

View 4 Replies

Actionscript 3.0 :: Using A Variable That Gets The Frame Label Which Is The Same As The File Name?

Aug 31, 2010

I am trying to load external files from flash but I also need to do it using a variable that gets the frame label which is the same as the file name something like:

var myVariable:String = frame.get(framelabel);

and then use this code each time I get to a different frame label to load an external file for example when I am on frame "Boy", It loads Boy.jpg or Boy.txt -

View 3 Replies

ActionScript 2.0 :: GotoAndPlay(frame); Depending On A Variable From Php?

Apr 28, 2004

I have set the variable in my page using <param name="flashvars" value="menustate=<?php $pagename; ?>"> which works perfectly fine when I use a dynamic textbox in flash with the var name menustate.

But I need to send a MC to frame 2 if 'menustate = 2'. Anyhow, I just want to know how to control a MC with an external var. I can't use loadVars () because this var is coming from any page, not just one.

View 5 Replies

ActionScript 2.0 :: Global Variable To Be Accessed In Other Frame?

Jul 26, 2006

i wonder is this correct to creare a _global.variablename which can be use in all of the frames exist? such as in the frame 1, i declare one, and does this global typed variable can be accessed in frame 10?

View 2 Replies

ActionScript 2.0 :: Get Frame Number And Pass That As Variable?

Jul 29, 2007

Is there a way to get Flash to know what frame it's on and pass that as a variable? I can't use counters because I'm using a random frame function.

View 3 Replies

ActionScript 2.0 :: Goto Certain Frame When Variable Hits 0

Jul 15, 2008

This doesn't work
if (lives <= 0) {
gotoAndStop(22);
}
When I change the "<=" to something like "!=" it does work. I'm trying to make it go to a certain frame when the variable hits 0

View 8 Replies







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