ForumsProgramming ForumSetting Rang Variables

2 3235
rytherix
offline
rytherix
68 posts
Nomad

I need to somehow make flash recognize a variable as being any number between 2 different numbers like
i>=1 but <= 40
I know I can use
for (i=1; i<=40; i++){

}

but I need more versatile code than that
any help would be greatly appreciated

  • 2 Replies
No_Thumbs
offline
No_Thumbs
20 posts
Nomad

if ( i >= 1 && i <= 40) {


}

rytherix
offline
rytherix
68 posts
Nomad

no, that wont work, I am trying to create a variable that can be used in targeting duplicates like _parent["dupli"+i]
but I dont want to use
for (i=1; i<=40; i++){
_parent["dupli"+i]
}

because that method is inefficient and adds a ton of lag

Showing 1-2 of 2