flash actionscript:
this is what i put on my character: and all my character does is spin around when he hits "door" what do i do? onClipEvent(enterFrame){ if (this.hitTest(this._parent.door)){ nextFrame(); } }
i can't imagine how you could read my message and infer anything about attaching a hitTest() to your door movieclip. i made an observation about the effect of your code: you have no syntax error. your code does exactly what i stated in my above message. i have no idea about the effect of advancing the timeline to which that code is attached, but if you don't like the effect change the timeline or change the code.
just do something like: onClipEvent(enterFrame){ if (this.hitTest(this._parent.door)){ this._parent.door.nextFrame(); }
i did your code and it still doesnt work! what do i do!?!?! can someone attach a example fla file to this: http://www.zeldavideos.4t.com/cgi-bin/util/site_admin when you go there log on and on the left side click build site then file manager then attach a FLA demo file to show me hwo to do that!!! THNX!
srry but the file is too big. maybe you could post a simple block hitting a circle and it going to the next frame which says: next frame. that would be easy enough.
what goes to the next frame? does the block go to its next frame or does the circle go to its next frame or does some other timeline go to its next frame? i think that's part or all of your problem: you're unclear about what timeline should advance when a hit is detected.
attached to any timeline the following code would advance the _root timeline if _root.blockMC and _root.circleMC have a positive hitTest(): _root.blockMC.onEnterFrame=function(){ if(this.hitTest(_root.circleMC)){ _root.nextFrame(); } }
srry kglad but it still doesnt work! plz take the FLA i attached to the site. its called: "kglad1" plz take it and demonstrate how to properly do it.
your password is adh1991. that's why i couldn't get your file before. your "door" has instance name blockmc. that's why (one of) you hitTest()s was failing. your other hitTest()s have incorrect syntax. your corrected file is at www.gladstien.com/new/kglad1.fla you really need to pay attention to details.
no, i changed all the parts to my coressponding parts. it just still spins!
Don't see what you're looking for? Try a search.
|