ActionScript 2.0 :: Change The Position Of One Of The Boxes With The Number Of The Box As A Stored Variable?

Jul 12, 2010

I have flash create an empty movieclip, screen_1, then attach 4 different colored movieclips to the empty one: box_1, box_2, box_3, box_4.Now I am trying to change the position of one of the boxes with the number of the box as a stored variable. So say:

boxNum = 1

this["screen_1.box_" + boxNum]._x = this["screen_1.box_" + boxNum]._x +1600

I can get this to work on the main movie clip.. but not on the movieclips inside of it.

View 2 Replies


Similar Posts:


Flash :: Get The Position Of Instance Whose Name Is Stored In An Variable?

Nov 18, 2009

How can I obtain the position of a instance whose name is stored in an variable? If there is a instance whose name I don't know, but the instance's name is store in an variable x. How can I obtain its position?

View 4 Replies

ActionScript 2.0 :: XML Load To Variable Number Of Dynamic Text Boxes?

May 9, 2010

I have a loop that cycles through all children of an extremely small XML file, and I need to set the label and the link for each box. I started with a fixed number of dynamic text boxes, and loaded them because I knew the count, but I'd rather loop through them as I read the XML. Here is how it is now:

for (var aNode:XMLNode = rootNode.firstChild; aNode != null; aNode = aNode.nextSibling) {
trace(aNode);
trace(aNode.attributes.text);

[code]......

View 2 Replies

IDE :: Change Random Number Variable To Sequence?

Aug 20, 2009

the variable Im interested in is numSound which at the moment is a random number between 1 and 5, but it repeats too much and a sequence would be fine. I know very little actionscript and nothing I have tried works,the code, or what seems the relevant code, is

Code:
private function randRange(min:Number, max:Number):Number
{

[code].....

View 2 Replies

ActionScript 2.0 :: Change Random Number Variable To Sequence?

Aug 17, 2009

I want to change this bit of code

var numSound:Number = randRange(1, 5);

which I presume creates a random number between 1 and 5, to just a simple sequence of 1 to 5, or alternately, random would be ok if there was a way to preventing it from repeating numbers

View 9 Replies

ActionScript 2.0 :: Make A Button Change A Variable, And Add A Number And String?

Jan 25, 2010

I would like to make a dynamic button on a website I am working on. I would like one button to update a variable, and another set of buttons to add 1 or subtract one from the variable I have buttons on the left side of the page for some bands that load conent into an empty movie clip.

The website: [URL]

I would like to set up some forward and backward arrows above that content on the right, so users can also scroll through the content in order. So if someone loads the content for soul asylum, and click the back arrow, it goes back to the Wailers, and if they click the forward arrow, it goes to Swollen Members. So there is an order of pages: 1. Wailers, 2. Soul Asylum, 3. Swollen Members, 4. Passafire, 5. Beats Antique, 6. SFM Kind of an order of importance. The idea is if somebody starts by clicking #3 Swollen Members, my application will know that it is on #3 and the arrows will go to #2 or #4.

Is there a way for the main artist buttons on the left to reset a variable for the current slide? So if someone clicks on the Swollen Members picture button, a variable called currentselection equals 3 And then when the forward arrow is clicked, it will ad 1 to the current selection and load movie #4

So in VB the main Swollen Members button would be something like: im currentselection as int = 3 Which would reset the current page as 3

Then the forward arrow would have code like:

Dim Nextselection as Int
Nextselection = & currentselection +1 & ".swf"

And the button in flash would be something like:

on (release) {
loadMovie("Nextselection", "rightcontent_MC")}

Which would load 4.swf the slide for passafire.

So how would I do this in action script 2.0?

View 0 Replies

ActionScript 3.0 :: Is NaN Stored As A Floating A Number

Dec 26, 2010

Is NaN stored as a floating a number? and if not, how does the computer stores it?PS: I know that NaN = Not a Number but still, flash needs to store it somehow.

View 2 Replies

Flex :: Use A Variable In HtmlText Stored In A DB?

Feb 7, 2011

I've got htmlText that I'm pulling form a db. I'd like to put a variable as the color and then set the variable in flex.[code]...

View 1 Replies

ActionScript 2.0 :: Use A Stored String Variable?

Feb 9, 2009

trying to use a stored String variable in the following:

Code:
var meuXML:XML = new XML();
meuXML.ignoreWhite = true;
meuXML.load("subdir/"+PAGE);

[code]....

'button.page' is the aforementioned String variable How can I make this work?

View 6 Replies

Actionscript 3 :: Create An Object If The Name Is Stored In A Variable?

Nov 7, 2010

how to create an object if the name is stored in a variable.

var className:String = 'Config';
var MySprite:Sprite = new ???
class Config extends Sprite {
...
}

View 1 Replies

ActionScript 2.0 :: How To Reference Instance If Its Stored In A Variable

Nov 26, 2007

I'm creating a dynamic movieclip and the name/instance name is stored in a variable. How can I reference the instance if its stored in a variable?This is what I'm using and it doesnt seem to work (for obvious reasons). I know in php that you do this "blah blah" . $variable.

View 1 Replies

ActionScript 2.0 :: Get A Variable That Has A Movieclip's Name Stored Inside It?

Aug 13, 2010

I have a simple question about Variables in AS2, i have a feeling the solution is pretty simple. What i exactly need is a variable that has a movieclip's name stored inside it. I created a variable called cardType and stored the moviecip's name inside it. Now when i declare the Tween you see below and assign it to the variable cardType (which should be replaced with the movieclip's name), it does not work.

PHP Code:

var CardType;
CardType = LondonQuestions_mc.redCard_mc;
new Tween(cardType, "_alpha", Strong.easeOut, 0, 100, 2.5, true); 

View 7 Replies

ActionScript 3.0 :: Flash - Calculating Order Of Boxes As Per There Position

May 28, 2010

I am working on sequence quiz engine. I have a function to sort boxes (dynamically generated Movieclips) which calls on every release of boxes.

[Code]...

View 1 Replies

Actionscript :: Use A Loop To Generate A Number Of Boxes?

Jun 21, 2009

I want to use a loop to generate a number of boxes.The following code is the test loop code - set to loop just once at this stage.The problem is that it doesn't seem to like my [i] substitutions in the 'clickBox_inst[i]'.If I replace '[i]' with 1 it works.I've looked at lots of example code and can't see the syntax error I must be making (it's the first look I've tried to write).

for (var i = 1; i < 2; i++) {
clickBox_inst.duplicateMovieClip(["clickBox_inst"+i], 1);
clickBox_inst[i]._x = topLeft_x + outLineWidth;[code]....

View 1 Replies

ActionScript 1/2 :: Use A Loop To Generate A Number Of Boxes?

Jun 21, 2009

I want to use a loop to generate a number of boxes.  The following code is the test loop code - set to loop just once at this stage.  The problem is that it doesn't seem to like my [i] substitutions in the 'clickBox_inst[i]'.  If I replace '[i]' with 1 it works.  I've looked at lots of example code and can't see the syntax error I must be making (it's the first look I've tried to write).

[Code]...
 
PS - I just accidently posted this on the Flash section so apologies if anyone has read it twice.

View 9 Replies

ActionScript 2.0 :: Calculate Number Of Checked Boxes?

Jul 28, 2009

How do i set check box that remebers the value and store them until a person press a submit button thats he ready and then the values would be tranfered to a dynamisk text field for example.

View 0 Replies

ActionScript 3.0 :: Way To Use String Stored In A Variable As Regular Expression

Aug 29, 2009

I am using RegExp to search for character sequences within strings. I was wondering if/what is the proper way to use a string stored in a variable as a regular expression. For example: [code]I'll have to use another string manipulation tool to search for the sequence.

View 5 Replies

ActionScript 3.0 :: Change The Properties Of Objects Stored In An Array Using A For Loop?

Mar 30, 2012

I have a little bit of code that makes a nifty kaleidoscope effect, but I would like to take it one step further by having each star in the kaleidoscope gradually shift color as it expands outwards. Right now, I create randomly colored "star" movieclips by drawing 6 different triangles within the movieclip, and then add those individual "star" movieclips to a "stars" array.

What I'd like to do is use a "for...in" loop to grab the .color property of each of the "star" movieclips and change it slightly (using colorTransform?) at each ENTER_FRAME. How can I go in and access the star.color property (or is it star.transform.colorTransform?) of each of the movieclip objects that are now stored in my "stars" array?

Would it be:

Code:
for (var i in stars){stars[i].transform.colorTransform = myColorTransform;
}OR
for (var i in stars){stars[i].star.transform.colorTransform = myColorTransform;
}

View 14 Replies

ActionScript 2.0 :: Use Math.Round To Ensure That ALL Text Boxes Are On Whole Number, X,Y Coordinates?

Apr 20, 2004

Is there a way to use Math.Round to ensure that ALL text boxes are on whole number, X,Y coordinates?

View 4 Replies

Java :: Apply Mathematical Rules Stored In Database To A Variable Gotten From Human Machine Interface?

Jun 10, 2011

I'm developing a project with Flex, Spring, Hibernate, MySQL, Tomcat, but one of the functionality is: " i have to store a mathematical rule like for example " a+b " into database, then in my human machine interface, i have two fields when user write the variables "a" and "b", then a button with the label calculate which if it's clicked, it'll show bellow the result of applying the rule " a+b " to the variables "a" and "b" which the user previously." Now, i'm searching for an Java or Flex API or any other way that will give me the ability to apply a mathematical rule stored in database as string, to variables i got from human machine interface"

View 1 Replies

ActionScript 2.0 :: Random Number - Click On A Button The Variable Number?

Sep 18, 2005

lets say that when you click on a button the variable number goes up 1 or 2 but it picks it randomly
how would i do it

[Code]...

View 8 Replies

ActionScript 2.0 :: How To Get All Boxes To Change Colors

Nov 10, 2004

I've got a few problems with this project at the moment. I've got the function to colour tween the shapes through actionscript. As you look through it seems ok but I am trying to get all 3 boxes to change colour. Unfortunately I can only get one to change. When looking at the functions called by the buttons the second box seems to take priority over the first one. How can I get all three boxes to change to my desired colours? [URL]. This is an MX 04 fla file.

View 5 Replies

ActionScript 2.0 :: Get All Three Boxes To Change To Desired Colours?

Nov 10, 2004

Ive got a few plroblems with this project at the moment. Ive got the function to colour tween the shapes through actionscript. As you look through it seems ok but im trying to get all 3 boxes to change colour. Unfortunatley i can only get one to change. When looking at the functions called by the buttons the second box seems to take priority over the first one. How can i get all three boxes to change to my desired colours?URL...

View 5 Replies

ActionScript 2.0 :: Adding Variable Name To Tick Boxes?

Oct 3, 2002

How do I add a variable name to the tick boxes within the flash MX components?

View 9 Replies

ActionScript 2.0 :: Change Event Handler And Combo Boxes?

Jan 20, 2009

I'm currently using the change event handler to detect any changes made to the combobox selection, however, I would like it to ignore when the arrow keys are pressed as I am using them elsewhere.

View 0 Replies

ActionScript 2.0 :: Change The TAB Order Of Text Input Boxes?

Mar 27, 2005

how do you change the TAB order of text input boxes i want to tell it what box to go to next depending on which one it is on now making a login form ..

View 2 Replies

ActionScript 3.0 :: Using TextInput Boxes To Change To Small Caps Lettering With NO

Dec 24, 2009

Using two TextInput boxes (fName and lName) which are writting at the same time over to a (fullName) Text box, BUT change the data in here automatically to 'small Caps' lettering with NO spaces. I'm finding all sort of things but nothing close enough.

View 1 Replies

ActionScript 2.0 :: Change Values Displayed In Dynamic Text Boxes

Jun 11, 2004

I can't get code in my button to change the values displayed in my dynamic text boxes. I have a column of twelve dynamic text boxes which display numbers stored in an array. The array contains more than twelve numbers. I want to use buttons to refresh the information in the boxes (effectively creating a scrolling effect) so that the remaining contents of the array can be revealed as required. In the code below Stats1 etc. refer to the dynamic text. The array is called Stats4display. This shows the information fine.[code]I had hoped that by incrementing the value of x I could update all the dynamic text boxes with the next value along in the array.

View 9 Replies

ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies

Feeding Variable In Flash From Html Via Dynamic Text Boxes?

Aug 10, 2009

I have to dynamic text boxes; one is for articles and the other is supposed to bu for navigation of the articles. I have a variable set up for the article dynamic text box and I want the navigation part to be filled in via text file. so I need to find a way for the information that's fed in to the navigation part to functions as buttons and when they are clicked a variable should pass though flash telling is what story to display. for instance if you click stereohype then storyvar == stereohype. see what I mean? I could do it all in flash but i'm trying to make it where I don't have to touch the flash file after it's completed and everything can just be manipulated via text files with html php xml you name it, what ever works.

View 1 Replies







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