Jump to content


Photo

about hitTest


  • Please log in to reply
6 replies to this topic

#1 charmander

charmander

    Young Padawan

  • Members
  • Pip
  • 12 posts

Posted 14 July 2005 - 11:26 PM

Hi every body…
I had a question that turns around the hitTest mode in action script….

If I had a symbol as movie clip…and in it I have another symbol that have a name (object1)…and I have another symbol in the premier stage and also in it a symbol called (object2)….how can I make a contact between the two objects (the both are a movie clips)…I tried this action and but it in object1:

If(this.hitTest(_root.object2)
……………………

If any one know the right way to get this…please tell me…

thanks
;)

#2 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 15 July 2005 - 05:38 AM

Sorry.. don't understand your question...
what do you want to achieve?

#3 charmander

charmander

    Young Padawan

  • Members
  • Pip
  • 12 posts

Posted 15 July 2005 - 07:06 AM

thank you funkysoul for your replay...
please download the sample and you'll understand me

Attached Files



#4 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 15 July 2005 - 08:22 AM

ok.. first of all..

- your red circle had the name s2 but the script was watching for object2.
- num is too common, I've changed it to num_txt
- in the as you need to define that you are giving a text to the dynamic text box. so you need to write

_root.num_txt.text="10";

and then it works ;)

#5 charmander

charmander

    Young Padawan

  • Members
  • Pip
  • 12 posts

Posted 15 July 2005 - 10:22 AM

Dear funkysoul… :D

First I want to thank you for your interest….

But you had change the name of the object….if want it to connect with the symbol called "object2" that’s inside the object in the premier stage called "s2"…. :angry:

I tried to change the name but it doesn't work correctly….i ask you again if I can make this by the second way in hit test mode that :

If(_root.object2)hitTest(_x,_y,1)
…………….

Thank you again funkysoul
:)

#6 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 15 July 2005 - 10:45 AM

then just use _root.s2.object2 :angry:

that should do the work

#7 charmander

charmander

    Young Padawan

  • Members
  • Pip
  • 12 posts

Posted 15 July 2005 - 11:05 AM

yes....it's happend...... :D :angry:
thank you very mush dear funkeysoul......

it's my first topic in great fourm..and really i found the great interest from you...

i hope you'll be fine

and hope stay contact.....

thank you :) :D :hi:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users