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

    Join Date
    Oct 2002
    Rep Power

    im trying to get a button in flash to open a new frameset useing javascript

    what i am trying to do is get buttons in flash to open a new html frameset in a new window. i think im almost there...but i cant figure out what is hanging it up.
    here is my code:

    master.html (this is the main html page that calles for the main flash movie to play)

    <SCRIPT LANGUAGE= "JavaScript">
    function newWindow(content,SizeW) {
    frameWindow = window.open(content,"van_chadwick_martins_web_fusion",SizeW);
    // -->


    Then in my flash movie i have this action script on one of my bottons:

    on (release) {
    getURL ("javascript:newWindow('http://google.com','width=760,height=400');");

    could someone show me what im doing wrong please.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Back in the real world.
    Rep Power
    i am only used to flash 3 and 4. but with them it is not possible to call a javascript function in getURL()

    you have to use the "FSCommand" feature. read in the help file about it, itīs easy to use. flash has a special html template for FSCommand support. there you can read the javascript-code.

    canīt post details right now, i am at home and i have flash only at work...
    from my mind: the <object>/<embed> tag needs a name (or was it ID) attribute. the FSCommand function in JavaScript has to be called FSCommand_<name>(cmd, arg) (the name that you gave to the object tag, maybe it also is <name>_FSCommand(cmd,arg)). then you can use the Flash command "FSCommand(cmd, arg)" to call the JS function

IMN logo majestic logo threadwatch logo seochat tools logo