1

I am trying to change iframe src from a flash button which is located outside from iframe

here is my code

this.contact.onRelease = function() {
    navigateToURL(new URLRequest("page2.html", target="myframe") );
};

but this is not working

putvande
  • 15,068
  • 3
  • 34
  • 50
Vipul
  • 414
  • 3
  • 14

1 Answers1

1

It is possible to change the iframe content without the ExternalInterface but you are also restricted to your own domain I think. You were almost right with your code. I'm not sure if the this.contact.onRelease is going to work but the navigateToURL should be like this:

navigateToURL(new URLRequest("page2.html"), "myframe");

You were assigning the target to the URLRequest and also the target is just a string, so without target=...

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL()

putvande
  • 15,068
  • 3
  • 34
  • 50