ActionScript 2.0 :: Storing Values Using Loop

Apr 18, 2008

I have five buttons on stage and I simply want to trace "1" when I click the first button and trace "2" when I click the second button and so on.I am always getting the last number and cannot figure out, how to store the values.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Storing Set Of Values In An Array?

Sep 9, 2009

I have 15 sets of x and y values, that should be stored together. I was thinking I could have an array, holding 15 other arrays, each holding the x and y value? Is that a valid way to do this? Also, is there a way to create those arrays holding the x and y, dynamically, so they just get numbered?
 
MainArray[
subArray[x1, y1];
subArray[x2, y2];

[Code]...

Obviously, above is not correct AS. Is this even a way to do this? Are there other much better ways?

View 3 Replies

ActionScript 2.0 :: Storing Values In Multiple Loops?

Jun 28, 2008

for (var s = 0; s<mainSections.length; s++) {//grabbing the fabric types Handblocks,Screenprints,and Wovens
for (var i = 0; i<subSection.length; i++) { //grabbing each fabric design of the fabric

[code]....

View 4 Replies

ActionScript 3.0 :: Storing Bitmap Values In An Array?

Feb 22, 2009

I've been trying to figure out a solution for a problem.. Which is really bugging me. The only thing I could think of that has potential to possibly work is being able to store bitmap names in an array.. Like this example(which doesn't work):

Code:
var hairBitmapA:Array = ["hair_1_1", "hair_1_2"];
var i:uint = 1;
var hairBitmap:hairBitmapA[i] = new hairBitmapA[i](0,0);

The idea of this is simple, although not correct, is there a way that I can do what I'm trying to do?

View 4 Replies

ActionScript 2.0 :: Create An Array Storing All This Values, _width, And MC To Load?

Mar 2, 2004

I'm making a portfolio, it has a large amount of images, one by work, (maybe there are 25) and they are put in a horizontal band, the images all have the same height, but not he same width, and they load an external MC of each work.So I want to create an array storing all this values, _width, and MC to load.

Secondly I have a frame like a stroke of the picture, the frame is in the center of the band of images, and there are two arrows, one to move on the band to the left, and other to the right. The thing is that when I push the arrow the band must move 15 px on left or right, and te frame must adapt (with easing) to the _width of the image.And one more thing, there will be many many images in a future, so I would like that a user if it's holding the left or the right arrow for a medium/long time it could make the band of images to go faster from one to another. I think it's so simple of changing the speed of the movement, what I don`t kwow is how to know if the button is pressed for a long-meidum time.

View 1 Replies

ActionScript 2.0 :: Storing Loop Value In Movieclip?

Sep 17, 2004

This is really holding me up, so I hope someone can help me fast. I need to store each value of my for loop in a separate instance of my movieclip, but the movieclip only seems to pick up the last value of the loop.

Why is this and can I do this any other way apart from storing the value in a textfield or creating a loop within the movieclip?

View 3 Replies

ActionScript 2.0 :: Storing Loop Value In Movieclip

Sep 17, 2004

I need to store each value of my for loop in a separate instance of my movieclip, but the movieclip only seems to pick up the last value of the loop. Why is this and can I do this any other way apart from storing the value in a textfield or creating a loop within the movieclip?

View 3 Replies

ActionScript 3.0 :: Loop With Varying Values Depending On Where Are In The Loop?

Jul 20, 2009

I have need of loops / nested loops that pick different figures depending on where you are in the loop. The whole function needs to run through 'ml' times. 'ml' is a dynamic figure. Loop 1 = While the loop is within the first 12 iterations, 'exconemp' must equal 100. For iterations 13 - 24, 'exconemp' must equal 102.5, for 25 - 36 it will be 105.06, for 37 - 48 it will be 107.69. This needs to change every 12th iteration until it has reached 'ml'. The calculation takes the value of the previous 'exconemp' and then multiplies that by 0.025.

Loop 2 = While the loop is within the first 120 iterations, 'abc' must equal 0.015 and any further iterations must use 0.01. This must also work in a way to figure out whether 'ml' is higher or lower than 120 and work accordingly. My main issue is this - how do I get the loops to run through as this: While the iteration is < 12, do this, THEN take the final figure (12th iteration) and start on 13 - 24, do this THEN etc etc. How do I produce a THEN statement? I can get the code to pick up the final values, but not change along the way.

[Code]...

View 6 Replies

ActionScript 2.0 :: Loop With Two Values?

Nov 13, 2011

I want to do a loop of this

Code:
t_1=parseInt(mcArray1[0]);
t_2=parseInt(mcArray1[2]);

[code]....

View 3 Replies

Actionscript 3 :: Loop Over Array With Xml-values?

Dec 7, 2011

So I have an array, which consists of xml-values. I want to check a node from each array entry. I've tried reaching xml-values as such:

var eventArtists:XML;
for each (xmlEvent in arEvents)
{

[code].....

View 1 Replies

Actionscript 3.0 :: Loop Not Incrementing Values

Apr 24, 2010

I've solved this problem in AS2 but I can't seem to sort it out in AS3.[code]...

View 1 Replies

ActionScript 2.0 :: Variable Button Values In Loop?

Mar 15, 2010

I have a query regarding assigning values to buttons in a for loop, I will explain:This is a string which I want to assign to a button value via getURL:

var myURL = "http://www.mywebsite.co.uk" + "/?Group=" + mySharedObject.data["destination"+i] + "&" + "SearchType=654&" + "Target=offers&" + "Paging=on&" + "HotelName=" + mySharedObject.data["hotel"+i];

[code].....

View 1 Replies

ActionScript 2.0 :: Loop Through Children In MovieClip And Get Values

Nov 8, 2009

I have a movie clip (mc_moviegroup) which is made of a group of many dynamic text fields. I want to loop through the dynamic text field children of mc_moviegroup and pull out their text values in a string. Does a movie clip have a property which gives the number of it's children movieclips?

View 2 Replies

ActionScript 2.0 :: Output Values For Buttons In Loop?

Jan 13, 2009

I have this little loop that creates buttons. My aim is to change value of variable 'thevalue' on everytime button is pressed, first button should give value 0, second 1, third 2 and so on.

Code:
for (jo=0; jo<xmlData.firstChild.childNodes.length; jo++) {
value1= xmlData.firstChild.childNodes[jo].attributes.value;
_root.attachMovie("button", jo, (1000-jo), {_x:20, _y:20+(jo*20)});

[Code]....

View 2 Replies

ActionScript 2.0 :: Build New Array From _width Values In Loop?

Sep 9, 2007

I have a bunch of thumb mc instances on my stage, using the same mc symbol. They're all sized differently so the widths(which are same as heights) vary.I want to be able to access their width value from an array independent of all the scaling I'm doing with rollovers. That is, I need to have each mc instance's original width accessible from anywhere in my code.The simplest way to do this is to hard code an array, like:

var Twidth:Array = new Array();
Twidth[0] = "33";
Twidth[1] = "45";[code]....

But since I have 22 thumbs and several portfolios, and want the option of changing their original sizes on the stage, I want to create the array above on the fly using information in a loop. For instance, I already have a loop in a function called generateThumbs(). Here's what I've tried:

for (var i = 0; i<total; i++) {
Twidth = new Array();
Twidth[i] = this["thumb_mc"+i]._width;[code]....

for trace on the first method, replacing 'i' with the key I want (Twidth[2]):

undefined
undefined
45
undefined
undefined

As you can see, this gives me non-indexed non-delimited value for the whole loop (the actual in my real movie is 22). There's no length or array because its actually just one value. Entering a number in the key will display a bunch of undefined with one defined. I have no way of extracting that one key without getting all the other undefined values.my question is: How do I put 'this["thumb_mc"+i]._width' values into a loop with each value indexed for the rest of my functions to access?

View 2 Replies

ActionScript 3.0 :: Loop And Create New Arrays From Each Of The Values In The CategoryArray?

Mar 23, 2009

I have a array of categories, for e.g.

var categoryArray = new Array('value1', 'value2', 'value3');

I would like to loop and create new arrays from each of the values in the categoryArray I tried...

for(var i=0;i<=categoryArray.length-1;i++){
this[categoryArray[i]] = new Array();
}
value1[0] = "dsfsdf";
trace(value1[0]);

It doesn't seem to work.

View 3 Replies

Actionscript 3 :: Flex In Construct When Modifying Loop Source Values?

Dec 9, 2009

DISCLAIMER: relatively new to Flex/AS3, I might be missing something obvious. After doing some research it appears that using the for(var property:String in object) does not guarantee the enumeration order of properties, however it doesn't say anything about modifying the VALUE that property points to as changing the for...in loop.

[Code]...

As a solution I can create a temp object to store the data while doing the loop on the original object, and then replace the original object with the modified data, but I'd like to know what exactly is going on.

So my question is, does the value of object property modify the looping order of the for...in construct? And if so, should it or is this a bug?

View 3 Replies

ActionScript 2.0 :: Loop - Extract The Individual Values From A Nested Xml Node

Mar 4, 2007

im having problems with a nested loop. i found some post here, but they didn�t help me. i need to extract the individual values from a nested xml node. i simplyfied the xml.
this is the code:

[Code]....

View 1 Replies

ActionScript 2.0 :: Pre-calculate The Perlin Noise Values And Then Loop Through It In An OnEnterFrame

Mar 9, 2007

i got this perlinnoise called function and movieclip.filter = [displacementMapFilter] inside a onEnterFrame and it's eating me at 100 percent. are there any substitutions for making it much less processor intensive? I'd like to show a picture rippling and i'd like to use perlinNoise. Is there a way i can pre-calculate the perlin noise values and then loop through it in an OnEnterFrame

View 7 Replies

ActionScript 3.0 :: Adding Previous Numeric Values In Array During For Loop?

May 23, 2009

While a for loop runs through all the elements in an array I want to get the width of each element and add it to the sum of the width of all previous elements.

View 2 Replies

ActionScript 2.0 :: Creating Variables In A Loop And Assigning Them Non Empty XML Values

Jun 1, 2011

Here is the structure of the XML file: PHP Code: <xmlfile><page></page><page> <source></source> </page></xmlfile> Some "page" nodes contain the extra "source" node. What I'm currently doing is looping through all the page nodes and looking for any source nodes. If there is a source node, I create a variable, and want to assign it a value of the contents of the "source" (HTML).

[Code]....

View 1 Replies

ActionScript 2.0 :: Assign Values To A Dynamic Text Field Trough For Loop?

Oct 12, 2009

I`m trying to assign values to a dynamic text field.[code]Can you please tell me how to make it work trought for loop #1

View 1 Replies

ActionScript 3.0 :: Instance Names - Get The Values That The User Will Enter Into Matrix By A Loop

Aug 23, 2010

i have a simple matrix form that consist of 3*3 textfields. my problem is how to get the values that the user will enter into it by a loop, i mean not using a long way such:

[Code]...

View 7 Replies

ActionScript 3.0 :: XML For Loop - Count The "<Text>" Nodes Of The XML And Use Their Different Values On Different Dynamic Textfields

Jul 15, 2010

How can I create a for loop so I can use different values of the same node? So I want to count the "<Text>" nodes of the XML and use their different values on different dynamic textfields. Note that I have mutliple Movieclips on the stage with the same amount of textfields and I would like to include them in the loop, so I named them mc1 mc2 etc.

[Code]..

View 9 Replies

ActionScript 3.0 :: Slider Input Values - Can't Get The Output Values To Add Up?

Dec 6, 2010

I've gotten these sliders to work but can't get the output values to add up. For instance, depending on the values for slider 1, 2 and 3, I need the total to show up in a separate text box. I keep getting a NaN message in the text box.Here's the code I have so far:

//item 1
sliderOne.width = 600;
sliderOne.value = 0;[code].....

View 3 Replies

IDE :: Storing To A Txt File PHP?

Jan 9, 2009

i have 4 txt boxes which load 4 prices from a txt file that works ok. if the user then changes the price in the box and hits a button:-

on (release) {
time = new Date();
url = "./store.php?time="+time.getTime()+"&post="+escape(po

[Code].....

View 4 Replies

Php :: Storing Data From Flash?

Feb 2, 2011

What is the best way to store data gathered from a flash file, and load it into another flash file? Would xml or php work? and could it be instantaneous? Here is a diagram of what i am trying to do...

[URL]

View 2 Replies

ActionScript 3.0 :: Storing The Multiple Swf?

Aug 26, 2010

I have multiple swf files for background . I have to load the entire swf's first and have to store it in array . Is it good to store swf in array or dictionary?

View 9 Replies

Actionscript 3.0 :: Storing XML Data?

May 6, 2009

I need some help with my code please. I have a for loop that creates sprites and loads images into the sprites theough XML. I have additional nodes for each image and sprite that get created that I want to store and call when I roll over the thumbs. What would be the best way to do this? I had to "improvise" and have the for loop create text fields to hold the data and then call it when I roll over throught "evt.target.

[Code]...

View 1 Replies

ActionScript 2.0 :: Storing Path In A Var?

Jul 29, 2008

I'm not entirely sure how to go about this, but I want to store a path inside a var to reuse throughout some interface code:

Code:
var thisPath:Object = pageText_mc.pageCntrls_mc;
[thisPath + "."]prevButton_mc._visible = false;

[code]....

View 3 Replies







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