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


Similar Posts:


ActionScript 2.0 :: Remove All Movieclips When Not Equal?

Aug 1, 2008

trying to hide all submenu's when not equal to the current

Code:
function removeAllOtherMenus(mc) {
trace("remove movieclips not equals: "+mc);
for (var i = 1; i <=3; i++){

[Code]...

but it keeps tracing all subsubmenu_mc (that is subsubmenu_mc1, subsubmenu_mc2 and subsubmenu_mc3 when mc = subsubmenu_mc2)

View 1 Replies

ActionScript 2.0 :: Duplicating Movieclips & Placing Them With Equal Spacing?

Nov 10, 2005

how to duplicate a MovieClip 10 times using 'duplicateMovieClip'& place each instance of the new clip with equal spacing when the frame starts.. instance name of my MC on stage i.e. to b duplicated is bt_mc & it is the y position i.e is to b changed.

View 12 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 :: 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 :: 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

As3 :: Make A Comma (,) To Equal (.)?

Dec 10, 2010

is it possible to make a comma (,) to equal (.) in as3?
 
example:
 
now i write
2.31 + 4 = 6.31
 
so it's possible to write
 
2,31 + 4 = 6,31

View 6 Replies

ActionScript 3.0 :: How To Make Int Equal To Null

Sep 4, 2010

i just want to ask how to make an integer variable equal to null.[code]well it kinda work but giving some warning..,

View 4 Replies

ActionScript 3.0 :: Make Equal Opportunity Randomizing?

Aug 30, 2010

A slideshow containing advertisements, randomized in a way that each ad gets the same chance at being the first one to show when the page gets opened. Or rather, not randomizing, but alternating between about 25 different ads, perhaps even more

View 5 Replies

ActionScript 2.0 :: Flash8 - Make A Keystroke Equal A Button Press?

Dec 29, 2009

I am working on a program to draw something using dimensions input by the user. As the user changes these dimensions, the drawing changes to match. The problem I am facing is that it currently requires 15 textInputs to draw the image. I have them set up so that you can tab through them to enter the information quickly, then all of the drawing is done through ActionScript in the Submit button below the entry. However, when I enter 15 lines of information my instinct automatically presses enter to complete the process, every time. Now for my question. Is there a way to make a keystroke equal a button press? Or do I have to copy all 500 lines of code into a keystroke listener?

View 1 Replies

ActionScript 2.0 :: Make A Grid That Is Equal To The Width And The Height Of The Flash Movie

Mar 14, 2004

I am trying to make a Grid that is equal to the width and the height of the flash movie. I have a movieclip called box which is 30x30, and want it to repead along the x to form columns and along the y to form rows so that it makes a big rectangle of smaller squares. For some reason it looks like this:

[Code].....

View 5 Replies

ActionScript 3.0 :: Controlling Variable Movieclips (within Variable Movieclips?

Nov 3, 2009

on my main timeline there is a movieclip ("sampleMc") which contains a number of labeled frames containing movieclips of gallery images (for example "dyerBikiniMc"). in turn, each of THESE movieclips contain a number of frames of detail shots of the main image (for example "dyerBikini00Mc, dyerBikini01Mc, dyerBikini02Mc, etc.").on the main timeline i have a gallery navigation bar with thumbnail buttons determining which image will be displayed. there's also a right arrow shaped button "detailsBtn" that i'd like to allow the user to click frame-by-frame through the detail shots of the image. i also have a before/after toggle button on the main timeline that needs to control the movieclip one level below that, where the before/after images of that particular detail shot are stored!

View 9 Replies

Actionscript 3 :: Dictionary Mechanism - Dictionary Use Id To Compare If The Two Keys Are Equal, Not Use Strict Equal(===) To Compare If The Key Is The Same?

Aug 27, 2010

The dictionary use strict equals(===) for key comparison, how to change the comparison, so I can use my standard for comparison, for example, I have a class named Student:

class Student{
var id:int;
var name:String;[code]....

I want Dictionary use id to compare if the two keys are equal, not use strict equal(===) to compare if the key is the same.

View 2 Replies

IDE :: Make The Duration Of A Movieclip Equal The Duration Of The Preloader?

Apr 3, 2009

is it possible to make the duration of a movieclip equal the duration of the preloader, i mean is it possible to make something like, the time the preloader needs to reach the 100% = the duration of the movieclip? i'm using AS 3.0 and flash CS4 just in case it helps here is my code for the loader:

Code:
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;

[code].....

View 1 Replies

ActionScript 3.0 :: Make Application Variable Or Static Variable?

Oct 16, 2010

The Idea is i want to make avariable that stores his value after i close the swf and open ti again,

an example:

i make acounter

var i:int = 0;
var timer:Timer = new Timer(1000);
timer.start();

[Code]....

the value of i will increase but after i close the application and open it again the value will return to 0 , keep the variable stores his value after closing the application ?

View 3 Replies

ActionScript 2.0 :: Concatenate - Make The Variable Change With The Variable?

Jul 19, 2006

I'm trying to achieve something i thought would be extremely easy, but i can't get it to work!

[Code]...

View 1 Replies

ActionScript 2.0 :: Targeting Different Movieclips With A Variable?

Apr 7, 2010

On my stage, I have a bunch of movieclips with sequential instance names ("toggle1", "toggle2", etc.). I also have another bunch of movieclips, each with their own sequential instance name ("name1", "name2", etc.).How can I set it so that when I click on a "toggle" movieclip, a specified property changes on the "name" movieclip with the same number.Here's what I have so far.

ActionScript Code:
for (var i = 1; i <= 16; i++) {[code]....

What am I missing/doing wrong?

View 1 Replies

ActionScript 2.0 :: IF And Variable Passing Across Movieclips?

Jun 13, 2003

I have six movie clips, in a navigation movie clip, on the main time line, here they are:

_root.nav._home
_root.nav._ourFirm
_root.nav._onepartnership

[code].....

View 1 Replies

ActionScript 3.0 :: Loading Movieclips With The Same Variable?

Apr 11, 2010

I have this function that loads swfs dynamically using the same variable

var Xpos:Number = 420;
var Ypos: Number = 155;
var loader:Loader = new Loader();

[Code].....

I want to use the same idea for movieclips that I have in my library They are already imported for as.30, but I can't figure how to dynamically place them and take them out of the stage using the same variable.

View 4 Replies

ActionScript 2.0 :: Storing A Movieclips Instance Name In A Variable?

Feb 21, 2010

I have a movie clip and inside that movie clip there is a button. I will be copying this movie clip 40+ times. When you click the button it must seek out the reference name of the movie clip it is nested in. The point of the script on the button is to make all other boxes but its self vanish. The script needs to know what box it is so it can make all boxes but it's self vanish. I know that _name returns the name of the object the code is on but what about the movie clip the object is in maybe _parent._name?

View 5 Replies

ActionScript 2.0 :: Dynamic Variable Inside Movieclips

Jan 21, 2011

I recently started learning Flash and Actionscript and now I'm trying to write an actionscript for the first time. Im doing this in Actionscript 2.0.I have a movieclip that consists of two images and one dynamic text field with a variable. The name of the images are "VS1_P1_RUN" and "VS1_P1_OFF" and the name of the dynamic text field is "pumptext". In the dynamic text field I have the variable "VS1_P1_Ind". VS1_P1_Ind is probably a boolean variable as it shows 1 or 0 in another program but in Flash it shows True or False (not sure if Flash thinks it's a text/word or a boolean).My script is supposed to display the image named VS1_P1_RUN if the variable of the dynamic text field pumptext shows the text True and it goes like this:[code]

So I'm completely stuck in what to do. The bottom code works as it should but I want the images to show depending on the value of the variable VS1_P1_Ind. I thought just changing the text field to dynamic and typing the variable name in the variable field would do it but no.If it could be a clue to the solution I'll also share that the value of the variable is not seen/shown in textfield while inside the movieclip. Creating a dynamic textfield outside of the movieclip shows the value of the variable just fine, True/False.

View 1 Replies

ActionScript 2.0 :: Reusing Variable Names For Different MovieClips?

Jun 28, 2011

I'm creating a pacman game and basically I'm having trouble coding the enemies (ghosts), the code works perfectly with just one ghost, as soon as I add another it starts to go wrong.Firstly I've got this function which places the enemies:

Code:
//places the enemies
function placeEnemies() {

[code].....

View 2 Replies

ActionScript 3.0 :: MovieClips - Dynamic Naming Links To Variable

Jul 26, 2009

I am doing the following
Code:
Select allvar a:MovieClip = new MovieClip();
addChild(a);
Now what I want to do is I want to create six more mc i.e., a2,a3,a4,a5,a6. I want to accomplish this using loop like this:
Code: Select allvar i:Number = 0;
while(i < 6){
var a:MovieClip = new MovieClip();
addChild(a);
}

So with above method how can I give different names link above to var a? Then I am using all of these var as following:
Code:
Select allvar cube:Cube = new Cube(new MaterialsList({
front:a , left:a2, right:a3, top:a4, bottom:a5, back:a6}),200, 200, 200,10, 10, 10);
scene.addChild(cube);
How can I use those dynamic name here?

View 1 Replies

ActionScript 3.0 :: Variable Of Nested MovieClips Global Coordinates

Apr 24, 2009

I have a MovieClip ("mc3" that moves dynamically) inside of a MovieClip ("mc2" that moves dynamically) that is on the stage ("stage" that is static). I need to find the value of mc3's x in relation to the stage? I need to make it into a variable. I am trying to do the math, can't figure it out. Also tried localToGlobal and failed.

View 5 Replies

IDE :: Making A Global String Variable Visible To MovieClips?

Jun 4, 2009

I mostly use flash for the animation, so my action script tends to be mostly functional.

I am now however having an issue, i am using a variable called language which I am setting in frame one as "dutch", "english" , "german" etc... Im then using this to set dynamic text as appropriate in each frame as necessary.(and yes i may switch this to case statements )

if (language == "dutch")
{ tcMC.peasantBubble1.peasantSpeech.text= "Bescherm je een schat?"};

My problem is however that one Movieclip does not see the language variable.

Is there anway in CS4 i can direct it to where it is, or define the varibale instead to be global (perhaps id have to change it from a string though)?

View 2 Replies

ActionScript 3.0 :: Use A Variable(text) To Reference A Movieclips Instance Name?

Nov 28, 2010

i want to use a variable(text) to refrence a movieclips instance name

Code:
function InventoryShow(event:Event):void
{
var SC:URLVariables = new URLVariables(event.target.data);

[Code].....

View 1 Replies







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