dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Opening popup on load

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    3

    Opening popup on load

    I am trying to get a swf to open a new window as soon as the swf is loaded by the html. I understand this is really easy but I have been flicking through several tutorials and it just doesnt seem to be working. any suggestions? thanks

  2. #2
    Member
    Join Date
    Mar 2007
    Posts
    79
    What kind of window? An html window?
    This maybe incorrect but can you use JS in an actionscript function?

    function init() {
    navigateToURL(new URLRequest("javascript:window.open("window2.html". ..
    }
    init();

  3. #3
    Junior Member
    Join Date
    Jul 2009
    Posts
    3
    where would I put that code?

  4. #4

  5. #5
    Junior Member
    Join Date
    Jul 2009
    Posts
    3
    Code:
    function init() {
    navigateToURL(new URLRequest("javascript:window.open('http://www.google.com','mywindow','status=1');"));
    }
    init();
    Here is my code, It is in the Layer 1:Frame 1 Actions. It opens a blank page instead of the url. Also is there any way to make it so it doesnt trigger the firefox popup thing?

  6. #6
    http://pat.theorigin.net cresquin's Avatar
    Join Date
    Jun 2003
    Location
    Los Angeles, CA
    Posts
    685
    There is no way to keep it from triggering the firefox thing, this is in-fact a feature and security measure. Imagine me making a script that opened a new window on Enter Frame at 30 fps, it would crash the browser asap.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center