Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Popups in flash button

    Hi there...

    I'm trying to put a link on a flash button on my webside for a chat, and i would like to open the chat applet in a popups for secure reasons.

    Anyways, i'll tried to put this code on it, but is not working.

    on (release)
    {
    getURL("javascript:newWin=void(window.open('Chat/index.htm','newWin','resizable=0,status=0,menubar= 0,toolbar=0,scrollbars=0,location=0,directories=0, width=950,height=650,top=60,left=60'))");

    }

    I know that i can open it on other ways like this

    on (release)
    {
    getURL("http://www.mywebside.com/chat/index.htm", "_blank");
    }

    But i would either like to open it in a Popups.

    Please help me.... Thank you in advance!!!!

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,
    The problem is ...... new window=void... try this.....


    Code:
    on (release) {
    getURL ("javascript:NewWindow=window.open('Chat/index.htm','newWin','width=950,height=650,left=60,top=60,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');  NewWindow.focus();      void(0);");
    }
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  4. #3

    Default Popups in flash button

    Thx for the code NTD, but unfortunatly its not working.
    Do you know an other way to open Popups from flash button???

  5. #4
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    Most forum boards have a difficult time displaying javascript code. The code example above should be a single line of code in Flash. If you copy and paste it the way the forum board posts it, it wont work. Another method is to define a pop up function in the flash movie and call the function to initiate the pop up....

    Code:
    function launchNewWin(url, wdth, hdth, windowNewName) {
    	if (windowNewName == undefined) {
    		var windowNewName = "newWin";
    	}
    	getURL("javascript:window.open(\""+url+"\",\""+windowNewName+"\",\"width="+wdth+",height="+hdth+",top=\"+((screen.availHeight/2)-("+hdth/2+"))+\",left=\"+((screen.availWidth/2)-("+wdth/2+"))); void(0);");
    }
    //*******Notice********
    //the getURL method using javascript should be a single line of code. 
    //forum boards often post this incorrectly formatted
    Just declare it on frame1 of your flash movie and when ever you want to launch a new window, just write...
    Code:
    _root.launchNewWin("myUrl.htm", 550,400,"myNewWindow");
    hope it helps
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  6. #5

    Default Popups in flash button

    Hi NTD... i found my self an other way how to call a popup.

    Anyway this function that you wrote is much butter than my, and i'm going to copy it some where for the next time i need it.

    Thanx for your help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. flash button works in flash but not in html preview?
    By bazmanblue in forum Flash Scripting
    Replies: 0
    Last Post: 10-02-2006, 11:03 AM
  2. linking to URL from flash button
    By diebold in forum Flash Scripting
    Replies: 8
    Last Post: 05-25-2006, 11:28 PM
  3. help with flash button
    By bl4ckman in forum Flash Scripting
    Replies: 6
    Last Post: 10-29-2005, 11:38 PM
  4. Action Script for separate PopUps
    By rachna in forum Advanced Flash
    Replies: 4
    Last Post: 08-05-2005, 10:21 PM
  5. Button with if/else statement. Help please! (Flash MX)
    By aussie01 in forum Flash Scripting
    Replies: 11
    Last Post: 12-22-2004, 03:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial