7 Replies Latest reply on Jan 30, 2007 5:15 AM by Newsgroup_User

    Where do I find anm experienced Action Scripted fast?

    nicknamesaretaken Level 1
      Hi,

      I have a Flash presentation which needs completed. Basically, all of the buttons need programmed and as a newbie who is running out of time to learn, I need some help.

      First, I'd like to know where you find people who can do this (here?)

      Secondly, how long it would take to programme approx 875 buttons (many of which are repetitions (e.g home button, help button, exit button appearing on every screen). There are approximately 109 screens which need to be linked.

      Thirdly, what would be a realistic price to expect to pay for someone to do this? It is a non-profitmaking project for a voluntary organisation.

      Thanks
        • 1. Re: Where do I find anm experienced Action Scripted fast?
          Level 7
          nicknamesaretaken,

          > I have a Flash presentation which needs completed.
          > Basically, all of the buttons need programmed and as
          > a newbie who is running out of time to learn, I need
          > some help.

          Help is what the forums are for. :) Let's see what we can do.

          > First, I'd like to know where you find people who
          > can do this (here?)

          This is the ActionScript forum, so posts here tend to be noticed by
          Flash experts who specialize in ActionScript -- in addition to being noticed
          by people who need help. ;)

          > Secondly, how long it would take to programme approx
          > 875 buttons (many of which are repetitions (e.g home button,
          > help button, exit button appearing on every screen). There
          > are approximately 109 screens which need to be linked.

          That's a lot! The answer to your question depends on quite a number of
          factors, which may or may not be important considering the layout of your
          file(s). My hunch is that this particular project -- with all its 109
          screens -- could have been made in such a way that the repeated buttons
          needn't have been repeated. Of course, that's easy to say after the fact,
          and it doesn't help the fact that you have over 800 buttons that need wiring
          up.

          > Thirdly, what would be a realistic price to expect to pay for
          > someone to do this? It is a non-profitmaking project for a
          > voluntary organisation.

          That question is even more "wide open" ... honestly, you're just going
          to have to wait for someone to make an offer. You might find ranges between
          $30 to over $100 an hour. Wiring up buttons isn't especially "fun," either,
          especially if there are so many of them, so an experienced Flash developer
          may charge a bit more just to cover the tedious aspect of this particular
          project.

          In this particular case, it may be best if you take the last few strides
          to the finish line yourself. :) The main benefit there is that you'll know
          how to accomplish your goals. That will pay itself off right now, already,
          so why don't we step through what it takes to bring your buttons to life?

          What have you tried so far?


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Where do I find anm experienced Action Scripted fast?
            nicknamesaretaken Level 1
            Thanks,

            This is what I feared. In theory, I don't mind sitting and doing this and had hoped to do so, but I have way underestimated the project and am working on it totally alone so feel pretty scared by the prospect of doing this without help.

            If you can give me some starting points, I would be very grateful.

            The Project is made up of 13 scenes

            So I need the script to programme the buttons to move between scenes.

            For example, the introduction screen plays an animation and has a skip intro button.

            The skip intro button needs to take the user to the contents page.
            I have tried:

            stop();
            skipintro_btn.onRelease = function (){
            gotoAndStop("Contents Screen", 1);

            }

            It doesn't work.

            As far as I am aware, I think most of the buttons in the project should have this kind of fairly simple script like this, which I can adapt for each instance. Is that right?

            E.g the home button on each page will always be programmed to go back to the home page.

            I have already done some simple programming of forward and back buttons and gotoFrame within individual scenes and they seem to work OK.

            But the script above for going between scenes doesn't work.

            Thanks in advance







            • 3. Re: Where do I find anm experienced Action Scripted fast?
              Level 7
              nicknamesaretaken,

              > This is what I feared. In theory, I don't mind sitting and doing
              > this and had hoped to do so, but I have way underestimated
              > the project and am working on it totally alone so feel pretty
              > scared by the prospect of doing this without help.

              I hear ya. :) Many project do seem to explode in scope. But I think
              you're not in the frying pan, here, or the fire.

              > The Project is made up of 13 scenes
              >
              > So I need the script to programme the buttons to move
              > between scenes.

              This is one of those odd quirks that comes from experience. Scenes are
              a good organizational tool, but until very recently, they often don't play
              well with ActionScript. What makes the difference? Flash Player 9 is the
              first to support ActionScript 3.0, which completely overhauls the way code
              is translated in the player. You're writing in either AS1 or AS2, and both
              those languages have the bug (even Flash Player 9 won't respond well,
              presumably, if the SWF it's playing was published for anything earlier than
              AS3).

              > stop();
              > skipintro_btn.onRelease = function (){
              > gotoAndStop("Contents Screen", 1);
              >
              > }
              >
              > It doesn't work.

              This *should* work, because you're calling the function version of
              gotoAndStop() rather than the method version. The function you've written
              is scoped to the skipintro_btn object (either a movie clip or button
              symbol), and when it doesn't find that function in its scope, it will look
              up the chain and eventually find it -- or should. I've got a very
              simplified test file that succeeds. But that's moot.

              I recommend you use the method version and forego the use of Scene names
              (with the method, you can't anyway, as it only accepts one parameter). Add
              frame labels to the beginning of each Scene and reference the label instead
              of the frame number.

              http://www.quip.net/blog/2006/flash/actionscript-20/gotoandplay-with-scenes

              Make sure to save your work and test in a new file first! You wouldn't
              want to lay down hours of time just to find out a proposed solution doesn't
              work in your case.

              Either Save As, or throw together a quick new three-Scene FLA and see if
              frame labels do it for you. I'll keep an eye on this thread, in case you
              have additional questions.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."


              • 4. Re: Where do I find anm experienced Action Scripted fast?
                nicknamesaretaken Level 1
                Thanks for this.

                I think I see what the problem is, but still struggling to get it to work.

                I now have:

                stop(); {
                on (release)
                this.gotoAndPlay("CS1"); // this is the correct code.
                }

                CS1 being the frame label for the first frame in the Contents Screen. This code is attached to the skip intro button to go to the contents screen.

                Are there any good Action Script books you could recommend?

                I'm also a bit worried about bug comment. Does it mean that I will have difficulty playing this project in Flash Player 9 as it's not written in Action Script 3.0?

                If so, that's a big problem isn't it as people will need to download older versions of Flash Player to view it - or I'll need to include older version on the disc.

                Hmmm....
                • 5. Re: Where do I find anm experienced Action Scripted fast?
                  Level 7
                  nicknamesaretaken,

                  > I think I see what the problem is, but still struggling to
                  > get it to work.

                  Okay.

                  > I now have:
                  >
                  > stop(); {
                  > on (release)
                  > this.gotoAndPlay("CS1"); // this is the correct code.
                  > }

                  Okay, the on() event handler may not belong here. The on() and
                  onClipEvent() functions are an older (Flash 5 era) way to handle events in
                  ActionScript. They're still available in Flash 8, and they work just fine,
                  even in AS2, but these are applied *directly to* the object in question; as
                  in, you click your button to select it, then type into the Actions panel
                  while the button is selected. In such a case, no instance name is needed
                  for the button (or whatever object). The above code would have to be
                  attached to each button -- which really gets old with a large number of
                  buttons -- and the stop(); action would have ben appear inside the on()
                  function.

                  Your earlier approach -- where you referenced the button's instance name
                  and assign a function to the Button.onRelease event -- is the recommended
                  best practice, and has been available since Flash MX (aka Flash 6). There's
                  nothing about your earlier code that shouldn't have worked -- it's just you
                  *might* have been experiencing the Scenes-related bug I mentioned.

                  I would change your previous code as follows:

                  // in a frame script ...
                  stop();
                  skipintro_btn.onRelease = function() {
                  this._parent.gotoAndStop("frame label here");
                  }

                  That stops the timeline in which this ActionScript appears. Then it
                  assigns a function literal to the Button.onRelease event of the button
                  symbol whose instance name is skipintro_btn (if that object is actually a
                  movie clip, then it assigns a function literal to the MovieClip.onRelease
                  event of that instance -- funtionally the same thing). Then it refers to
                  the parent of this object, which is the timeline in which the object
                  appears, and tells that timeline to gotoAndStop() at the named frame label
                  you provide -- even if that frame label is in another scene.

                  Make sense?

                  > Are there any good Action Script books you could
                  > recommend?

                  There are quite a few good ones on the market lately, but the last I can
                  think of that I enjoyed -- from a general programming standpoint -- is
                  Object-Oriented ActionScript For Flash 8 (Friends of ED), by Peter Elst and
                  Todd Yard.

                  > I'm also a bit worried about bug comment. Does it mean
                  > that I will have difficulty playing this project in Flash Player
                  > 9 as it's not written in Action Script 3.0?

                  You shouldn't have any problems. As long as you use the frame labels
                  approach and avoid Scene names, Flash Player 9 will run it the same as older
                  Players. Flash Player 9 is the first to feature *two* virtual machines for
                  ActionScript. One is the overhauled AS3-lovin' machine; the other maintains
                  backward compatability for AS1 and AS2.

                  > If so, that's a big problem isn't it as people will need to
                  > download older versions of Flash Player to view it - or
                  > I'll need to include older version on the disc.

                  Right, but you don't have to worry about that. :) The Scenes issue is
                  an old one, and it is a big problem, but at least the workaround is easy
                  (frame labels).


                  David Stiller
                  Adobe Community Expert
                  Dev blog, http://www.quip.net/blog/
                  "Luck is the residue of good design."


                  • 6. Re: Where do I find anm experienced Action Scripted fast?
                    nicknamesaretaken Level 1
                    Hi,

                    Thanks for you message. Everything you have said makes sense - which is good - but I'm still having problems getting things to work.

                    using:

                    stop();
                    skipintro_btn.onRelease = function() {
                    this._parent.gotoAndStop("frame label here");
                    }

                    The following error message appears:



                    **Error** Scene=Instructions Screen, layer=Skip Intro, frame=1:Line 1: Statement must appear within on handler
                    stop();

                    **Error** Scene=Instructions Screen, layer=Skip Intro, frame=1:Line 2: Statement must appear within on handler
                    skipintro_btn.onRelease = function() {

                    Total ActionScript Errors: 2 Reported Errors: 2

                    Which I don't understand.....


                    Thanks for the other tips too.
                    • 7. Re: Where do I find anm experienced Action Scripted fast?
                      Level 7
                      nicknamesaretaken,

                      > using:
                      >
                      > stop();
                      > skipintro_btn.onRelease = function() {
                      > this._parent.gotoAndStop("frame label here");
                      > }

                      Right ...

                      > The following error message appears:

                      Looking ...

                      > **Error** Scene=Instructions Screen, layer=Skip Intro, frame=1:Line 1:
                      > Statement must appear within on handler
                      > stop();

                      Aha. Okay, any time you see the "within on handler" error, it's talking
                      about that on() event handler I was talking about. In both on() and
                      onClipEvent(), you actually *select* a button, open the Actions panel, and
                      type your code. In this way, code is applied directly to a button, and must
                      looke like this:

                      on (release) {
                      // code here
                      }

                      There are other events beside release, but they work the same way. Here
                      are a f ew more details.

                      http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent

                      Personally, I prefer the newer (since Flash MX) approach, but it means
                      you have to put your code in a keyframe of the timeline, rather than
                      directly on the object.


                      David Stiller
                      Adobe Community Expert
                      Dev blog, http://www.quip.net/blog/
                      "Luck is the residue of good design."