A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Button to open new window?

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    27

    Button to open new window?

    I'm trying to make it so a line of text is a button, and when clicked, a internet window opens up. How would I go about this? Thanks.

    [I need detailed instructions, BTW, I'm a newbie.]

  2. #2
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    The fastest and easiest way is to make an invisible button. Start by going to Insert/New Symbol. Make it a Button. Inside the button timeline, put a keyframe in frame 4. Select the Rectangle tool then select the stroke tool in the tool panel, the pencil, and below that, click the red cross thing to turn off the outline. Draw a long narrow box, maybe 12 pixels high and 40 long. all of this in frame 4. Select the color rectangle shape and move it's top left corner to 0, 0 in the stage.

    Now, go back to the text and drag one of those invisible buttons from the library and cover the text with it. If you need to make it longer or shorter, use the width and height boxes in properties.

    Now just put the button code on the button;

    on(release){
    getURL("http:www.sitename.com", "_self");
    }

  3. #3
    Junior Member
    Join Date
    Mar 2007
    Posts
    27
    Weird.. I did that, and when I test the movie in Flash, the button works, but when exported and uploaded to my website, it doesn't work.. ?

  4. #4
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    It should work, unless you have two buttons touching or over the top of each other.

  5. #5
    Junior Member
    Join Date
    Mar 2007
    Posts
    27
    Could you test it out for me? I'm thinking Flash doesn't work right on my computer.. some Flash things click, whereas some don't, and it varies with applications.

    Go here.. http://www.tiffanydavisphotography.com/

    and from the home link, click "online proofs". Does it work for you? Does it open a window saying "login here"?

  6. #6
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    I can't even see the movie, just a little box where it's supposed to be. You should publish the movie and an html page from flash and use the html page. It has all the code to play the embedded movie.

  7. #7
    Junior Member
    Join Date
    Mar 2007
    Posts
    27
    Apparently I didn't know how to correctly publish a movie. -winces- First time. Thanks for your help, publishing it correctly made it work.

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