views:

26

answers:

1

this piece of code is being placed inside a swf which is then being placed inside a mxml swfloader. The ProductDesigner is the name of the application and the selectRed is a HSlider mxml component. The error that I receive is that "Access of undefined property ProductDesigner" in the Flash CS5 when testing the swf. Yes I am able to pick up the intellisense to know that it knows that there is a ProductDesigner in the whatever it's called.

private function ChangeColor(event:MouseEvent):void { var red:uint = ProductDesigner.mainTabs.tabContentColor.selectRed.value; var green:uint= ProductDesigner.mainTabs.tabContentColor.selectGreen.value; var blue:uint= ProductDesigner.mainTabs.tabContentColor.selectBlue.value;
this.transform.colorTransform=new ColorTransform(0,0,0,1,red,green,blue,1); }

If this can't be done, is there a way to create a custom event that returns the forementioned data?

A: 

Sure, it can be done using SWFLoader you can access every public Class, Component or any other part of the application.

When are you trying to access it? are you waiting for the Complete Event?

Avi Tzurel
Well the function is invoked on a mouse click event. So yea I guess you can say the swf is already loaded. When I publish my swf, do I need to point the publishing location to be in the flex application folder?
tetsuo