1. translating from AS2 to AS3 is a good idea. it's also not so simple for someone who's not entirely familiar with the methods.
2. the guy whose work i'm continuing is a monkey. [familiar, that feeling]
3. i've learned that flash isn't just loose in its handling of variable scope... it's wrong. there are things in the code that shouldn't work - and if i correct them, they don't. before anyone tells me i'm being an ass*, here's an example:
does anyone else feel like i've entered the twilight zone? the p and q variables aren't defined in foo, nor are they defined anywhere else in the code. if i declare and send everything correctly, the program crashes :S
function foo(){
p = global[1];
q = global[2];
bar(p, q);
}
function bar(a:Array){
doStuffWith(p);
doOtherStuffWith(q);
}
* i can't wait for that wonderful, spiritual moment where i realize that i'm being an ass. enlighten me, if you can!
last night was cool. i went to pg's, was presented with a gift that she'd wanted to hand me for my birthday but it hadn't been available... tropic thunder. i *adore* that movie! and i usually can't stand ben stiller's stuff. there's so much meta in that movie, so many great references...
we ate well and i consumed a fair amount of rum. after watching the movie, we headed to a pub on dizengoff to drink with pg's siblings and have a jolly good time.
we slept late, and woke up to a stormy, rainy day. i came home to work / study (although i didn't get much studying done), and we're now off to my belated birthday dinner.
i wonder if flash isn't doing what javascript does. where if you just start using a variable like that, it has a completely global scope. declaring the variables would then limit the scope. the correct thing to do, is to modify the method that uses p and q to accept two parameters
ReplyDeletethat's the freaky bit - i did just that, and it still didn't work... i probably should've mentioned my attempt :S
ReplyDelete