Flash ’simulate download’ static var bug, rant…
July 10th, 2007
ahhhhh, I’ve been trying to work out for the past few hours now, why when i try to ’simulate download’ does my SWF not work…. its a bloody Flash IDE bug - apparently Flash forgets to flush all static variables, so any singletons or persistent variables are kept in memory, in turn sending my SWF coo coo! A nice way of demonstrating what I’ve come across is here at 5etdemi’s blog
I thought i would post about this because i couldn’t find any help on my particular issue. The solution to the above problem is quite simple and thats just to control the instantiation and death of all static variables, which i got immediately sent back a step in my quest for a solution due to me already doing this… my problem lies in amfphp’s as# class files containing a static variable somewhere, and my whole SWF depending on the ‘onResult’ result of a call on the application init().
Still trying to hunt down these smelly static variables…. (boooo! the crap side of coding)
I hope someone might stumble across this to their delight
August 2nd, 2007 at 9:37 am
Thanks for posting this. I’ve struggled with this bug too. In my case, I’m creating singleton Model, View and State Machine so when I publish the first time it’s all cool, but Simulate Download will stack my objects, observers and triggers. Not cool.