all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

DOOR.....AGAIN!!


DOOR.....AGAIN!! lord_of_uo
4/1/2006 9:42:37 PM
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();
}
}
Re: DOOR.....AGAIN!! abeall
4/2/2006 1:41:18 AM
Re: DOOR.....AGAIN!! kglad
4/2/2006 1:43:20 AM
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.
Re: DOOR.....AGAIN!! kotsoft
4/2/2006 1:00:11 PM
just do something like:
onClipEvent(enterFrame){
if (this.hitTest(this._parent.door)){
this._parent.door.nextFrame();
}
Re: DOOR.....AGAIN!! lord_of_uo
4/2/2006 3:55:07 PM
thnx!

Re: DOOR.....AGAIN!! lord_of_uo
4/2/2006 6:25:30 PM
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!
Re: DOOR.....AGAIN!! kglad
4/2/2006 7:43:47 PM
Re: DOOR.....AGAIN!! lord_of_uo
4/2/2006 9:59:55 PM
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.


Re: DOOR.....AGAIN!! kglad
4/2/2006 11:51:22 PM
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.
Re: DOOR.....AGAIN!! lord_of_uo
4/3/2006 12:28:16 AM
Re: DOOR.....AGAIN!! kglad
4/3/2006 1:23:30 AM
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();
}
}
Re: DOOR.....AGAIN!! lord_of_uo
4/3/2006 12:06:49 PM
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.


Re: DOOR.....AGAIN!! lord_of_uo
4/3/2006 12:52:40 PM
read above message.


Re: DOOR.....AGAIN!! kglad
4/3/2006 2:39:46 PM
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.
Re: DOOR.....AGAIN!! lord_of_uo
4/3/2006 4:01:39 PM
no,

i changed all the parts to my coressponding parts.

it just still spins!

Re: DOOR.....AGAIN!! lord_of_uo
4/3/2006 9:53:07 PM
Re: DOOR.....AGAIN!! abeall
4/3/2006 10:05:41 PM
Re: DOOR.....AGAIN!! kglad
4/4/2006 12:46:07 AM
AddThis Social Bookmark Button