Hi 

Maybe I'm missing the obvious but perhaps you are hitting a variable naming 
problem. Why not try to give each variable a distinct name so that there is 
less chance of confusion. For example you have 3 different variable 
declarations for myHandInstance2, 2 of which are local and one is scoped to the 
main class. While in theory these should be independent it certainly can lead 
to confusion just in reading your code. 

I'm also at a loss as to why myLeftHand() and your init function both seem to 
be creating an instance of myHand, one as part of a framescript on 20 of the 
other, not that it is illegal to put one instance inside another, but it begs 
the question is that what you are trying to do? 

Perhaps, if you were to clean things up, in the init() function get rid of the 
declaration of myHandInstance2 and use the public variable on the class, then 
at least if you have a means of triggering a method on the main object post 
init() you will be able to see and inspect that instance and see where it is, 
and so forth. 

Sincerely 
Mark R. Jonkman 




----- Original Message ----- 
From: "beno -" <[email protected]> 
To: "Flash Coders List" <[email protected]> 
Sent: Monday, December 7, 2009 11:30:21 AM GMT -05:00 US/Canada Eastern 
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 
[email protected] 
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to