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


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 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

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 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

Storing Multiple Animation Files?

Aug 19, 2009

I want to have a TV screen and hundreds of (small) flash animations load up in the 'TV'. I'm assuming I'm going to have to use Actionscript, so I'm looking into that right now. However, what would be the best way to organise this? Each "TV" will have a different set of "Channels". Do I create each 'channel' and save them as seperate SWF files, or is it possible to have them all in one main file. I can then flick through each 'channel', which essentially unloads the current animation and loads the next one

View 2 Replies

ActionScript 3.0 :: Storing Multiple BitmapData Instances

Aug 3, 2009

I have a question about optimum resource management. So I am pondering what would be the most efficient way of storing a LARGE number of BitmapData instances in a SWF. The BitmapDatas would be generated at runtime. Only a minority of the BitmapData instances would be on screen at any one time. So far I've conceived three routes; Option one (simply store them in an array - this is then stored in the RAM right?)

ActionScript Code:
var array:Array = new Array();
var bitmapData1:BitmapData = new Bitmapdata();
var bitmapData2:BitmapData = new Bitmapdata();
array.push(bitmapData1);
array.push(bitmapData2);
[Code]...

View 0 Replies

ActionScript 2.0 :: [FMX04] Storing Multiple _x At Runtime?

Jan 11, 2006

i am developing a photogallery with picts of different width.there's nothing with it,but i am trying to make an element which is more of a design nature.So i have an invisible mc/say "bbb" which is duplicated each time a new photo is loaded and its _x depends on the photos _width and the distance between the photo and the end of the screen regulates how many times "bbb" is duplicated.So on every new photo i got /possibly/ diferent number of instances with diferent _x.Still no poblem.But i want to put an bbb_dups.onRollOver=func(){if (this._x=curr_x){ tween(this._x+30)}else if (this._x=curr_x+30){ tween(backto curr._x)} so i need somehow to store each instances curr._x after the duplication which i dont know how.i've tried with an array but it doesn't seem to work for all the instances.

View 3 Replies

Actionscript 3 :: Storing Multiple Images In A Variable With In Flash Builder 4.5

Dec 6, 2011

I have a flash assignment that. The assignment is to create an application for playing a card game, I have to create an MXML component that has two variables, one variable stores the image of the back of a playing card, the other variable has t store all 52 options of a front facing card (the second variable will store over 50 images).

I've written the variable for the back of the card image like this:

[Code]...

View 1 Replies

ActionScript 2.0 :: Multiple Loops Not Working?

Jun 30, 2009

I'm new to flash, and this is my first post.I'm using Flash MX Pro, 2004 V7.I have this code in the first frame:

________________________________________
for (i = 0; i < 5; i++){
_root.attachMovie("A","A_" + i, i + 10);

[code].....

View 2 Replies

ActionScript 3.0 :: Multiple For Loops Within Various If Statements?

Jul 28, 2011

I'm building a quick products display app for my company (basically customers put in certain numeric values and the app recommends a product based on the numbers.) I've done this with if statments and addChild()s

Now if they've gotten one result and they want to try with different values I need to removeChild() the product images from the stage.

So far I have this working by adding the addChild()s to an Array and using a for loop to remove them everytime the calculate button is hit. This works fine until I get to product double ups (some products can work across multiple values) then it errors.

Below is part of the code I've shorthanded some of the parts which are working fine as well as the repeat parts so that it's not just a whole blob of code

Code:
stop();
import flash.display.MovieClip;
equal_btn.addEventListener(MouseEvent.CLICK, equClick);

[Code]....

View 6 Replies

ActionScript 2.0 :: Multiple-dimensional If Loops

Jul 31, 2006

creating If loops with multiple-dimensions. What I am trying to do is simple in concept: create "boxes" (square movie clips) surrounding another movie clip (one to the left, to the right, above and below). Essentially what I have so far looks like this:

--------SQUARE-------
SQUARE-Center-SQUARE
--------SQUARE-------[code].....

The problem with this is that as soon as I use the function createmoresquares, the for loop is run again for that second set of squares, but the original for loop to create the original set of squares is forgotten so that I end up with this:

----------------SQUARE--------
--------Center-SQUARE-SQUARE
----------------SQUARE--------

I know this all seems very confusing but the basic mistake I am making should be easy to resolve. I have the same problem creating multiple-dimensional arrays.

View 5 Replies

ActionScript 3.0 :: Multiple Tab Loops Creating Themselves?

Oct 26, 2010

I have created 2 separate arrays. One that contains all of the "options" and the other which contains all of the "products". Since the products change depending on the options, this way I can just update the products array whenever the filtering options get changed.So far, everything is working as expected. I can change the filters whenever I want and tabbing works exactly as expected.The problem arises when I click on one of the products.This brings up an informational popup. When that happens, I loop through the products array and the options array and set tabEnabled to false on all of them so that you can't tab through to items in the background. This works great. When you close the popup, I once again loop through the products and options arrays and set tabEnabled to true, but this is where the weird happens.

What happens is that you can now tab through the options and it goes through them all just fine, but when it gets to the end of the options, where it would normally start tabbing through the products, it skips them and goes back to the beginning of the options. HOWEVER, if you shift-tab from the beginning of the options, it goes to the products and as long as you are shift-tabbing, it will cycle through only the products. If you release shift and tab normally, it will tab through the products and when it reaches the end, jumps over to the options and tabs through those, once again skipping the products unless you are shift-tabbing.

I have traced the tab indexes and they aren't changing. I have no focusManagers implemented in the entire project. All of the various items are added programatically and dynamically at runtime. I'm at a loss here, and haven't been able to find anyone else with a similar problem... Any thoughts? Most of the options items are components (radioButtons and Checkboxes) if that might make a difference.On a side note, it also seems like whenever I set tabEnabled to false, when I set it back to true, I have to set focusRect to true as well. It seems to automatically set focusRect to false when you set tabEnabled to false as well. Is that normal? Seems like those should be independent of each other

View 2 Replies

ActionScript 3.0 :: For Loops For Multiple Classes On Stage

Dec 31, 2009

I have a document class of particles and i'm trying to add multiple instances of the class...

[Code]....

is this the correct way to add multiple instances of the class to the stage?

View 3 Replies

ActionScript 3.0 :: Flash Game - Storing High Scores, Winners With Multiple Users?

May 16, 2011

I've been asked if I can build a game, which lots of people will play and the overall winner will get a prize.The game part is simple enough, and I know enough PHP/MySQL to put something together to store the results etc. But is there something already available which could do this part for me, it would save a lot of time, and would probably be better than something I build myself.

View 1 Replies

Actionscript 3 :: Advantages And Disadvantages To Having Multiple Loops Flash

Jan 11, 2010

What are the advantages and disadvantages of having just one main loop and having a main class control individual objects on your stage, in oppose to having each individual object have its own loop and giving it the responsibilities of doing what ever it has to do on its own. What are consider best practices.

View 3 Replies

Flash :: Create Multiple Tab Loops In AS3 By Using Fl.managers.FocusManager?

Sep 7, 2010

I want to create a tab-enabled popup window in an AS3 Air project. Currently, when I press tab several times, the focus goes through all the components in my popup window and then starts focusing the buttons and TextFields from the components that are behind the popup. I have tried to solve this problem in two ways, but none of them worked. I will explain both of the methods here

[Code]....

View 2 Replies

ActionScript 3.0 :: Arrays And For Loops To Generate Multiple Buttons For Loading Images?

Sep 22, 2009

I have this array that contains the names of various images I want to load into Flash

var imageArray:Array=["image1","image2","image3","image4","image5","image 6","image7","image8","image9","image10"];

Now I want to create 10 different buttons with each button loading in an image. I know there's a way to do this with a for loop without having to make 10 different buttons and writing 10 different functions. Not sure how to correlate the members imageArray with the generated btns.

View 5 Replies

ActionScript 3.0 :: Attach Multiple MC With Values

Jan 31, 2011

[Code]...

I am adding a mc to the stage (linkage name: SavedTopic) via mouse click calling this function. There will be a random number of these clips, based on user decisions. How can I set the 'savedTitle' and 'savedText' as variables unique to this specific MC, that can be accessed later via textbox inside the 'topic' movie clip. I've tried:

[Code]...

View 2 Replies

ActionScript 3.0 :: Put Multiple Inputtext Values Into An Array?

Oct 1, 2009

I want to put multiple inputtext values into an array, but code below wont work.

This is the inputTextFields:
output1.text
output2.text
Simply dont know how to write it, tried:
output +i+ "." +text;
output +i+ ".text";

[Code]...

View 5 Replies

ActionScript 2.0 :: Way To Split String By Multiple Values?

Feb 3, 2010

When you want to split a string in to an array, seperated by the letter "e" for example. So string: 0e5e8e7 would become 0,5,8,7..[code]Is there a way you could split a string by multiple values? So instead of it splitting the string when it comes across "e", could you have it split when it comes across "e", or another character.

View 5 Replies

ActionScript 3.0 :: Switch Statement Used With Multiple Values?

Apr 5, 2011

I'm afraid I know the answer but I wanted to check first.

I want to run a single function based on multiple values.

[Code].....

View 2 Replies

ActionScript 2.0 :: Transfer Multiple Values From One Object To Another?

Sep 13, 2011

I am working on an RPG-type game, and in this game I've defined multiple objects for characters, named char1, char2, etc, then assigned the objects values such as Health, Magic, Strength, etc. I then created a dummy object with all of these same values, except every value is set to zero. There are some 30 values in every object.

I would like to see if I could do something like:

Code:
dummychar = char1;

to transfer all of the values from char1 to dummychar instantly without having to define every value transfer, however, I can't seem to find the correct bit of code, because doing the above seems to erase all the values from the dummychar object completely.

The point of this excersize is the make the dummychar object a placeholder so I can switch char1 with char2, meaning char1 would take char2's place, and vice versa. The dummychar object will hold the values for char1, then char2's values will overwrite char1's values, then the dummychar's values will overwrite char2's.

So, in pseudocode:

Code:
dummychar = char1;
char1 = char2;
char2 = dummychar;

My current way of doing this includes telling every single value in the char objects to transfer, but that takes up quite a bit of coding space, and I was wondering if there is an easier way.

View 3 Replies

ActionScript 3.0 :: Make Multiple Slider Values?

May 3, 2011

Is there a way to make a statement where if the slider is >=30 and <=40?

View 3 Replies

ActionScript 3.0 :: Return Multiple Values From A Function?

Feb 6, 2009

I'm pulling info from an XML file... there are three variables (year, month, day) that I need to process further in another function, but I can't figure out how to send them out of the function and into the next for processing.

Is it possible to make their values globally accessible?[code]...

View 9 Replies

ActionScript 3.0 :: Multiple Values Within A Single XML Attribute?

Mar 27, 2011

Is there a way to parse a single XML attribute into an array?

Something like

<images>
<image index="0,1,2"></image>
</images>

and somehow parse it into an array like

indexArray[0]=0, indexArray[1]=1, indexArray[2]=2?

View 2 Replies

ActionScript 3.0 :: Add The Values From Multiple Text Fields?

Apr 8, 2011

What I have is two buttons that when clicked they add an input text field and a third button that puts a text field and gives you the total value of the two input fields after the user inputs some numbers, the problem is that the buttons adding the input fields can be clicked multiple times and of course adding a new input field each time they are clicked and as you can imagine when I try to add the values I only get the result of the last two fields added.

How can I tweak my code so it adds-up the total value of all input fields on the stage?

I didnt test my code it may have some errors, I just put it together to show the concept.

ActionScript Code:
button1.addEventListener(MouseEvent.CLICK, addField);
button2.addEventListener(MouseEvent.CLICK, addField2);
button3.addEventListener(MouseEvent.CLICK, addTotal);

[Code].....

View 9 Replies

ActionScript 2.0 :: Compare Multiple Values In An Array?

Mar 8, 2006

right way to solving this problem, the truth is im not even sure how to structure it before Ive even got down to coding...the scene

Code:
values = new Array("v1", "v2", "v3", "v4", "v5");
I have 100+ records in this array. v1 - v5 all contain number values.

[code].....

View 13 Replies

ActionScript 3.0 :: Call Multiple FlashVars Values?

Mar 20, 2009

In HTML:

<object id="myId" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="410">
<param name="movie" value="swf/navbar.swf" />

[Code]....

View 8 Replies







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