Flash UIComponent...不工作...再次
我不断收到此错误:
TypeError: Error #1006: setSize is not a function.
at circles::SpiroUI/doSliders()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/SpiroUI.as:74]
at circles::SpiroUI()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/SpiroUI.as:42]
at circles::Spirograph()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/Spirograph.as:115]
at circles_fla::MainTimeline/frame1()[circles_fla.MainTimeline::frame1:2]
我已包含 import fl.controls.*
和 fl.events.*
并且我还确保 Slider UI 组件包含在文档库。
用户界面以一种奇怪的方式不断闪烁,似乎在每一帧中重新绘制组件或其他东西。我之前确实做到了这一切,但自从引入了一些新课程后,它就停止工作了。应用程序中绘图的其余部分正在工作,只是 UI 组件闪烁并且不工作。
帮助表示赞赏:)
I keep getting this error:
TypeError: Error #1006: setSize is not a function.
at circles::SpiroUI/doSliders()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/SpiroUI.as:74]
at circles::SpiroUI()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/SpiroUI.as:42]
at circles::Spirograph()[/Users/wakemana/Documents/Adobe Flash Builder 4/SpiroPaint/src/circles/Spirograph.as:115]
at circles_fla::MainTimeline/frame1()[circles_fla.MainTimeline::frame1:2]
I have included import fl.controls.*
and fl.events.*
and I've also made sure the Slider UI component is included in the Document library.
The UI keeps flickering in a strange way, seems to be redrawing the components in every frame or something. I did have this all working before, but since introducing some new classes, it's stopped working. The rest of the drawing within the application is working, just the UI components flicker and don't work.
Help appreciated :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
某处未定义某些内容,因为编译器未找到该函数所在的对象。
您的堆栈有
at Circles::SpiroUI/doSliders() ... /circles/SpiroUI.as:74
因此,如果可能的话,您可能需要至少使用该行来更新问题,以了解如何调用 setSize 。
另一个可以尝试的选项是在第 74 行设置一个断点,并在遇到该错误之前检查对象可用的内容。
我按照您对 UI 组件所做的操作来确保错误不是来自之前的错误。
我有一个小的文档类
slider
然后我猜测你是如何拥有 SpiroUI 的,
但无法确定,尝试了各种方法来重现错误,但通常我会期望如果要调用不在根目录下的 swf 中的函数,则会出现此情况。
Somewhere something is not defined as the compiler is not finding the object which the function lies in.
Your stack has
at circles::SpiroUI/doSliders() ... /circles/SpiroUI.as:74
So if possible, you may want to update the question with at least that line to see how setSize is being called.
Another option to try is to set a breakpoint at line 74 and inspect what is available for the object before it reaches that error.
I followed what you had for the UI components to ensure the error was not from earlier.
I have a small Document Class
slider
And then I made a guess as to how you had your SpiroUI,
No way to know to sure for though, tried various ways to reproduce the error, but normally I would expect this if one were to be calling a function within a swf that is not at the root.
看起来您的 SpiroUI 类尝试调用该类中未提供的 setSize 方法。
抢
it seems like your
SpiroUI
class tries to call thesetSize
method which is not presented in the class.Rob