我目前正在尝试将类似于doodlejump的平台游戏放在一起但是我遇到了两个我不确定如何修复的错误。以下是我目前使用的代码。我的错误是;
**场景1,图层'代码',第4帧,第181行1046:未找到类型或不是编译时常量:棒。
场景1,图层'代码',第4帧,第207行1180:调用可能未定义的方法棒。**
[:5]
答案 0 :(得分:0)
Most likely your problem is you haven't told your library object (stick) to be accessible to code.
To do that, open your library panel in FlashPro, right click your stick asset/movieClip, and choose properties.
On the Symbol Properties Window, check the Export For ActionScript box. Then enter stick as in the Class field.
Now you can instantiate a stick
through code.