[flexcoders] Flex 2 and Flash 9 swf integration

2006-11-07 Thread bitfacepatrick
I'd like to host Flash 9 (all A3) swfs in my Flex 2 app. I'd like to
pass data between the two as well as have Flex call functions/methods
 within the hosted Flash swf. Is this possible? If so can anyone point
me to some good reference info? Thank you! 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Flex 2 and Flash 9 swf integration

2006-11-07 Thread Hasan Otuome


Yes, it's possible. Check out SWFLoader. The 9 SWF will be accessible/programmable through the content property of the loader. A basic example:Flex---private function initSWF(event:Event):void{    someSWF.content.addEventListener("clicked",clickHandler);}public function clickHandler(event:Event):void{    var button:String = someSWF.content["clickedButton"];    //do something with the returned data}Flash---var clickedButton:String = "";someButton.addEventListener(MouseEvent.CLICK, clickHandler);function clickHandler(event:Event):void{    clickedButton = event.target.name;    dispatchEvent(new Event("clicked"));}HTH...=)P E A C EHasanPS - initSWF is the event handler for the loader's complete event and don't forget to import flash.events.*;On Nov 7, 2006, at 10:14 AM, bitfacepatrick wrote:I'd like to host Flash 9 (all A3) swfs in my Flex 2 app. I'd like topass data between the two as well as have Flex call functions/methodswithin the hosted Flash swf. Is this possible? If so can anyone pointme to some good reference info? Thank you! 
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___