This content has been marked as final. Show 4 replies
the only way i know of doing this is by embedding a flash swf that you've coded to do this. you can interface back and forth by using the ExternalInterface class or if the flash swf that you built is in as3 than you can bubble events back and forth pretty easily.
I'm not sure how powerful you need your map to be but check out yahoo maps as well. they have a "semi" easy map integration thats built for as3.
thanks rotoole, my maps will not need to be that detailed but its an attractive concept.
if you have any links on as3 events communication b/w flex and swf/flash please let me know
dispatching the event and setting the "prog" var to the % in which i want my meter to display
//heres the flex side
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#000000" width="100%" height="100%">
public function populate(mySize:Number):void
prog=mySize * 10;
dispatchEvent(new Event("setMeter", true));
<mx:SWFLoader source="meter.swf" width="100%" height="100%" id="mtr1"/>
what im doing here is adding an event listener from my embedded swf (4 parents deep).
then setting a var(myFlex:Object) to the movieclip.parent.parent.parent which would be the flex movieclip
then actually grabbing that var "prog" to figure out what level to set the meter.
//heres the flash side
var mm:MovieClip = this;
var myFlex:Object = mm.parent.parent.parent;
i know there are definitely better ways to do this but it works for me. i have used the external interface class and local connection class but this works pretty well for me. im currently using the external interface with the yahoo maps api and it works really well but im having trouble using more than one external interface instance in the same app....so i went this route.
i found something else in my travels that might help. theres a google code group that have a .swc library that you can import that has a lot of altered/upgraded components. if you check out that link there is a image map component that should do what you need.