Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to call object from specific frame

New Here ,
Oct 21, 2015 Oct 21, 2015

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?

TOPICS
ActionScript
251
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 22, 2015 Oct 22, 2015
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines