Hi ppl, how can i make my letters disappear in a sequence to the word like “flash” the ball need to go to the letter f 1st, when it goes to other letters they will not disappear?
anyone can help? i got the fla file attach here. thx
Hi ppl, how can i make my letters disappear in a sequence to the word like “flash” the ball need to go to the letter f 1st, when it goes to other letters they will not disappear?
anyone can help? i got the fla file attach here. thx
If I understand you well, you want that a ball is moving on your flash form, and when it hits the first visible letter this letter will disapear, while hiting an other letter will not make it disapear (am I right??)!
In this case I would sugest of making each letter an indipendent movie object, that contains a the Letter element, and a [font=Courier New][color=blue]boolean[/color][/font] value. This [font=Courier New][color=blue]boolean[/color][/font] value should determine whether the movie should be unloaded when the ball is over the object. If it is unloaded then the current movie is unloaded and the next letter boolean value should be turned to true.
I don’t know whether the above helped!
Yours
sim085
Hi Xavier
Dont Panic Man,
Here is your solution…just check it… :afro:
aShIsH
wow. thx alot. erm ashish can u explain to me this part?
this.onEnterFrame = function (){
var Hit = new Array();
if(_root.st < _root.clipsArray.length) {
for(t=_root.st; t<_root.nd; t++) {
if (this.hitTest(_root.clipsArray[t]._x, _root.clipsArray[t]._y, true)){
var h = _root.clipsArray[t]._rotation = 90;
Hit.push(h);
_root.st+=1;
_root.nd+=1;
}
}
}
}
Hi Xavier,
Here is the explanation:
Its pretty simple. You wanted your characters (flash) to diappear one by one as the boll hits to it and that to in a sequence. So that means You need to keep a check on which character your hitting first.
variables st and nd are used to keep a check of hittest one by one. You can see initally st=0 and nd=1; So ur hit test object will be “f”
since clipsArray[0] = “f”.
if (this.hitTest(_root.clipsArray[t]._x, _root.clipsArray[t]._y, true)){
Here this condition will be True only and only your ball hits to clipsArray[0] ie your “f” otherwise it will return False. Once it hit correctly i am just incrementing the pointer in clipsArray[1] ie by incrementing _root.st+=1;
And now hittest will be checked with clipsArray[1] = “l”;
I think you got it…I will tell u one thing always keep trace on whats exactly happening in your loop. I found this problem just because of trace only
Now,
for(t=0; t<_root.clipsArray.length; t++)
There is ur problem. It was getting executed 5 times ie your ball hit test will be true if it hits any of the obj (f,l,a,s,h). So what u need to do is execute your loop one by one.
I think u got it… :hr:
aShIsH
thx alot.
:: Copyright KIRUPA 2024 //--