Well.. I have to say this is one of those things that you don't hit too often, but when you do it's a real head banger (on the keyboard that is).
Here's the scenario: I build a widget SWF and a sample "host" SWF that loads the widget, sets some variables in the widget, and then the widget displays. No biggie, right?
Well, I package it all up and hand it off to a co-worker. He tests it and it works in the Flash IDE but not in the browser. We both scratch our heads a bit and dig into code. Lots of tracing and fiddling and hitting keyboards with hammers ensues but it still doesn't work. He can't set the value of variables in the loaded clip, and can't retrieve values from known variables in that loaded clip. There's a bunch of things that could keep the variables from getting set, but the app worked in the IDE but not in the browser.. hmmm..
I guess both of us probably ran into this "gotcha" two or three years ago. It was just long enough ago that it was in the back of our minds far enough that we couldn't quite dig it back up. The key finally came when he uninstalled Flash Player 9 and installed Flash Player 7 and suddenly the app worked in his browser. Bingo! The cobwebs cleared away from the synapses long enough for me to remember there was a change in security between FP7 and FP8.
With that it was a matter of him going to the Adobe Flash Player Settings Manager and adding the directory that the files are located in. If you're a base jumper you might feel very comfortable adding an entire drive in there as "trusted".. or you might go the safe route and just add a directory or two.
I love it when a fix is so easy. Just change a setting and keep on trucking for the next few years.
can’t access variables in loaded movieclip? Thursday, October 26, 2006
Have Your Saycomments & trackbacks
The trackback URL for this entry is: Trackbacks are disabled for this entry
-
Commenting is not available in this weblog entry.
26 Oct 2006 at 02:50 am | #
Mmm...Yes this is a good one. I always remember to test in multiple browsers as IE doesn't always pop up the settings manager warning about untrusted locations, and just fails silently. FF does pop up the warning for me 100% of the time (your results may vary). I think I too pulled my hair out for a bit on this one only last month
Out of habit now, I always dump the contents of flash projects I receive into my DEV folder straight away which is trusted.