2 Replies Latest reply on Apr 19, 2009 10:19 PM by flash search

    unable to give link to button

    flash search

      I have created a button which swap position  after click on it i am giving the swf file in th attachment. now the problem is after inserting it in a movie clip i am unable to give link like getUrl or gotoAndPlay to the button. the script which i have used is

       

       

      button1.onPress=function(){button1._y=-500;action1._y=110.2;}
      button2.onPress=function(){button2._y=-500;action2._y=110.2;}
      button3.onPress=function(){button3._y=-500;action3._y=110.2;}
      button4.onPress=function(){button4._y=-500;action4._y=110.2;}
      button5.onPress=function(){button5._y=-500;action5._y=110.2;}
      button6.onPress=function(){button6._y=-500;action6._y=110.2;}

                So can anyone please help me in this regards

        • 1. Re: unable to give link to button
          roshankolar

          Im somehow not able to download your attachment, anyway, looks like you have the code in the root frame, i.e the first frame of the Stage and not within the movie clip.

           

          Looks like the code you have should be within the movieclip's first frame. But you can also make use of the code by referencing the movieclip instance in the beggining of each line, like sort of :

           

          mc_name.button1.onPress = function(){
          //blah blah;
          }
          

           

          Hope you are getting the point. This might be the problem you are having, please ping me if Im wrong with the query. If you get this right, the getURL and the gotoAndPlay Should be workin fine for you.

          1 person found this helpful
          • 2. Re: unable to give link to button
            flash search Level 1

            it is helpful upto some extend thanks a lot for your reply but the swaping position cannot maintain means after going to the new frame if i came back to the previous frame the previous position of the botton is  not maintan start from the begaining position.if u can download my attachment u can understand my problem