|
Flex 1.5 is hardcoded to work with Flash Player 7
ActionScript. Meaning, it can only compile with Flash 7 code; you can however,
make ActionScript calls to a Flash 8 SWF that is loaded in at runtime.
What you have below won't work. However, you can map what you have below
to call a Flash 8 SWF instead:
yourLoader.content.makeCall("getLocation").
WHere a makeCall function is defined in the Flash 8
SWF to make the ExternalInterface call
----- Original Message -----
From: shahnavaz
Alware
Sent: Wednesday, January 25, 2006 4:06 PM
Subject: RE: [flexcoders] ExternalInterface Question Hi
Jester, I am using Flash 8. Can I use
ExternalInterface for communication between JS and Flex 1.5 as below? Or do I
have to use swf ? -----------à Test.jsp <%@ taglib uri="FlexTagLib"
prefix="mm" %> <html> <head>
<meta http-equiv=Content-Type content="text/html;
charset=ISO-8859-1">
<title>JS to Flex </ title>
<script language="_javascript_">
function getLocation() {
return window.location.toString();
}
</script> </head> <BODY
bgcolor="#FFFFFF">
<mm:mxml border="1" id="flexApp"
name="flexApp">
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="600"
height="600" backgroundColor="#FFFFFF" >
<mx:Script>
<![CDATA[
import flash.external.ExternalInterface;
function displayPageLocation():Void {
locationDisplay.text =
ExternalInterface.call("getLocation");
}
]]>
</mx:Script>
<mx:TextArea id="locationDisplay" width="200" height="200"/>
<mx:Button id="locationButton" label="Test Communication"
click="displayPageLocation();"
/>
</mx:Application>
</mm:mxml> </body> </html> From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL It's available in the Flash Player
8. You can load a proxy SWF to call these methods for
you. Or, you can utilize a
LocalConnection from another Flash 8 SWF. I recommend the 1st
option. ----- Original Message -----
From: shahnavaz
Alware Sent: Wednesday,
January 25, 2006 3:11 PM Subject:
[flexcoders] ExternalInterface Question Hi, Is ExternalInterface not available in Flex 1.5? I have
to make a communication between a windows application and my Flex application
e.g. Clicking on an Image in Windows Application passes an object to my flex app
and highlights the values in my Datagrid. What are my options here? Thanks for
replies. Thank you, Shahnavaz
Alware Software
Engineer Office: 760-929-2300 ext
140 It is our
company policy not to accept email of any data controlled by the International
Traffic in Arms Regulations (ITAR). Please contact our Security Officer,
Alexander Houtzeel, for instructions and authorization to transmit such
data. -- 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
YAHOO! GROUPS LINKS
|

