A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Javascript and Flash

  1. #1
    Junior Member
    Join Date
    Sep 2001
    Posts
    6

    Javascript and Flash

    I have a flash button on my html site. I want it to open a new window with certain properties.

    Previously I was using a Javascript function to open the new window with no scrollbars and 400x300.

    How can I do the same in flash??

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    252

    Post

    Easy:

    Code:
    getURL("javascript:window.open('filename.htm','windowname','width=400, height=300, scrollbars=no')");

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Posts
    6
    Okay, I've tried that but then javascriptpen.window appears in the address field.

    Here is the code I've used:

    on (press) {
    getURL ("javascript:window.open('http://www.bickgreen.co.uk/ContentManager/Content/CMPromo/Dsp_Intro.html', 'CMPresentation', 'location=no menubar=no scrollbars=no status=yes toolbar=no width=640 height=480')");
    }

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    252
    oops silly me i for got about one thing, do this and it shouldn't:

    Code:
    getURL("javascript:void(window.open('filename.htm','windowname','width=400, height=300, scrollbars=no'))");
    hehe


  5. #5
    Junior Member
    Join Date
    Sep 2001
    Posts
    6


    I must be doing something wrong because all I am getting is a blank window with the following in the address bar:

    javascript:void(window.open('http://www.bickgreen.co.uk/ContentManager/Content/CMPromo/Dsp_Intro.html'

    Here's the code I am putting in flash:

    on (press) {
    getURL ("javascript:void(window.open('http://www.bickgreen.co.uk/ContentManager/Content/CMPromo/Dsp_Intro.html', 'CMPromo', 'scrollbars=no, width=640, height=480'))");
    }

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    252

    Post

    mmm

    dont know what you could be, the code works i tried it locally and i get a green page that starts with 8 out of 10 companies...

    it should actually be working!

  7. #7
    Junior Member
    Join Date
    Sep 2001
    Posts
    6
    :P

    That version you saw was just a temporary mock up. I wasn't going to go live until I fixed the JS error. As it turns out, I uploaded the .swf with your code and it worked perfectly!

    Don't understand why if hammed up locally but everything's fine so cheers...

    ;P

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