8 Replies Latest reply on Apr 13, 2009 3:58 AM by Levsky

    Need a little help with FLASH

    Levsky

      Hi every one

      I am a very new to using flash 8 and I need som help.

      I know that it mifgt be a simple for some of you but for me it is a chlange...

       

      I need to create a page with 6 buttons

       

      I can create a button no problem and i can incer scrupt and it will open url

      However if I have 4-5 buttons  every thing work  up , down over etc but script do not work so link do not oupe page..

      I am sure it is a simple soluton to this issue

       

      Please HELP

       

      I  like to attach .fla file to show what I was doing but it seem that is not possible.....

       

      Any way Please help if u can

       

       

      Sincerely

       

      L.

        • 1. Re: Need a little help with FLASH
          Ned Murphy Adobe Community Professional & MVP

          If you can show the code for the buttons here, and describe how the buttons are located in the movie, someone may be able to determine a solution.

          • 2. Re: Need a little help with FLASH
            Levsky Level 1

            Thanx

            I had try to uploaded samplle .fla file however i could not found the way of doin it...

             

            However in this post it is at the buttom of the text  box......

            Here is ths sample button file, however thisis not what reat will be.

            Project  wil have a art work split in 8 sements six of then will akc as a a buttons with over and down efferct

            the button name and function will be shown as you mouse over the segment...

            in the  sample i just placed 4 buttons  2 and 2 in one I am working on is  2 colomn of 3 segments

             

            I hope this can help.. to get understanding what i am trying to do..

             

             

            Thanx again for you respond

             

            Oh  .fla has script I use ( and it is not working on multy buttons only on on button)

             

            I colud not upload .fla file  here is script i use for ever button

            I had try to gave numerical identety to very button

            like this:

            button1

            myButton.onRelease = function(){
            getURL('http://www.aol.com');
            }

             

            Button2

            myButton1.onRelease = function(){
            getURL('http://www.aol.com');
            }

             

            and so on 4 buttons in 2 rows... see file

             

            Lev..

             

            Message was edited by: Levsky

            • 3. Re: Need a little help with FLASH
              Ned Murphy Adobe Community Professional & MVP

              While I'll suggest using doublequotes "url" instead of single quotes 'url', there isn't anything wrong with the code as you show it.  There are a few things that regularly come up as being the problem when it comes to buttons, the one that arises most often is the failure to properly assign instance names to each button.  So check that each button has a unique instance name assigned in the Properties panel.  Instance names are not the names you give items in the library.  And to save me from asking twice... check again... you'd be surprised how often people say they have assigned instance names to objects when they have not.

               

              Another thing to check is that the code exists where the buttons exist.  If the code is assigned in one frame, and the buttons don't appear until later, then the code is not assigning to the buttons.

              • 4. Re: Need a little help with FLASH
                Levsky Level 1

                Thanx  Ned for your quick reply

                I did have names in the assigned to every layer as well as to a property

                one thing I do not understand what do you meen 

                If the code is assigned in one frame, and the buttons don't appear until later, then the code is not assigning to the buttons.

                I am new to this so please bare with my ignorance..\\

                 

                 

                I wish u can look at the .fla file .

                but here is i start with first layer - background.. - no actions unique name - background

                second layer is btn1  so is the proerty name

                next layer is btn2 so is the the propert

                same in third and forth buttons

                sripts are in serted in to action frame of every button not in background

                So code assignmend to a frame is kind of confusind, sorry...

                 

                Lev

                 

                • 5. Re: Need a little help with FLASH
                  Ned Murphy Adobe Community Professional & MVP

                  The layers names have nothing to do with the button instance names.  I'm inserting an image below that shows where you assign the instance names.  When you click on an object such as a movieclip, button, textfield, component, etc... the instance name field displays in the Properties panel.  So if you were assigning the instance name to myButton1 (to go with the myButton1.onRelease function), then you would click on that button to select it, and then enter "myButton1" in the field shown...

                   

                  ppanel.gif

                   

                  For the frame issue I mentioned... let's say you have your buttons' code in frame 1 of the timeline, but all of your buttons start in frame 2 and don't exist in frame 1.  Then that code will not be assigned to the buttons... they need to be in the presence of the code when it gets processed.

                   

                  Yes, it would be nice if they could allow for fla files in a Flash help forum--makes sense.  You can try renaming it as a txt file and see if it uploads.  But if you are using CS4 I will not be able to open the file... it needs to be saved as a CS3 or earlier version.

                  1 person found this helpful
                  • 6. Re: Need a little help with FLASH
                    Levsky Level 1

                    I got it and this is fixed

                    Still same effect

                     

                    U can download  fla.file form my server...

                     

                    http://wqcontheweb.com/mynet/test.flahttp://71.167.173.50/test/test.fla

                    I hope this can help

                     

                    I do appreciate your help I am so new to this, I use to use third partey application, but it is nolonger does what i am looking for and besides I need to get hendle on the flash.

                     

                     

                    Lev

                    • 7. Re: Need a little help with FLASH
                      Ned Murphy Adobe Community Professional & MVP

                      Your instance names need to match the ones you use in the code.  The instance name provides the means for assigning code to and controlling objects.  Where you have btn1 as the instance name, the code for that button should use that name...

                       

                      btn1.onRelease = function(){
                      getURL("http://www.google.com");
                      }

                       

                      Think of it in terms of talking to the button... you've given that button the name "btn1", so your code needs to say "Hey, btn1, do this"

                       

                      Also, to help keep things cleaner for yourself, you should create a layer for actionscript, where you take all of the code you currently have spread out across the layers of each button and move it to that layer.  I often create a few to separate different types of actionscript, variables, functions, actions, but you can do whatever works best for you.  But having it on separate layers makes it easier to find and manage.

                      • 8. Re: Need a little help with FLASH
                        Levsky Level 1

                        Good morning Ned

                        Thank you very much for your assistance

                        I new it got to be simple, did not realise it work like in any scrip naming action

                        I asumed that  MyButon is a can name to be used when i look at sample

                        It shows that i was looking in all the worng placeses

                        Now RE setting up separate layer for scripts... I am nor sure if I am ready for this yet..

                        I think as of now I will do every scrit to every layer this way I will not get confused and for me at this time i this will be easy as a lirning process.

                        I will use single layer for all the scripts I need to create sigle scrip with provisions for every button i am not yet comftoble with action script for flash yet

                         

                        Thanx AGAINE

                         

                         

                        Lev