ActionScript 3.0 :: Target A Specific Instance Name Based On What A Variable Is Equal To?

Jul 12, 2009

any way to target a specific instance name based on what a variable is equal to? would be ALOT better than having to write the function 36+ times..

View 19 Replies


Similar Posts:


ActionScript 2.0 :: Random Number That Is Not Equal To Two Specific Values?

Feb 14, 2005

What is the best way to find a random number that is not equal to two specific values?

1) find random number (let's say from 0 to 5)

2) check if the result is not 4 or 5

3) If it is, run the random function again and again until the condition is met.

Or maybe there's a way to set up that at once (find random number that is not equal to 4 or 5).

View 2 Replies

ActionScript 2.0 :: Find A Random Number That Is Not Equal To Two Specific Values?

Feb 14, 2005

find a random number that is not equal to two specific values? ex:

1) find random number (let's say from 0 to 5)

2) check if the result is not 4 or 5

3) If it is, run the random function again and again until the condition is met.

Or maybe there's a way to set up that at once (find random number that is not equal to 4 or 5).

View 2 Replies

Target A Specific Frame In Specific Movie Clip?

Dec 3, 2009

I have been doing really well figuring everything out up until now.[code]How it stands, what is this link pointing to? Can I make it target a specific frame in a specific movie clip?And if someone would be so kind and explain what this is saying in 3rd grader terms.

View 3 Replies

ActionScript 3.0 :: Check When Variable Is Equal To A Set Of Values?

Apr 21, 2009

Is there a way to write an "ANY" conditional statement? For example, I want to write an IF statement that if the user presses ANY of 10 specified keys, I want to execute the same bit of code.However, the only ways I know to accomplish this is by

1) writing a switch statement, which seems unwieldy because I'll have 10 separate cases which all duplicate the same [code]...

Is there a better/faster/more efficient way to check if a variable is equal to ANY of a set of values?

View 5 Replies

ActionScript 2.0 :: Variable - Get The Literal Value To Equal An Expression?

Feb 3, 2004

[Code]...

My dynamic text box is set to: _root.selectedcolor but instead of displaying "Rose" it displays"_root.fabric01_chip10_name" Basically I need to get the literal value to equal an expression- how do I do this????? I've done this before, but it's slipping my mind.

View 6 Replies

ActionScript 2.0 :: Make A Variable Equal Two Movieclips?

Sep 2, 2004

Can I make a variable equal two movieclips? Like:

nav1 = _root.nav.nav1 & _root.map.map1;

And then run a function that would control both? Like:

function closeout() {
nav1.gotoAndStop(3);
}

View 6 Replies

ActionScript 2.0 :: Why Can't Set A Dynamic Text Field Equal To A Variable

Jul 26, 2004

I have a preloader. On one frame of the preloader is the code:

i++
loadtext = i;
emptyMC = "holder"+i
allimages._visible = false;
allimages.createEmptyMovieClip("holder"+i, i);
allimages[emptyMC].loadMovie("weddingsintro"+i+".jpg");

Everything works fine, but the dynamic textfield with the var name loadtext is blank. If i set loadtext = i+"loaded" then it just displays "loaded". I know the variable "i" has a value since the rest of the preloader works.

View 4 Replies

IDE :: Have A Button Evaluate Whether A Variable (textbox) Is Equal To A Number

Jan 14, 2009

In the attached CS4 file I have attempted to have a button evaluate whether a variable (textbox) is equal to a number. If so, I want another textbox to say "correct" or trace "correct" either way. However, it doesnt appear to be evaluating the variable. I receive the "correct" trace everytime the button is released.

I tried to upload the file but it is too large. The code in the button is as follows:

on (release){
if (phoneNumber == "911");
trace ("correct");
}

I have a textbox entitled numbers, in which the user presses buttons and the number is added to the textbox. The same textbox has a variable assigned to it entitled phonenumber. When the talk button is pressed the code above should check the variable to see if it == 911. However no matter what I enter into the textbox, the trace always pops up and says correct.

View 2 Replies

ActionScript 2.0 :: Can't Set Dynamic Text Field Equal To A Variable?

Jul 26, 2004

I have a preloader. On one frame of the preloader is the code:[code]Everything works fine, but the dynamic textfield with the var name loadtext is blank. If i set loadtext = i+"loaded" then it just displays "loaded". I know the variable "i" has a value since the rest of the preloader works. Anyone know whats wrong?

View 4 Replies

ActionScript 2.0 :: [MX2004] Img_n Variable To Be Equal To A Text Value?

Mar 8, 2005

I need the img_n variable below to be equal to a text value when hover_n equals different intergers.

img_n = ("i"+hover_n+"_caption");

For example, if hover_n=23, then img_n = i23_caption;

Is there a text equivalent to eval() or something that can return this value?

View 4 Replies

ActionScript 3.0 :: Combine Multiple Variable Names Together To Target New Variable?

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).

My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.....)

I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.

Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)[code]...

View 2 Replies

Actionscript 3 :: Combine Multiple Variable Names Together To Target New Variable

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).

My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.....)
I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.
Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)

So my buttons as well as loading the image have the event listener:

image1_btn.addEventListener(MouseEvent.CLICK, setCurrentSelection);
image2_btn.addEventListener(MouseEvent.CLICK, setCurrentSelection);
(and so on..)
function setCurrentSelection(e:MouseEvent):void {

[Code]...

So within the rotateClockwise and rotateAntiClockwise functions i need to be able to recognise which is the currently active loader and have that number instead of the X - so if it is image1_loader - it needs to be image1_content, if 4 - image4_content... I had tried to do it as this but it doesn't like it being a string:

rotateAroundCenter((activeLoader+'_content'), 10, ptR);

View 3 Replies

ActionScript 3.0 :: Combine Multiple Variable Names Together To Target New Variable

Jan 31, 2012

I'm still learning flash and actionscript 3 and i am having trouble with variable and object names. I need to be able to combine variable names together (in the same way as php can combine by doing var1.var2).My swf contains 4 loaders (image1_loader, image2_loader etc..) which are a child of (image1_content, image2_content etc.)I then have 4 buttons which load an image into the loader and while doing so they define the currently active loader.Finally i have 4 control buttons - scale up/down and rotate clockwise/anticlockwise which should only control the currently active loader (as set by the buttons above)So my buttons as well as loading the image have the event listener:[code]So within the rotateClockwise and rotate Anti Clockwise functions i need to be able to recognise which is the currently active loader and have that number instead of the X - so if it is image1_ loader - it needs to be image1_content, if 4 - image4_content.I had tried to do it as this but it doesn't like it being a string:[code]

View 3 Replies

Actionscript 3.0 :: HitTestObject On Specific Target?

Jul 29, 2010

I got this rectangle_mc such that when I drag it to either the mask1_mc or mask2_mc, it will load movie_mc and plays it on the specific mask. But there's something wrong with my code.Here's the code:

Code: Select allimport flash.display.MovieClip;
var movie_mc:MovieClip = new movie();
rectangle_mc.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);

[code]....

View 3 Replies

ActionScript 3.0 :: Target Specific Movieclips In An Array?

Nov 16, 2009

I did this:

Code:
var mc_array:Array;
mc_array = new Array(3);
mc_array[0] = mc1;

[code]....

I want to use arrays to shorten things, but I don't know how to get and set the properties of individual entries of the array (with a mouse click).

View 2 Replies

ActionScript 3.0 :: Impoting Swf, Target Specific Frame?

May 14, 2010

this code retrieves my swf file ("home"), but can I send it to a specific frame (or label)?

[Code]...

View 4 Replies

ActionScript 3.0 :: Target A Specific Button Set Up From Loop?

Jan 30, 2011

I'm working on a small project right now, and it consists of three toggle buttons that control various displayed data. I'm trying to make another toggle button, that once selected, will set the three existing toggle buttons to their "on" state. I'm pulling my hair out trying to target these individually through a loop. I'm currently working in the "//Begin Turn All On" section.

Code:
//New Button Collection Embedded in Movie Clip mc"buttonCollection"
var myBtns:Array = [buttonCollection.button1,buttonCollection.button2,buttonCollection.button3]; //Put all your buttons here

[Code].....

View 1 Replies

ActionScript 2.0 :: Target Specific Frame From External Swf?

Oct 21, 2004

What is the best way to target a specific frame from an exterally loaded swf?

View 3 Replies

IDE :: Use A Hyperlink To Target A Specific Movie Within A Website?

Jan 14, 2010

I have a all flash site that has several FLV's that people can click on called Green Solutions, Home Control, Temperature Control. My client wants to know if its possible to put a hyperlink in a email to his clients that would directly link them to any one of those videos. I assume I need to pass a variable of some kind but I am at a lost of where to start with this thing.

View 5 Replies

ActionScript 2.0 :: Target Specific Frame From External SWF

Oct 21, 2004

What is the best way to target a specific frame from an exterally loaded swf?

View 3 Replies

Flash :: Web Development - Not To Target 10 For A Browser - Based Game?

Oct 25, 2010

There's clearly a bunch of new stuff in Flash 10, I'm seeing a bunch in the Graphics class so far. Struggling a bit to reconcile it with what I know already but it looks useful - render lists and 3D transforms, etc - however I wondered if there are good arguments for targeting Flash 9 since I can definitely manage without all the new stuff I don't know. Like support on non-Windows devices, wide adoption of Flash 9 Vs 10, etc.

View 1 Replies

ActionScript 2.0 :: Target Mc In Specific Frame Of Main Stage?

Dec 9, 2003

I have two movie clips on the main stage: mcNav and mcContent1 (mcContent1 is located in the 2nd frame).

When I click btn1 which is a movie clip within mcNav, I want to go to the 2nd frame on the main stage where mcContent1 is located.

And then go to frame 10 within mcContent1 and stop.

Here's what I have:

btn1.onRelease = function() {
_root.gotoFrame(2).mcContent1.stop(frame 10);

View 2 Replies

Javascript :: Modify Link Target Within PDF Based On Operating System

Jun 28, 2011

We have an "application" consisting of a large number of PDF files that link to each other.

Some of the PDF files have links that must be a web URL when running on a PC (or a Mac) but need to open a specific application when running on an iPad.

When not on the iPad, the links look like "http://10.85.1.102".

When on the iPad, they look like "netcam4://2" - which opens the NetCam4 application with camera 2 selected.

NOTE: this is already working but we have to create two versions of the PDF and it would be much better to have only one.

Is there a way using JavaScript (or ActionScript or whatever) for the PDF to determine in which OS it is being displayed and modify the link appropriately?

We don't care if this decision is made when loading the PDF or when the link is clicked.

By the way, so far we have found that GoodReader on the iPad is the only PDF viewer that will properly follow links - including those to the NetCam4 app.

View 1 Replies

ActionScript 2.0 :: Target Things On My Main Stage Based On The Preloader Swf?

Jan 1, 2004

I have a looped sound and some components in my main movie (scroll bar) which for some reason is really bogging down my swf and causing the preloader bar not to show up until like 46% or something ridiculous.So I am trying to solve the problem by having a preloader swf as suggested by Kode in this thread. However, now all my targeting is messed up in my main movie. Everything that was _root has to change but I can't tell what to load it into. I tried using _parent, _parent._parent, _root.container_mc (which is a blank movie clip created in the preloader swf that main is loaded into after the preloader is 100%) and others but nothing works. Even the simple looped sound which was originally just _root.backsound.start(0,999) can't be targeted.how to target things on my main stage based on the preloader swf?

View 14 Replies

Professional :: TLF Target Instance Name From Class

Jun 10, 2010

I am trying to target a TLF Textfield within a movieclip from that movieclips custom class, but the class can't find the instance name. When I trace out the child name it comes up with a random instance name, not the instance name I set on the stage. When I try and target it from the movieclip's timeline it works fine. Is there a class I need to include in my custom class, or is this a bug? I would love to move from dynamic text fields to TLF, but this is a big hurdle.

View 10 Replies

ActionScript 3.0 :: Create New Instance() When Instance Is A Variable?

Feb 12, 2012

I have a base class I've used on 6 different MC's. Then when I use these MC's my function runs an if statement to check which one to add.

if(id=design) var obj = new design();
if(id=team) var obj = new team();

I want to make it a bit more dynamic and use the id:String to evaluate which new instance to create.

ActionScript Code:
public function loadChapter(id:String):void {
var obj = new instance_of( id )();
}

View 5 Replies

ActionScript 2.0 :: When A Specific Variable Equals A Specific Value A Random Number Decreases On The Current Number?

Feb 20, 2008

i have a project and i need that when a specific variable equals a specific value a random number decreases on the current number, its easy to make it decrease but i need to decrease instead of 4 to decrease a maximun of 5 and minimun of 3.ere is the code :

Code:

numeroDeTazos = 20;
quantidade.text = numeroDeTazos;
if (nrfinal2 == 33)
{

[code]....

View 1 Replies

ActionScript 3.0 :: Dynamically Target Instance Names In It?

Sep 20, 2011

I've worked out a way to get the proper instance name in stored in a variable (called listName), and I've got a SOUND_COMPLETE listener applied to my sound channel. What I need to happen is, when the function called by the SOUND_COMPLETE event fires, the object on the stage with the instance name that matches the string currently stored is affected.[code]...

View 3 Replies

ActionScript 2.0 :: Go To Specific Frame Based On URL Address?

Mar 8, 2009

I need to have the ability to go to a specific frame in a timeline based on what the web address is. I basically want to play an intro for my index page only and skip to frame 30 for all other pages. Example [URL]

View 1 Replies







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