Welcome, Guest. Please login or register.
Did you miss your activation email?
02/07/12, 08:10
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash and AS 3 (Moderators: papachan, kofi addaquay)
| | |-+  externalinterface + pass in url from xml
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: externalinterface + pass in url from xml  (Read 796 times)
worked
Seasoned Programmer
***
Posts: 129


View Profile Email
« on: 06/13/10, 19:37 »

Hi there-   I have a simple photo viewer that pops a .html file into a separate window when any image is clicked.  With each click I need to pass in the url from the xml file that populates the photo viewer... put I'm failing to add the url to the externalInterface.call method.  How would I do that, because the code below doesn't work?  Any help is appreciated!

AS3: (this code snippet doesn't work)
Code:
if (ExternalInterface.available) {
  ExternalInterface.call("window.open", imgData[currentIndex].clickUrl, "win", "height=200,width=300,toolbar=no,scrollbars=yes");
}

imgData[currentIndex].clickUrl refers to the xml file
« Last Edit: 06/13/10, 19:41 by worked » Logged
worked
Seasoned Programmer
***
Posts: 129


View Profile Email
« Reply #1 on: 06/13/10, 21:36 »

All good, got it.  Just have to pass the value as a string, for instance:

Code:
if (ExternalInterface.available) {
  ExternalInterface.call("window.open", String(imgData[currentIndex].clickUrl), "win", "height=200,width=300,toolbar=no,scrollbars=yes");
}
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #2 on: 06/13/10, 23:01 »

XML-Data is allways string type Wink
Logged

happy flashing
Cool
Ronald
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything