Forum ActionScript 3.0 problem: using playerio in flash builder (flex)

Problems and discussions relating to ActionScript 3.0 here.

problem: using playerio in flash builder (flex)

Postby raveclassic » November 2nd, 2010, 7:01 pm

Hi,

As I'm no designer, I tried to use playerio *.as files in a Falsh Builder project (flex)
the problem is FB can't connect to playerio with PlayerIO.connect function
as it requires a reference to the base stage as the first parameter, I passed flash.display.DisplayObject.stage()
everything seemed good but while connecting I got such error: "Parsed stage is not attached to document stage"
What should I do or it's impossible to use FB at all?

thanks
raveclassic
 
Posts: 2
Joined: November 2nd, 2010, 4:30 pm

Re: problem: using playerio in flash builder (flex)

Postby Benjaminsen » November 2nd, 2010, 8:47 pm

You should be able to simply pass the variable stage to the init method. If this fails, it's most likely because you are trying to connect before flash has attached your element to stage. The solution is to create a listener for Event.ADDED_TO_STAGE and connect when that triggers.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: problem: using playerio in flash builder (flex)

Postby raveclassic » November 2nd, 2010, 8:57 pm

It works!
thanks a lot!
raveclassic
 
Posts: 2
Joined: November 2nd, 2010, 4:30 pm


Return to ActionScript 3.0



cron