Beno, Jason mentions trace. This one is really essential.

You can use trace inside any part for code, it is inside methods or
directly in frame code. Add these trace lines to your code and start
playing with them:

public function Main():void
{
   trace("Who I am ? I must be: " + this);

   trace("The following are my properties... ");
   for(var k in this)
   {
         trace("  " + k + " has value " + this[k]);
   }
   trace("That's all nice. Perhaps somebody calls now the init() method.");

   // probably you need to call init() here..............
}
public function init():void
{
    // if you do not see the following trace text in the output
    // window, this means the init() method was never called....
    
    trace("Some part of code called init() and now I entered the the init() 
method... Let's see what we got here !");

    hatAndFace();
    eyeball1();
    eyeball2();
    myRightHand();
    
    var mcHandInstance2:mcHand = new mcHand();

    trace("We have a new instance of mcHand. Let's see its value, so 
mcHandInstance2 is " + mcHandInstance2);
    
    addChild(mcHandInstance2)
    mcHandInstance2.addFrameScript(20, myLeftHand)
    //

}

Now... instead of using the addFrameScript(), try this, step by step:
- doubleclick the mcHand (or whatever the hands name is) in the
Flash IDE Library.
- click right-click on the 20th frame of you hand animation and select
- press F9 (- you should see now the actions window for that 20th frame)
- write this.stop(); in the frame's code,
- go back to your .as code and comment out (//) the addFrameScript... line
- add init(); in the scope of Main() function,
- save,
- compile

In free time ... please try to press F1 in Flash IDE and just start
reading. Read about the timelines, debugging, and native classes that
you will like to use in your work. Try Help examples. Analyze them.
Pay particular attention to chapters:
1. Using Flash
2. Programming ActionScript 3.0
3. ActionScript 3.0 Language and Components Reference

Most issues you are asking about are described in a detailed way
there just in the Flash Help. Google is another really powerful option
to get into Flash in general and AS3 in particular.


Greg




Monday, December 07, 2009 (5:43:37 PM) Jason Merrill wrote:

> Well gee after that intro, let me jump all over helping you.  You should
> know people here are volunteering their free time and that's the price
> you pay when someone offers to help for free.  For free.  Free that is.
> I saw a LOT of people here trying to help you over the past few weeks,
> you had some threads that frankly, went on annoyingly long, and several
> things were Google-able.  

> I don't see any traces in your code, you might start by using the trace
> feature to see if things like this statement: " if
> (e.target.currentFrame == 40)" even runs before bothering the list with
> your question.  Heck, put some traces inside of " myLeftHand" to see if
> it runs.  I have no idea why you're inserting frame scripts, I don't
> have any history on what your reasons for that is, so if you're going to
> re-post and ask questions again, start by clearly explaining your
> problem, and above all, play nice.

> Jason Merrill 

>  Bank of  America  Global Learning 
> Learning & Performance Soluions

> Join the Bank of America Flash Platform Community  and visit our
> Instructional Technology Design Blog
> (note: these are for Bank of America employees only)






> -----Original Message-----
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of beno -
> Sent: Monday, December 07, 2009 11:30 AM
> To: Flash Coders List
> Subject: [Flashcoders] Back On Course, Still Problems

> Hi;
> First, a bit of a rant. A lister here offered to help me by looking
> directly
> at my code and resolving my problem. That was 10 days ago. I was
> patient. I
> kept in touch with him. He kept saying he'd get to it. He never did. The
> result is that I am now 10 days further behind on a project I'm now 2.5
> months behind on. The moral of the story is that if you're not sincerely
> going to help, do not offer to "help", because you're just creating even
> more problems.

> Ok, I tried googling wherever we were on this without success, so I'm
> starting where I knew the problem was. Here is an abbreviated version of
> my
> code:

> package
> {
>  import flash.events.Event;
>  import flash.events.MouseEvent;
>  import flash.display.MovieClip;
>  import com.greensock.*;
>  import com.greensock.plugins.*;
>  import com.greensock.easing.*;
>  public class Main extends MovieClip
>   {
>   public var mcHandInstance2:mcHand;
>   public function Main():void
>     {
>   }
>   public function init():void {
>     hatAndFace();
>     eyeball1();
>     eyeball2();
>     myRightHand();
>     var mcHandInstance2:mcHand = new mcHand();
>     addChild(mcHandInstance2)
>     mcHandInstance2.addFrameScript(20, myLeftHand)
> //    myLeftHand();
>   }
>   private function myLeftHand(e:Event=null):void
>     {
>     var mcHandInstance2:mcHand = new mcHand();
>     addChild(mcHandInstance2);
>     mcHandInstance2.x = 800;
>     mcHandInstance2.y = 200;
> //    if (e.target.currentFrame == 40) TweenMax.to(mcHandInstance2, 2,
> {x:200, startAt:{totalProgress:1}}).reverse();
>   }
>  }
> }

> No errors are thrown. When I step through the code to check for errors I
> still come up empty "handed". myLeftHand doesn't do anything. It doesn't
> print to the screen. Please advise.
> TIA,
> beno
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to