6 Replies Latest reply on Mar 19, 2007 5:51 PM by EasyEdE

    Novice Starting Point

      Two questions - first, can anybody recommend a good NOVICE PRIMER on Actionscript. I don't expect to become an Actionscript genius but want to be resonably versed in it so I can work with various Flash components such as drop down menus, accordian menus, slide show controls and slide show navigation. My partially completed website is www.blueorbimages.com - a place for my photography and that of a friend. My specific task right now is to improve the navigation within each gallery.

      Second question - is is possible to use Actionscript in a button instance to control layers on a web page? I have one page with 3 layers, each containing a swf and want to be able to click on a button with the name of a specific swf to show that layer and hide the other two. I've done this using DW 8 and behaviors but would like to do it in Flash with Actionscript so I can do some other things in the process.

      Any feedback will be much appreicated.
        • 1. Re: Novice Starting Point
          MotionMaker Level 1
          For question 1

          1. Adobe has great tutorials and example in the Flash help:
          One for example is: Actionscript: Write Scripts.
          2. Part of the Flash Development Center are the Interactive Tutorials where there should be some starter videos for Actionscript. But also the Flash Development Center has a lot of resources for beginners.
          3. In Flash help each component generally has a good example that can be pasted onto a new Flash Movie to get the feel for the component.
          4. The internet has many examples.

          • 2. Re: Novice Starting Point
            EasyEdE Level 1
            Thanks, Lon. I'll start digging this evening when I get home. Your help is much appreciated.

            • 3. Re: Novice Starting Point
              MotionMaker Level 1
              Question 2.

              At runtime Flash cannot swap the layers created at Authoring time in the timeline panel.

              However if you create MovieClips with the content for each layer. Then you can assign them instance names and you can use MovieClip.swapDepths to change the depths.

              The only control you have with layers done at Authoring time is the gotoAndPlay and gotoAndStop actions that can move to frames where you have rearranged the same content. So for example if you have a circle on layer 1 and a square on layer 2 say on frame 1. Then on frame 2 you can reverse these two shapes so the square is on layer 1 and the circle is on layer 2. In Actionscript you use gotoAndStop with your buttons to show the new layering. This would work for a minor number of layer swapping cases. The more complex, then the MovieClip.swapDepths and more Actionscripting is the way to go.

              • 4. Re: Novice Starting Point
                EasyEdE Level 1
                Oops, on looking back at my original post I can see I was not clear on an important point. The layers that hold the three different swf files are in Dreamweaver, one layer holds Parks_Monuments.swf, another holds Land_Seascapes.swf and the third holds Cityscapes.swf. As it works now you click on the appropriate button on the left and through the use of Dreamweaver behaviors it shows the associated swf by hiding the other two layers. BTW the buttons are quite crude right now - no over or down states.

                I realize I can't use the layers in an Actionscript to do something but would it be possible to add a script to the down state of a button so that it would show/hide the Dreamweaver layers? I guess another way of doing it would be to put each swf on a seperate page and have the script call up it's URL. Seems like that would add a lot of overhead and duplicate uploading each time the user switches photo categories.

                Sorry for the confusion and thanks for taking the time to give me some guidance - much appreciated.

                Ed DiTomas
                • 5. Re: Novice Starting Point
                  MotionMaker Level 1
                  Flash Actionscript cannot manipulate the browser document objects. However Flash can talk to JavaScript via getURL() and Javascript can do the manipulation of the the browser document objects.

                  • 6. Re: Novice Starting Point
                    EasyEdE Level 1
                    Thanks, Lon. I certainly have a lot to go over and get familiar with thanks to your leads. Much appreciated.

                    Ed DiTomas