Skip to main content
Participant
May 21, 2010
Question

TFL flashvars bug

  • May 21, 2010
  • 1 reply
  • 10127 views

Hi everyone!
During the project migration to Flash CS5 I discovered an unexpected problem. If the scene  contains at least one component of the TFL, then the all flashvars variables are "undefined". Delete  a component from the scene, compile - all works fine. Adds - again  undefined.

FlashPlayer 10,0,45,2

Sorry from  my English

This topic has been closed for replies.

1 reply

Participant
May 28, 2010

Found the same issue.

May 28, 2010

I can reproduce the issue. I've started the wheels turning to figure out what's going on.

June 1, 2010

OK - it looks like this is an issue with the Flash Pro CS5 preloader code. I'm told there will be a technote published for this problem.

Here's a workaround I got from the engineer who looked into this:

Typically you could access the flashvars parameters in AS3 by doing something like this:

var params:Object = loaderInfo.parameters;

But to work around the issue we are having with the TLF RSL preloading, you need a little bit of extra code:

var params:Object = loaderInfo.parameters;

if (parent != null && parent.parent != null) {

                params = parent.parent.loaderInfo.parameters;

}

For the work around to work correctly THIS CODE NEEDS TO BE ON FRAME ONE. It cannot be in a user defined constructor (too early) and it cannot be in frame two (too late). We need to be clear about that.

While there is not a schedule for releasing a fix to this issue, we definitely would want users to first grab the flashvars the normal way and then check parent != null && parent.parent != null, because I hope that in the future we will be able to fix this issue, and we do not want users creating content that would be incorrectly applying a work around when one is no longer necessary. So definitely those checks are important.

Alan