![]() ![]() |
Apr 28 2009, 11:39 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 10 Joined: 4-December 08 Member No.: 2,878 |
Hi Everyone,
Yes another problem to resolve. This time what im trying to do is run a function from a swf file that has been loaded into a imge tag.. mxBody is the <mx:Image> tag. mxBody.source = "images/avatar.swf"; the function id like to run would be colour. So im thinking it would be something like mxBody.source.colour(); but this gives me an error. Anyone able to help on this issue. Paul.. |
|
|
|
Apr 30 2009, 10:02 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 10 Joined: 4-December 08 Member No.: 2,878 |
Hi all,
I, with help from another forum, was able to resolve this issue too. OK, heres how i did it. The Child SWF had to have a document .as attached to it and the actionscript placed in there, it was so the parent would see the class bit probs. then in me Flex App i had CODE mxBody.source = "images/avatar.swf"; mxBody.addEventListener(Event.COMPLETE, swfLoaded); and yes, swfLoader would have worked here too. and the swfLoaded Function was CODE private function swfLoaded(e:Event):void { // SWF file has completed loading, Run functions from it. // Object( e.target.content ).colourSkin( 0xFF0000 ); } Hope this help others.. Paul |
|
|
|
Apr 30 2009, 02:00 PM
Post
#3
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Moderators Posts: 83 Joined: 6-July 08 From: Reykjanesbær, Iceland Member No.: 689 |
glad you got it sorted out =)
I wouldve helped ya if I knew anything about action script.. peace- Mitch. -------------------- A proud CartoonSmart student since 2005!.
|
|
|
|
![]() ![]() |
| Time is now: 10th September 2010 - 07:50 AM |