#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    26
    Rep Power
    0

    Calling a popup from Flash


    Hi,

    I've set FScommand, for calling a pop-up window from flash, in flash file, I embed this action in the button,

    on (release) {
    fscommand ("call_popup", "testpage.htm");
    }

    and in the html file, i've added,

    <SCRIPT LANGUAGE="VBScript">
    <!--
    // Catch FS Commands in IE, and pass them to the corresponding JavaScript function.

    Sub myslash_FSCommand(ByVal command, ByVal args)
    call myslash_DoFSCommand(command, args)
    end sub

    // -->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function myslash_DoFSCommand(command, args) {
    if (command == "call_popup") {
    window.open(args, 'popMe','directories=0,status=0,menubar=0,toolbar=0,scrollbars=1,resizable=no,copyhistory=no,width=6 30,height=450,top=200,left=200')
    }
    }
    //-->
    </SCRIPT>

    in IE, it works fine, the window can be pop-up, but in Netscape, no response at all, why?
  2. #2
  3. busy...is there any other way?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Amersfoort, Netherlands
    Posts
    259
    Rep Power
    13
    I wouldn't use a FS command for this, all you need is:

    In the head part of your html file add this:

    <SCRIPT type="text/javascript" language="JavaScript">
    <!--
    function newwin(location,name,w,h)
    {
    var scrw=(screen.width/2)-(w/2);
    var scrh=(screen.height/2)-(h/2);
    window.open(location,name,'scrollbars,left='+scrw+',top='+scrh+',width='+w+',height='+h);
    }
    //-->
    </SCRIPT>

    and call it with a button in flash using:

    GetUrl
    javascript:newwin(popupfile.htm','hos',300,400)

    Good luck
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    26
    Rep Power
    0

    thanks


    thanks, i can handle it now

IMN logo majestic logo threadwatch logo seochat tools logo