A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Click flash animation to go to site - end of my tether!

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    10

    Unhappy Click flash animation to go to site - end of my tether!

    Hi all

    I've got a flash animation attached which I added a layer to and follow the post at http://board.flashkit.com/board/show....php?p=4242023 to try and make it go to a url when the layer is clicked.

    You can see the animation at http://www.atouchofromance.com.au/te...50withurl.html but when it is clicked on, instead of going to the site I specify (http://interestfree.com.au/en/index....002-GECL-00232) it goes to http://www.atouchofromance.com.au/temp/undefined

    I'm nearly at the end of my tether here - have tried it in flash cs3 trial with a number of tutorials online,. and I also just bought Koolmoves, tried it as well but it does exactly the same this. I've set Flash 8 export and network access in publish options, so don't know where things are going wrong, and client is getting anxious and wanting it like yesterday!

    Please help!

    Thanks
    Carl
    Attached Files Attached Files

  2. #2
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    After looking at the FLA, I noticed you call an "invisiButton" which doesn't exist. So you can delete the 2 statements on Frame 1 and just add:

    Actionscript Code:
    clickTag = "http://interestfree.com.au/en/index.html?gemid1=9002-GECL-00232";

    The clickTag layer holds the actual button with the code:

    Actionscript Code:
    on(release){
        getURL(clickTag, "_blank");
    }

    So, basically it is going to the URL defined by the variable "clickTag" which we set to the link above.

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    10
    Thanks so much Steven!

    With a couple of small changes, it worked nicely!

    I modified the code above to this:

    Actionscript Code:
    invisiButton.buttonMode = true;
    clickTag = "http://interestfree.com.au/en/index.html?gemid1=9002-GECL-00232";
    invisiButton.onReleased = function() {
        getURL(clickTag, "_blank");
    };

    Carl

  4. #4
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    FYI, the command isn't onReleased, it is onRelease, if it is right it should change to blue. And, you don't need:

    Actionscript Code:
    invisiButton.buttonMode = true; // < delete this
    clickTag = "http://interestfree.com.au/en/index.html?gemid1=9002-GECL-00232";
    invisiButton.onReleased = function() { // < delete this
        getURL(clickTag, "_blank"); // < delete this
    };

    There is no invisiButton in the source I looked through.Try it with comments and it will still work. There is only 1 button in the clickTag layer. Just to code efficiently remove it.

    Glad to hear it worked.

Tags for this Thread

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