Actionscript calling Javascript syntax?

Discussion in 'Programming' started by elkiwi, Jun 19, 2008.

  1. #1
    Hi, I'm using this code below to call a lightbox script from a flash file which works fine:

    getURL("javascript:Mediabox.open(\'http://www.mysite.com/reel08.flv\', \'Kaleidoscope\', \'mediabox[600 450]\');void(0)");
    Code (markup):
    But...

    I would like to use the variable below from the flash file to replace the hard coded URL: http://www.mysite.com/reel08.flv

    this._parent.abreLink
    Code (markup):
    "abreLink" contains a URL taken from an XML file but I don't know the syntax to use the variable with the javascript in the getURL part.

    the original code was this:

    getURL(this._parent.abreLink);
    Code (markup):
    Would really appreciate any help.

    Thanks
     
    elkiwi, Jun 19, 2008 IP
  2. scottexpo

    scottexpo Peon

    Messages:
    1
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just do this:

    getURL("javascript:Mediabox.open(\" + this._parent.abreLink + "\", \"Kaleidoscope\", \"mediabox[600 450]\");void(0)");
    Code (markup):
    -Scott
     
    scottexpo, Oct 25, 2008 IP
    elkiwi likes this.