dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Been up all night! 7am nearly there!!! BUT...

  1. #1
    Member
    Join Date
    Oct 2000
    Posts
    91
    I have two buttons on the main movie. Both are GET URL java pop-ups (javascript:newWindow).

    When you press one it's window size opens and the movie plays...BUT...

    When you press the main movie window again and press the second button (with the first still running behind the main movie browser window) it loads into the first pop-ups movie window and is therefore the wrong sized window for it.

    hope this kinda makes sense...7.44am here in london and been up all night...please help us out!

    cheers

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

    Post


    There are two ways of fixing this, one would be to write to javascript functions and to change the button actions so each button uses a seperate one. This is a bit bulky and not very efficient. Much better would be to write a function that accepts all the variables for a movie eg:

    function windowMe(file,name,attrib) {
    window.open(file,name,attrib);
    }

    then on the button action place

    javascript:windowMe('file.htm','window','width=100 ,height=100')

    using this will allow you to add more buttons later without having to change your javascript function

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