5 Replies Latest reply on Dec 26, 2009 11:05 PM by kglad

    on Release GetURL not working with movieclip animation

    kurtstoll

      I am a Noob to Flash/Actionscript and am having problems getting some movieclips to link to different URLs on release. I am able to get them to animate, and I am able to get them to link to an html page in the same folder, but I can’t get both functionalities to work at the same time and it is driving me crazy!!  I've tried putting the actionscript in the instance object, in the action layer, and other things and nothing seems to work!?

       


      Here is the link to the source file:   http://www.myfavorites.com/flashtest/header_v8_122209_v2.fla
      I believe that the actionscripting needs to be done in the "baners" movieclip, but it could also be the "Symbol 3" movieclip.  I'm not sure and this is where I also need help.

       


      Here is also a link to the .swf (http://www.myfavorites.com/flashtest/header_v8_122209_v2.swf).  See, if you mouse over the first two clips, they animate, but they do not go to the HTML page if you click on them (http://www.myfavorites.com/flashtest/success1.html).  The third clip will go to the page success1.html in the same folder if you click on it, but it does not animate on mouse over.

       


      I'm using Flash CS3 as my editor and I'm using ActionScript 2.0 for the scripting.

       

      Any help you can provide on this is most appreciated!!  I'm normally pretty good at figuring out things on my own, but This problem is driving me crazy!!

        • 1. Re: on Release GetURL not working with movieclip animation
          kglad Adobe Community Professional & MVP

          show the code you are currently trying.

          • 2. Re: on Release GetURL not working with movieclip animation
            kurtstoll Level 1

            Hi KGLAD,

             

            Thanks for responding.  First, full disclosure.  I purchased this .FLA from TemplateMonster.com and am trying to modify it for a client.  This is why I don't understand some of the coding.

             

            That being said, I have tried three different methods to get this to work (none at the same time).  Two where I insert ActiveScript into each instance of the movieclip and another where I insert ActiveScript into the timeline.  Below I have listed what I used and the results of each attempt.  Any help or guidance you can provide is much appreciated.

             

            Here is what I am trying with ActionScript in the timeline:

            ==============================================

             

            I have three instances of the "Symbol 3" movieclip inside of the "Baners" movieclip. The instances are named "item1", "item2" and "item3". Here is what I am trying at the beginning of the timeline for each instance of the "Symbol 3" movieclip like so:

            this.onMouseDown = function() {
            this.getURL("success1.html", "_self");
            }

            but modify it so that each one points to a different page, it doesn't work right.  Here is what I did more explicitly:

            -----------------------------------------------------

            For the "item1" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the 1st frame of the timeline for that instance:

            this.onMouseDown = function() {
            this.getURL("success1.html", "_self");
            }

            For the "item2" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the 1st frame of the timeline for that instance:

            this.onMouseDown = function() {
            this.getURL("success2.html", "_self");
            }

            For the "item3" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the 1st frame of the timeline for that instance:

            this.onMouseDown = function() {
            this.getURL("success3.html", "_self");
            }

            -----------------------------------------------------
            Results:

            - Animation works

            - Links do not work as intended  (ie. No matter which clip I click on, they all take me to success3.html, instead of the different pages I specified).

            -----------------------------------------------------

             

             

            Here is what I am trying with ActionScript in the different instances:

            ======================================================

             

            1st Attempt:

            -------------------

             

            For the "item1" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

             

            onClipEvent (load) {
            num = 1;
            }
            on (release) {
                getURL("success1.html", "_self");
            }

             

             

            For the "item2" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

             

            onClipEvent (load) {
            num = 2;
            }
            on (release) {
                 getURL("success2.html", "_self");
            }

             

            For the "item3" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

             

            onClipEvent (load) {
            num = 3;
            }
            on (release) {
                 getURL("success3.html", "_self");
            }

             

            -----------------------------------------------------
            Results for 1st Attempt:

            - Animation does not work

            - Links do work

            -----------------------------------------------------

             

             


            2nd Attempt:

            --------------------

             

            For the "item1" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

            this.item1.onMouseDown = function() {
            this.item1.getURL("success1.html", "_self");
            }

            For the "item2" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

            this.item2.onMouseDown = function() {
            this.item2.getURL("success2.html", "_self");
            }

            For the "item3" instance of the "Symbol 3' movieclip inside of the "Baners" movieclip, I put the following actionscript into the Actions for that instance:

            this.item3.onMouseDown = function() {
            this.item3.getURL("success3.html", "_self");
            }

             

            -----------------------------------------------------
            Results for 2nd Attempt:

            - Animation works

            - Links do not work

            -----------------------------------------------------

            • 3. Re: on Release GetURL not working with movieclip animation
              kglad Adobe Community Professional & MVP

              i added code on the last frame of banners' timeline.

              • 4. Re: on Release GetURL not working with movieclip animation
                kurtstoll Level 1

                Hi kglad,

                 

                When I tried the file you sent, below are the results I got:

                 

                -  Item1:  Animation works, link does not

                -  Item2:  Animation works, link does not

                -  Item3:  Animation does not work, link works (sends me to success3.html)

                 

                 

                Any other ideas on how to make Item1 & Item2 link to success1.html and success2.html, as well as getting Item3 to animate when you mouse over it (like Item1 and Item2 do currently?)

                 

                Thanks for any additional help.

                • 5. Re: on Release GetURL not working with movieclip animation
                  kglad Adobe Community Professional & MVP

                  i'm not sure what you're checking.  all three links work.   though i see the animation for item3 does not.