dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Two clicks from just one - Changing HTML & Flash from a single click

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    Two clicks from just one - Changing HTML & Flash from a single click

    Hey Folks:

    I have an HTML page with a Flash button that pops a window.

    I want the HTML page to change when the user clicks the flash button and the window is popped.

    I believe that this functionality would need to be contained in the flash button as that is what the user clicks on.

    Any help will be greatly appreciated.

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You just need to add....

    getURL("somePage.html");

    ...to the code on your button.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Thanks for the suggestion pellepiano, but this unfortunately did not work. I tried putting the GetURL statement before the other, after the other, changing the name of the window, etc.

    So let me explain this again.

    I have a flash button in "Window A" That button has the following code:

    on (release) {

    varHeight="600"
    varWidth="800"
    getURL ("javascript:window.open('intro.htm','XXX_Intro_Pa ge','width=800,height=600,top='+((screen.availHeig ht/2)-(" add varHeight/2 add"))+',left='+((screen.availWidth/2)-(" add varWidth/2 add "))); void(0);");

    }

    What I want the button to do is to ALSO change the page in "Window A" from the page with the flash button to another page completely.

    I tried adding an additional getURL statement, but it did not work - it kept popping a third window which is not what I want.

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    push to top in hopes of an answer...

  5. #5
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    If this does not work....

    on (release) {
    varHeight="600"
    varWidth="800"
    getURL ("javascript:window.open('intro. htm','XXX_Intro_Page','width=800,height=600,top='+
    ((screen.availHeight/2)-(" add varHeight/2 add"))+',left='+((screen.availWidth/2)-(" add varWidth/2 add "))); void(0);");
    getURL("somePage.html");
    }

    Make the button also go to a new frame where you only have ....

    getURL("somePage.html");

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  6. #6
    Gackter
    Join Date
    Aug 2003
    Posts
    35
    getURL("somePage.html", "_self");

    add a target _self to load the new page into the parent window... doesn't that help??

  7. #7
    www.designerunderground.co.uk
    Join Date
    Jun 2004
    Location
    UK
    Posts
    351
    I just posted the same thing in the javascipt popup thread. I'm trying to make the splash page popup the site and go to an outro page ... Please let me know if you figure it out.
    +
    You are not your job. You are not how much money you have in the bank. You are not the car you drive. You are not the contents of your wallet. You're not your ****ing khakis.

  8. #8
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Thanks for the replies folks!

    I am trying variations of the getURL statement in the code. It seems like it would be so simple - and I am sure I will smack my head when I finally figure it out!

  9. #9
    Senior Member
    Join Date
    Sep 2000
    Location
    POA, Brazil
    Posts
    323
    A simpler approach:

    Make your flash.swf button go to the splash.html page, using a geturl.
    Then, inside the splash.html code, load the pop up like

    Code:
    <body onLoad=window.open('pop.html','','width=200, height=100')>
    That should be something like this......

  10. #10
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Hello Gabi:

    I tried your suggestion and it worked like a charm. Thanks!

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