Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试缩放已通过 swfloader 加载的 swf。当我得到完整事件或初始化事件时,swfloader 的尺寸仍然为零。在调整浏览器窗口大小之前,我看不到尺寸中的值。swf 只是一个动画。尝试调整实际 swf 内容的大小会产生不一致的结果。
对于此类问题,有时只需轮询维度enterFrame直到获得一些值会有所帮助。例如,您可以这样做:
enterFrame
bool dimensionsSet = false addEventListener("enterFrame", checkDimensions); function checkDimensions(event:*):void { if (!dimensionsSet && width && height) { dimensionsSet = true; // Do initialization code } }