1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Help with linking buttons on Flash CS5.5

Discussion in 'Web Design & Development' started by CrazyComputerMan, May 30, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. CrazyComputerMan

    CrazyComputerMan Thread Starter

    Joined:
    Apr 16, 2007
    Messages:
    13,695
    Tried everything that i think it should work but it isnt.

    Tried added timeline with this code

    myBtn.onRelease = function() {
    getURL(http://www.yda.org.uk/events/events.html);
    };

    Still dont work. They will be on that path when i upload new website.Why?
     
  2. CrazyComputerMan

    CrazyComputerMan Thread Starter

    Joined:
    Apr 16, 2007
    Messages:
    13,695
    The button name is events_btn

    Added AS to the layers. Probably why itsnt working.
     
  3. ccube

    ccube

    Joined:
    Jun 15, 2010
    Messages:
    145
    The AS3 code format that CS5 uses is very different to the AS2 code you have there. Try this:

    Code:
    [SIZE="4"]
    events_btn.AddEventListener(MouseEvent.CLICK, goToURL);
    function goToURL(event:Event):void{
    navigateToURL(new URLRequest("http://www.yda.org.uk/events/events.html"), "_blank");
    }
    [/SIZE]
    All of the AS for a project should go on a layer dedicated to AS, makes it easier to find (not searching through frames)
     
  4. CrazyComputerMan

    CrazyComputerMan Thread Starter

    Joined:
    Apr 16, 2007
    Messages:
    13,695
    Can i replace "_blank" with "_self" as i want to open it in same window.

    Thanks
     
  5. CrazyComputerMan

    CrazyComputerMan Thread Starter

    Joined:
    Apr 16, 2007
    Messages:
    13,695
    Tried code above but error appear as

    Might help as tried to use Code Snippets.but have to use ActionScript 3.0 and Adobe only given me option to use AS 1.0 & 2.0.
     

    Attached Files:

  6. CrazyComputerMan

    CrazyComputerMan Thread Starter

    Joined:
    Apr 16, 2007
    Messages:
    13,695
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/999593