ActionScript 2.0 :: MX Multi For Loop?

Apr 27, 2003

man this site is awsome, i have learned so much. but unfortunantly i have run into a new problem. i have

for (f=0; f<10; f++) {
duplicateMovieClip(_root.guy, "guy"+f, f);
}
for (s=0; s<50; s++) {

[Code]...

only problem is, is that when the movies get duplicated, the numbers aren't right (ive done some testing and found that it is almost as if it is keeping the same variable in all the loops as the same, and is running the loops backwards (wierd)) anyways, apparently i dont know the for loop as good as i thought. i have tried rereading the for explenation, but nothin is clicking as to what i am doing wrong. any help or explenation would be great. (also, as a side question/statement-when i duplicate movieclips, they dont keep thier instante name in the duplicated ones, which is bad becuase i need to do hitTest and other things with the duplicated movieclips. any help with this would be great)

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Multi Preload And Loop?

Aug 21, 2007

i want to do is loop through an array of items, Each item has an image attached to it. But i only want it to go onto the next item once the image has been loaded fully.I have this wicked code that was kindly donated of someone off this forum.Now i know that this is possible as i've seen it but i'm not sure how to do it.Is it possible to adapt the exsiting codes below to perform this task? this is the code i have at the mo:

step loader:

PHP Code:

function createList(array, i, line, width, count, row) {
    //
    if (i == array.length) {[code].......

View 1 Replies

ActionScript 2.0 :: Multi Buttons In For Loop

Jul 28, 2011

If I have 16 buttons inside a for loop, how would I trace back the number that was pressed.

NumPageButtons = 16
for(i=1; i<=NumPageButtons; i++){
tempMC = eval("page"+i+"_mc")

[Code]......

when I do a trace it gives me 16 not the number (current button ) that was pressed

View 1 Replies

ActionScript 2.0 :: Resize Multi Objects Through Loop & Incrementing Variable?

Jan 5, 2009

if i wanted to modify the xy size properties of several pieces of media through a looping function and an incrementing variable how could i do it? resize multi objects through loop & incrementing variable

View 1 Replies

Multi File Preloader - File Start Loading Files But Does Not Loop?

Jan 6, 2010

what I'm trying to do is make a preloader that will preload about 20 external SWF files before it lets you get to my main file. I want to do this because my main file needs the SWFs to be ready to go once its done loading. I have looked around and i found a few ways to do this with the "if (loadedBytes>=totalBytes)" and the code loops back till the files are done loading... this would be just what i need but i cant seem to get it to work. the file just seems to start loading my files but does not loop and just runs the time-line even once i state what frames i want it to loop.

View 6 Replies

ActionScript 2.0 :: Multi Mc At Once?

Aug 27, 2004

Is it possible to creat a invisible mc with in 2 other invisible mc's and if so would there be any complications. Im trying to do something similar and it gets to the second layer but then doesnt want to load the third inv-mc. Like loading an external swf to a container mc then in that same mc have another external load and then another.

View 3 Replies

Have Multi-users Online?

May 27, 2010

Example: If my SWF has a simple 2D charactor sprite, which moves around on a 2d background... What will I need to make it so that a player has to create an account and sign in, and then others can do the same and they can all see each other in the room. I have been unable to find resources on what it takes to turn a flash game into a chatroom or an "MMO".

View 3 Replies

Multi Threading In Flex

Sep 29, 2010

I know that flex does not support multi threading however, I would like to clear a doubt.I have two events that call a same function. Suppose the two events occur at the same instant (or in quick succession) will the handler be called twice, one after the other or there is a chance that if the handler function is taking too much time to execute the same handler can start executing simultaneously.

View 3 Replies

Php :: AS2 Multi String Replace?

Nov 27, 2011

First my AS2 code:

txt.html=true;
txt.htmlText="This is an example: www.sample.com is not www.othersample.com";[code]....

First question is why my flash function always replace only first url? What I'm trying to do is send string from flash input textfield by PHP to mySQL table. Then, when flash will load it again all urls in my flash textfield will be clickable.Of course I can use preg_replace in PHP:

$comments = $_POST['comments'];
$comments = preg_replace("/([^w/])(www.[a-z0-9-]+.[a-z0-9-]+)/i", "$1http://$2", $comments);[code]....

I can also use some PHP function which will check whether sended data from flash already contains clickable url's, but if I need add another link in edited string, preg_replace not fire then...

View 2 Replies

IDE :: Way Of Writing Multi Movieclips?

Apr 1, 2009

What is a better way of writing this.

function fade() {
_root.mcBlue1._alpha = 50;
_root.mcBlue12._alpha = 50;

[code].....

View 1 Replies

IDE :: How To Make The Multi-hyperlink

Sep 10, 2009

i got a problem with building a Menu for my website, i'm using CS3, Actionscript 3 and i've a lot of buttons for one page, but i don't really know how to code them, because i juz know how to code single Button example :

btn1.addEventListener(MouseEvent.CLICK, goToEnter);
function goToEnter(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.exaple.com"));
}

so this is for single button, how if there are 5 buttons?

View 2 Replies

ActionScript 3.0 :: Create A Loop So Icons In Menu Continually Loop Indefinitely

Apr 16, 2010

I would like to create a loop so the icons in the menu continually loop indefinitly.[code]

View 2 Replies

ActionScript 3.0 :: Use A Loop To Create Text Field With The Loop's Current Value

Dec 11, 2010

I am attempting to use a loop to create text field with the loop's current value. The code looks like this:

ActionScript Code:
for (var i = 1; i<=10; i++) {
var 'nameHolder'+[i]+'_txt':TLFTextField = new TLFTextField();
'nameHolder'+[i]+'_txt'.x = 40
'nameHolder'+[i]+'_txt'.y = 40
'nameHolder'+[i]+'_txt'.text = "Hello World"
}

So essentially what it should do is create 10 text fields at 40, 40 with the text: "Hello World".

View 7 Replies

ActionScript 2.0 :: Infinate Loop For M.clip.the Looping Part Does Not Want To Loop?

Jun 13, 2004

i'm trying to do an infinate loop for my m.clip.the looping part does not want to loop...it loops back to my firrst frame even though there are two same picture in the movie clip.....here's a sample of what i use for the infinate loop script..

[Code]...

View 2 Replies

Multi-stage Objects From InDesign

May 13, 2011

I have exported a page from InDesign to FLA that contains an InDesign multi-state object (MSO) and when I bring it into Flash and export as a SWF, the MSP just cycles through all the contained images. There's an Adobe KB that states that this is a known issue and that ActionScript can be used to stop the MSO from cycling. Does anyone know the ActionScript used to stop this?

View 1 Replies

Professional :: How To Manage Multi Language

Dec 24, 2011

I have swf file containing a game with english language. for question sake will call it mygame.swfNow what I want to do, is to take the fla file and translate it to french and german and save to differen swf files.So now i have:English - mygame.swfFrench - ygame_fr.swfGerman - mygame_gr.swfSame game, different language.My question is: what is the acceptible / good way to contain text in fla file so it will be in one place? like hashtable or some array?I am developer, just not flash developer this is why Im trying to consoult Im not interested in keeping data in external files (xml), I want everything to be keept within swf.

View 1 Replies

Multi Languages In Flash Site?

May 7, 2010

I need to change language in a flash site, How can i change?.for example I want to change total language into Fracis in this site

View 1 Replies

Multi User Game Programming?

May 24, 2010

If u have any tutorials, books or links related to this type of code, please forward me for this or my mail id - swamy.webdesigner at gmail.

View 1 Replies

Flex :: 3 - Combobox With Multi Selection

Jun 15, 2010

I have a combobox with multi selection. when i click on add button, which ever data is selected in the Combobox, those data has to be displayed in the another comboBox.

[Code]...

View 1 Replies

Flex :: Multi-dimensional Arrays In AS3?

May 5, 2011

I am currently playing around with flex, I have C++ background, so I am not used to AS3.The problem is in the main*.mxml file I have fx:script block and I try to define a multidimensional array like that:

public var Board:Array = new Array(25);

I use a function to initialize the 2d-array:

public function initBoard():void {
var i:int;
var j:int;[code]....

This function gets called later on in the main loop to init and reset the "board" why doesn't it work. The only difference to the AS3 documentation is that it gets done in a function.

View 2 Replies

Asp.net :: Flash Multi-file Uploaders?

Sep 22, 2011

I am considering using the MultiPowUpload control from element-it on a project, as well as perhaps on a second. Does anyone have any feedback on that particular control? Does it actually work as advertised, handle errors well, etc?Multi-select of files (from a single 'browse' click, not multi-textbox)Progress bar (client requirement)ueue for upload (it's ok if it can only upload immediately)
Feedback from server - custom error messages (permissions,etc)Pass the session ID automatically, but I can use a URL hack for the upload page too Be able to remove files from the queue Support large files (~50MB, really up to 300mb would be perfect) Accessible/usable JS api
Can change the view style a little bit at least! Localizable - we need english, chinese, italian, and possible a few others Resume incomplete transfers (eg, connection dropped, so on, not required, but ++)I've been working with all of these below, and gotten most of them working in demo pages, finding issues as I go along.

[code]....

PL UPLOAD WON - for now! If we get complaints, or find it doesn't work in our real life scenarios, then we'll consider switching to MultiPowUpload. But it is good enough, and we can write some JS to do a few of the missing things. With chunking I had no problems with 300mb uploads. Yay.

View 1 Replies

ActionScript 2.0 :: Multi Dim Array Push?

Feb 9, 2009

I can push into an array just fine, but now I have an array created by a for loop. It has 30 numbers in it.

Now I want to go back and add another dimension to each element in the array.

So I might have (1,2,3,4,5,6....)

and I want to go back and add ([1,"Susan"],[2,"Matt"],[3,"Marc"]... I read somewhere that I need to loop it and first make each element and array and then push into arrayName[0].push as a loop, but that doesn't seem to work either.

View 4 Replies

ActionScript 2.0 :: Multi HitTest Targets?

Jul 24, 2009

I am currently making a game involving matchsticks. i have the dragging of the matchsticks working. But now i would like to know how to check if 2 (or more or less depending on what level) of the possible matchsticks are dropped on the target. When the right matchsticks are drop in the right places i will put in an action like "gotoNextFrame" or make the continue menu visible.

View 9 Replies

ActionScript 2.0 :: Add Multi-functions To A Button?

Sep 20, 2009

How to add multi functions to a button ?[code]...

and by first_btn I wanna to disable one of the second_btn functions on press .

but the rest of second_btn functions remain work.how to do this ?

View 3 Replies

ActionScript 3.0 :: Build A XML Multi Gallery?

Sep 30, 2009

Way to build a multi-gallery using XML.Just tell me how to structure the XML file, and the proper approach of accessing and loading in the images of each separate set of images.

View 0 Replies

ActionScript 2.0 :: Multi Dimensional Array From Xml?

Mar 9, 2010

How do i traverse multidimensional array so i can turn this into value objects :

Code:
<accordion_nav>
<item branch="PATIENT TYPES" level="1" treeID="10.00">[code]......

so each items has a propery of branch, treeID, and level?

View 0 Replies

ActionScript 3.0 :: Multi Images With Different Hyperlink?

Aug 21, 2010

how to code actionscripts3.0 for multi images with different hyperlink on Flash CS4?I tried but only 1st image work. There is error for 2nd and 3rd image

View 1 Replies

ActionScript 2.0 :: Load Multiple Xml And Not Multi?

Dec 4, 2010

I have this type of XML file name "test.xml"[code]...

I have to get the "post" title as button. if post doesnt have "post_child" then it will show the value inside other container_movieclip. But if it has post_child then it will show button withpost_child title as text on button inside the other container_movieclip.

View 0 Replies

ActionScript 3.0 :: Multi Touch Textfield?

Dec 19, 2010

I'm doing some application on the multitouch, everything is working fine, everything can be rotate, expand (pinch) but only one problem...all my text field disappear when I rotate it... but somehow the textfield will reappear when I rotate it back to its original angle (180 degree)...

can anyone tell me what to do so that my textfield will not disappear when I rotate it?

View 1 Replies

Multi Song Flash Player

May 10, 2010

I need to make player like this one URL...Is there a tutorial for this on this site already? If not does anyone know any good tutorials?

View 3 Replies







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