Get the latest Education e-news
 

Go Back   Game Career Guide Forums > Design
Forum Home Register Members List Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-09-2009, 04:57 AM   #1
Alexander Maw
Junior Member

Activity Longevity
0/20 15/20
Today Posts
0/11 ssssssss3
Default Learning to prototype in Flash 10

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.
Alexander Maw is offline   Reply With Quote
Old 09-09-2009, 08:51 AM   #2
Protector one
Moderator

Activity Longevity
2/20 17/20
Today Posts
1/11 ssssss692
Location: Netherlands
Default

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.
__________________
My name is Louis. Hi!
Uh oh! The princess is in another signature!
Protector one is offline   Reply With Quote
Old 09-09-2009, 11:09 AM   #3
Alexander Maw
Junior Member

Activity Longevity
0/20 15/20
Today Posts
0/11 ssssssss3
Default

Quote:
Originally Posted by Protector one View Post
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.
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.
Alexander Maw is offline   Reply With Quote
Old 09-10-2009, 09:33 AM   #4
Protector one
Moderator

Activity Longevity
2/20 17/20
Today Posts
1/11 ssssss692
Location: Netherlands
Default

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.
}
Is that what you want?
__________________
My name is Louis. Hi!
Uh oh! The princess is in another signature!
Protector one is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 11:05 PM.






UBM Tech