|
|||||||
| Forum Home | Register | Members List | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||
|
Junior Member
|
I've been away from Flash for a while, think the last one I used was MX 2004 or something. Anyway, I want to do some prototyping in Flash 10 for my portfolio. It doesn't help that I've been away from it so long, but it seems very different, and a lot of my old stuff no longer works. I was wondering if anyone could point me to good books or websites for this sort of thing. Doesn't really need to be game tutorials, though obviously I want to do some heavy scripting rather than just animating.
It would be good if I could just decide I needed to learn how to do For Loops and be able to look it up. Right now I can't figure how to call the iteration number within the loop properly. |
||||||||
|
|
|
|
|
#2 | ||||||||
|
Moderator
Location: Netherlands |
I haven't ever dabbled in AS3 myself but I highly (HIGHLY) doubt they changed the syntax of for-loops going from AS2 to AS3. So,
for (var i=0; i<someNumber; ++i){ should work.
__________________
I'm a web developer by profession, but a game developer by heart. Uh oh! The princess is in another signature! |
||||||||
|
|
|
|
|
#3 | ||||||||
|
Junior Member
|
Sorry, I was perhaps unclear. I wanted to call new entities for each iteration through the loop, so make a tile1 for example the first time through, then tile2 and so on (actually it would start at zero now I think of it) but I can't figure how to add the current value of i to the entity name.
|
||||||||
|
|
|
|
|
#4 | ||||||||
|
Moderator
Location: Netherlands |
It's not pretty, but you can use an eval. Something like:
Code:
for (var i=0; i<someNumber; ++i){
var obj = eval('tile'+i);
obj.doSomething();
//etc.
}
__________________
I'm a web developer by profession, but a game developer by heart. Uh oh! The princess is in another signature! |
||||||||
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 06:07 PM.





















Linear Mode

