Adobe Dreamweaver Forums



Last 10 THreads :         Select Checked Out Files Within Folder (Last Post : ben_bloom - Replies : 0 - Views : 1 )           »          Library is missing names from splitter bar (Last Post : a_hayman - Replies : 4 - Views : 5 )           »          pop up blocker jacking my login (Last Post : JoeyD1978 - Replies : 3 - Views : 4 )           »          Help with navigation (Last Post : Jiva Mukta - Replies : 0 - Views : 1 )           »          Why is this not working!!! (Last Post : Boxing Boom - Replies : 3 - Views : 4 )           »          CSS: Mystery IE and Firefox issue (Last Post : Codesonic - Replies : 0 - Views : 1 )           »          Update scrollbar on text area? (Last Post : Handycam - Replies : 0 - Views : 1 )           »          debugger causing browser to crash (Last Post : thmunson - Replies : 4 - Views : 5 )           »          Passing variable between components (Last Post : Amy Blankenship - Replies : 3 - Views : 4 )           »          Flash Slide Presentation and CS4 motion tween (Last Post : pivovar - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-03-2008, 04:22 PM
cputnam14
 
Posts: n/a
Diggs:
Default Passing data from a SWF to Flex

Is there a way to pass data from a swf back to flex?

I have a flex app with an embeded swf that is a map of the USA. When a user
clicks a state, I want to pass the state to flex. I don't have a clue how to
start doing that, or if it is even possible. Any help would be greatly
appreciated



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-03-2008, 04:52 PM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Passing data from a SWF to Flex

From a loaded swf (AS3 that is) with some limitations. You can dispatch events
from the loaded swf using code on the timeline of the loaded swf. In Flex, use
a complete handler on the SWFLoader and retrieve a reference to the loaded swf.
Then register event listeners on the swf.

private function onLoadCompleted():void
{
var clip:MovieClip = mySWFLoader.content as MovieClip; //gets a reference to
the root timeline
clip.addEventListener("clicked", clickHandler);
}

<mx:SWFLoader id="mySWFLoader" source="my.swf" complete="onLoadCompleted()"/>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk