A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Stringing names on the hitTest actionscript

  1. #1

    Stringing names on the hitTest actionscript

    I was wondering how to string the MC names in the actionscripting for hitTest... for example i have this:

    onClipEvent (enterFrame) {
    if (this.hitTest( _root.object ) {
    if (this.hitTest( _root.object2 ) {
    if (this.hitTest( _root.object3 ) {

    can i make the MC name object a part of a string in the actionscript above? any help is great!!

  2. #2
    Senior Member
    Join Date
    Aug 2000
    onClipEvent (enterFrame) {
    for (i=0; i<3; i++) {
    if (this.hitTest( _root["object"+i])) {

    like this you mean?
    only flaw is your first object will be called "object0" not just plain "object"


  3. #3
    thanks! it works!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center