ActionScript 2.0 :: CS3 Using Variables Value In Variable.gotoAndPlay Instead Of Its Name?

Jul 19, 2009

for (var i=1; i<=arrayCount; i++){
var temp:String = "editremove_mc";
temp += i;

[code].....

View 2 Replies


Similar Posts:


ActionScript 2.0 :: URL Variables And GotoAndPlay

Jul 17, 2009

This is what I want to do:

- Pass a variable to a SWF. It can be 1, 2 or undefined.

- Read the variable and jump to a frame in the movie depending on the value.

[code]I know flash reads the "URLvariable": I checked it by displaying in a text field... but the gotoAndPlay sentences doesn't work! Instead of it, Flash continues playing the timeline.

View 3 Replies

ActionScript 3.0 :: Variables - Have The Same Button In The Same Frame When Clicked Gotoandplay An Mc

Jun 25, 2010

this is so complicated i don't think i'll ever be able to do it a button is clicked to start the game which is all playing in the second frame of main timeline according to the maths for as3 but i need to be able to have the same button in the same frame when clicked gotoandplay an mc which exists in frame 3

View 9 Replies

String Variable With GotoAndPlay?

Apr 8, 2009

I am trying to go about a "smarter" way of setting up multi paged full flash sites. This has got to be something very simple that i can't seem to put my finger on.

I'm trying to create a variable called 'currentScen' that i can declare off the start and change depending on what page the viewer goes to in the site.

I could put a bunch of 'if' statements saying that 'if the current page is this page then do this, if it's this page do this' etc. for each individual page but i thought there must be an easier way.

I am trying to get the following to work:

Code:

// declaring what the starting page is
var currentScen:String = "welcomeMovie";
//function fading in called page with animation used on the 'over' frame label
function animateOn(page:String) {

[Code].....

View 1 Replies

ActionScript 2.0 :: Using Variable In GotoAndPlay?

Sep 21, 2005

Im working on a flash menu right now and I wan to create a dynamic gotoAndPlay. but I need to insert a variable into the target path right now here is what Im doing.

Code:
MyVar="FirstMC";
_root.Nav.MyVar.gotoAndPlay("out");

and right now Flash doesn know what to do with it... I would like to make this variable global also which is nothing more than throwing the _global command before my variable right?

View 2 Replies

ActionScript 2.0 :: On Release, Set Variable And Gotoandplay?

May 2, 2011

Haven't touched Flash in years... trying to do something simple, but it isn't working well. Guess I'm REALLY rusty. I have a flash video with 3 button. Initially, I set a variable (frame 2)

Code:
var x = 0; Then I have the 3 buttons. One of the buttons has the following code (the two other buttons have similar code, but set different variables)

[Code]...

View 4 Replies

ActionScript 2.0 :: Include A Variable In Gotoandplay();?

Feb 23, 2004

I try to include a variable in gotoandplay(); like:

on (press) {
gotoAndPlay(_root.strScene, 1);
}

it gives me an error and say it must be quted, i tryed everything and im sick of it and i will breack my pc

View 1 Replies

ActionScript 2.0 :: Write A GotoAndPlay With The Addition Of A Variable?

Nov 25, 2009

So I've defined my variable:_global.current = 1;And below i am accessing an MC called 'carousel_holder', which has an MC named 'bar' and inside this MC is a final MC named 'bar1'.So ive tested my path and can hard code it fine, so its not a paths issue but i think my syntax is incorrect:_root.carousel_holder+".bar"+current.gotoAndPlay(" start");

View 4 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 :: Write A If Statement That Will GotoAndPlay According To That Variable?

Sep 22, 2005

In my movie I load a swf to a movieclip with this code


PHP Code:

 _root.ImageViewer.loadMovie("deneme.swf"); 

Now can I do this? before calling the swf named deneme. When I press a button If I attain a number to a global variable with this code

PHP Code: on (release) {_global.myVar = 5;gotoAndPlay("CloseUpAnimation");} 

Can I read this variable from the swf which I load into my movie?If I can read how can I write a If Statement that will gotoAndPlay according to that variable?

PHP Code:[code]...

View 4 Replies

ActionScript 2.0 :: Coding GotoAndPlay Variable Enemie_life Drops

Mar 25, 2012

I have trouble with a script for my game project. I can't figure out what I'm doing wrong. This is the code I'm using:

[Code].....

Now, if the variable enemie_life drops to 0 (which I'm tracking with a dynamic text box) it just ignores frame 241 and continues with the second part of the code. There I have another problem: from my understanding (and the way I'd like it to be) it should give me a 3/1 chance to go to 126 and otherwise go to 181. The latter almost never happens. It seems more like a 100/1 chance (and I tried it often ...).

View 6 Replies

ActionScript 2.0 :: Variable Reaches 0 GotoAndPlay Frame 4 - Doesn't Work

Jul 12, 2009

When a variable reaches 0 gotoAndPlay frame 4

ActionScript Code:
//Variable Name: ammo
if(_root.ammo = 0;
_root.gotoAndPlay(4);

Doesn't work maybe?

View 1 Replies

ActionScript 2.0 :: Goto And Play Scene - _root.gotoandplay And Even Scene1.gotoandplay Won't Work?

Nov 9, 2007

For some reason i'm having problems swapping scenes in my flash movie. At first i put the action in a "actions" named layer and a link to a button. So basicly when scene1 loads the frame 1 action is "stop ();". The viewer clicks on button1 which has a code of;

[Code]...

View 1 Replies

ActionScript 2.0 :: Variable That Includes Other Variables?

Jun 16, 2010

So my problem is when I use this code in php:"&some=var1=aa&var2=bb&&";I would like to receive to flash:trace(myvars.some);var1=aa&var2=bb&But it won't work because flash thinks that always when there is & its new variable.So if I try to trace I get var1=aa

View 0 Replies

ActionScript 3.0 :: Store Many Variables In 1 Variable

Aug 3, 2011

Is it possible to store multiple variables of different types inside 1 object. It would be ideal to have a separate property for each variable, but not required. Is there a way to do this?

View 2 Replies

ActionScript 2.0 :: Creating A Variable Name From 2 Variables?

Jan 7, 2010

I'm trying to create a template for a drag and drop question. I want to assign which option belongs to the correct target.Each draggable option is called "drag1, drag2, drag3, etc.". (created on the stage) Each target is called "target1, target2, target3, etc." When a button is clicked, the correct answer is checked using a simple if loop and the user is told which ones are correct.

Code:
if (drag1._y = target1._y) {
//show if correct or incorrect

[code].....

View 1 Replies

ActionScript 2.0 :: Toggle All Variable, With Shifting Variables?

Jul 27, 2010

I am dynamically creating a bunch of buttons which each toggle their variable on and off, causing corresponding graphics to hide.I also want to have a toggle All on and off button that affects all the variables.I can't seem to get my head around the best approach to turning all the individual variables on/off when I don't really know what those variables will be yet, cause it will depend on how each version of this gets set up.

View 2 Replies

ActionScript 2.0 :: Check Which Variable Has A Certain Value Then Return Variables Name?

Jan 22, 2009

First of all sorry im not very familiar with the flash lingo, im still new to all this actionscript stuff

ok so i wrote this on a frame in the timeline[code]...

now i need to check which one from all these has a value of zero. then when it finds it i need it to tell me which one it is (s1x or s2x or s3x) so i can do stuff with it.

View 4 Replies

ActionScript 3.0 :: Compare A Single Variable To A Group Of Variables?

Dec 3, 2009

I'm trying to cut down the amount of code I type to complete a project. Using things like ?: and &&= over the typical if statements. Is there a way to compare a single variable to a group of variables? example...

var1==var2 || var1==var3 || var1==var4 ? doSomething : doSomethingElse;

is there a short way to check if var1==var2,var3,var4?

View 9 Replies

Flex :: Combining Variables To Form A Variable Or Class Name?

Mar 2, 2012

I have an embedded image and the class name to be userd in source tag is a combination of 2 variables, how to do this, below is an iadea of what i am trying to do:

[Embed (source="assets/image11_a.jpg")] public static const 11_a:Class;
var first_part:String="11";
var second_part:String="a";

and in mxml

<s:Image width="100" height="100" source="{first_part+second_part}"/>

above is just a small simplified example of what i am trying to do, actually the variables are getting populated from list.Basically i want to combine variable names to form the embedded image class name to be used in source of spark image.

View 1 Replies

ActionScript 2.0 :: Retrieving Variables - Call A Variable Declared In A SWF?

Jan 7, 2004

Can I call a variable declared in a SWF, and call the same variable into another SWF, when i am loading it using XML.I am declaring a variable in the "Child movie", and am loading this "Child movie" into a "Parent movie" using XML. Can I retrieve the variable declared in the "Child movie" in the "Parent movie".

View 1 Replies

ActionScript 2.0 :: Variables With Function - Makes A Variable Based On An MC's Name

Nov 23, 2004

I have some code that makes a variable based on an MC's name:

[Code]...

but it doesn't work, yet it traces "_level0.but1menu", and trying the function as this: _level0.but1menu.easeY(100) does work. I've also attached a mock up if you want to see what I mean. al input, this one seems weird to me - but I'm sure there is a completely logical explanation. I've used the same sort of idea to open external swfs with no issue.

View 1 Replies

ActionScript 2.0 :: Internet Variables - Change The Value Of A Variable On A Webpage

Nov 7, 2008

I have been using AS2 for a while now but am having some trouble when it comes to the internet side, I basically would like to be able to change the value of a varible on a web page or something and use this value on a different computer, like an mmorpg but it does not have to be that fast, I have looked around and am having trouble working it out, I know you can use servers and stuff but I don't want to have my computer running 24/7 so someone else can use it.

View 1 Replies

ActionScript 2.0 :: Sorting Variables And Returning The Variable Name And Data

Apr 12, 2011

There are 12 color variables, and each answer adds a number to each variable.At the end of the quiz, all the variables are put into an array, and sorted. Then the 3 highest variables are displayed. I have gotten this far. My problem is that I need to link the variable name (color) with the number it returns.[code]

View 2 Replies

ActionScript 2.0 :: Variables - Set Gek Variable To True When Mouse Hits Timeline?

Dec 18, 2003

I am using this code to communicate with an easing function:

[AS]
onClipEvent (enterFrame) {_root.gek = false;
for (var i = 0; i<18; i++) {
if (_root.timeline["copy"+i].hitTest(_root._xmouse, _root._ymouse)) { //set gek variable to true when mouse hits timeline[code]....

if "gek" is true then the easing function works and my little "easebar" moves to the mouse.Now, I want to be able to capture what i is when the mouse moves over it so that I can load an mc depending on where the easebar is.I thought I could declare a global variable (_global.j = 0) at the root and then set i to j and use j somewhere else. But i doesn't exist outside of the onClipEvent.

View 8 Replies

Flex :: Flash Builder 4: Variable Not Displaying In Debug Window (Variables Tab)

Dec 15, 2011

In my flex 3.5 project, I have a class (MyItem) extending Canvas. In this I have declared a private variable named itemInfo which is type of ItemInfo (which is another subclass of Canvas).

I wrote code to hide/show the iteminfo when the mouse is over/out of MyItem. I am not getting any error but it is not showing the itemInfo as expected, when debugged the code, surprisingly the variables tab in debug window does not have the variable itemInfo at all.

I have declared a dummy:int variable and it is also not visible.

View 2 Replies

ActionScript 2.0 :: String Variables - Consentrate A String To Call That Variable?

Mar 16, 2002

If i have an ASP page that is returning variables (and I can see them in the debugger) how do i consentrate a string to call that variable?

ie:
variables being returned are named:
"res1", "res2", "res3"...etc
for (var i = 0; i < 10; i++) {

[Code]...

View 4 Replies

ActionScript 2.0 :: Create A String Variable...and Then Use The Value Of That Variable To Declare Another Variable?

Jan 3, 2006

f you know PHP...then you know that you can create a string variable...and then use the value of that variable to declare another variable. like this:

PHP Code:

<?php$foo = "haha";$i{$foo} = "success";print $i{haha};?>

and it would display "success"...or like this:

PHP Code:

<?php$foo = "haha";$$foo = "success";print $haha;?>

and it would also display "success".

View 6 Replies

ActionScript 2.0 :: Defining Variables - Unique To Load SWFs Instead Of Declaring All The Variables

Mar 21, 2012

I have an empty SWF that's sole purpose is to call loadMovieNum and start the project. Each loaded movie has a few variables defined within them - unique to those loaded SWFs. Instead of declaring all the variables in each SWF can I declare all of them in one place, in the first frame of the empty loader it all starts from? I'm thinking I can then declare a variable which each loaded movie can increment as needed for me.

View 2 Replies

ActionScript 3.0 :: Variables True/false Custom Variables Work In Flash?

Aug 20, 2008

How do variables true/false custom variables work in flash?

For example, what I want to do is create a simple true=false variable that I can call on an if statement later.

For example:

Code:
Var1 = true;
if (!Var1)
{

[Code]....

I noticed that neither the "Var1 = true;" part or the if(!Var1) part worked in flash.

View 4 Replies







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