Be a Supporter!

stupid for question

  • 283 Views
  • 5 Replies
New Topic Respond to this Topic
TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
stupid for question 2009-03-18 22:48:09 Reply

sorry for the stupid question, but i'm trying to make a for loop that declares the vars flashname1 through flashname100. this is what i've tried to do, and, yes, it's on a movie clip, but it won't work, can anyone help me?

onClipEvent(load){
	this._visible = false;
	for(i=1;i<=100;i++){
		var _root.flashname[i] = "it works";
	}
}
onClipEvent(enterFrame){
	trace(flashname4);
}

thanks for any help.

TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
Response to stupid for question 2009-03-18 23:20:02 Reply

bump?

TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
Response to stupid for question 2009-03-19 00:08:21 Reply

... bump again?

i really need help man.
Redshift
Redshift
  • Member since: Feb. 12, 2005
  • Offline.
Forum Stats
Member
Level 15
Programmer
Response to stupid for question 2009-03-19 01:08:16 Reply

Use an array...


#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}

BBS Signature
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to stupid for question 2009-03-19 06:22:32 Reply

onClipEvent(load){
	this._visible = false;
	for(var i=1;i<=100;i++){
		_root["flashname"+i]="it works";
	}
}
onClipEvent(enterFrame){
	trace(_root.flashname4);
}

- - Flash - Music - Images - -

BBS Signature
TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
Response to stupid for question 2009-03-19 09:09:41 Reply

thanks a lot