Skip to main content
Participant
October 22, 2015
Question

how to call object from specific frame

  • October 22, 2015
  • 1 reply
  • 271 views

if(m[1].hitTestObject(clap1.symbol3.box))

            {

            m[1].x=m[1].x+30;

}

this is the error that i get

symbol'symbol3'          1046: Type was not found or was not a compile-time constant: box.

maybe this is because box is only in symbol3 frame number 4?

so how to solve this problem?

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
October 22, 2015

If the object is not present in the frame when it is being targeted the program will err.  It sounds like you need to make the object exist in the symbol3 frame that is present when that code execute.  First try putting it in the symbol3 frame in question, and if that fixes the error then see about making it invisible if it is not supposed to yet be hit.... or if it is supposed to be hit then turn its alpha property to 0 instead.