A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: flash popup window which popsup when the page loads and then resizes itself and fit..

Threaded View

  1. #4
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    Well.. it sounds like what you actually would want to do is use regular javascript to open your pop-up window. That code generator works well if, for example, your sire opens up to a splash page, where the user has to click "enter" to enter the site. The generated code does need a little updating for AS2. Instead of using object code and placing it on your button/mc, you just place the code on the frame where your button/mc appears and you need to make sure you give your button/mc an instance name. With that said, you could use something like
    Code:
    // where "enterBtn" is the instance name of your mc/button 
    // and index.html is the html page you want to open in the popup
    
    enterBtn.onRelease = function(){
    getURL ("javascript:NewWindow=window.open('index.html','.: | WELCOME | :.','width=600,height=400,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(600/2); top_point = parseInt(screen_height/2)-(400/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");
    };
    if you just want your site to automatically sprout a pop-up window on load... do a google search for javascript and you'll find a thousand sites with free scripts. Look around, and you'll find one that works for you, as not all are cross-browser, some won't work in IE, some ONLY work in IE (i fricking hate IE)... I am certainly not the person to consult on javascript (all the scripts i use i get for free online) You could also search the forums here (which you actually should have done before posting) and you'll find a thousand different threads with solutions to the same/similar problems... here are a few: http://www.flashkit.com/board/search...earchid=282000

    hope that helps

    ---- BTW those links you posted as examples, DO NOT launch pop-ups when opened... at least not in Safari for Mac..
    Last edited by madzigian; 03-22-2006 at 08:10 PM.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

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