AS3 - 访问和编辑从主影片加载的 swf 影片剪辑
import com.hydrotik.queueloader.*;
.................
public class Main extends MovieClip
{
private var _ql:QueueLoader;
private function _loadSTRATIntro()
{
QLog.log("_loadSTRATIntro()");
this._ql.addItem("res/swf/STRATIntro.swf", this.introduction_mc);
this._ql.addItem("res/swf/STRATTransitions.swf", this.transitions_mc);
this._ql.addItem("res/swf/STRATDisOrDat.swf", this.STRATdod_mc);
this._ql.addItem("res/swf/STRATMultipleChoice.swf", this.STRATMultiChoice_mc);
this._ql.addItem("res/swf/STRATAttack.swf", this.stratattack_mc);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, this._onQueueComplete);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, this._onQueueProgress);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_START, this._onQueueStarted);
this._ql.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, this._onQueueItemComplete);
this._ql.execute();
return;
}// end function
我需要访问主影片中加载的 STRATTransitions.swf 并从中删除一些文本。没有可用的 swf 源代码。有可能实现吗?预先感谢您提供任何提示。
import com.hydrotik.queueloader.*;
.................
public class Main extends MovieClip
{
private var _ql:QueueLoader;
private function _loadSTRATIntro()
{
QLog.log("_loadSTRATIntro()");
this._ql.addItem("res/swf/STRATIntro.swf", this.introduction_mc);
this._ql.addItem("res/swf/STRATTransitions.swf", this.transitions_mc);
this._ql.addItem("res/swf/STRATDisOrDat.swf", this.STRATdod_mc);
this._ql.addItem("res/swf/STRATMultipleChoice.swf", this.STRATMultiChoice_mc);
this._ql.addItem("res/swf/STRATAttack.swf", this.stratattack_mc);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, this._onQueueComplete);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, this._onQueueProgress);
this._ql.addEventListener(QueueLoaderEvent.QUEUE_START, this._onQueueStarted);
this._ql.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, this._onQueueItemComplete);
this._ql.execute();
return;
}// end function
I need to get access to loaded STRATTransitions.swf from the main movie and remove some text from it. There is no source code available for the swf. Is it possible to accomplish? Thank you in advance for any tips.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果它们都是 AS3 电影,那么我不明白为什么您无法访问相应的文本字段。如果文本位于动态文本字段中,您可以在加载影片后直接访问它。如果文本是静态的,那么您可以使用 TextSnapshot 类
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextSnapshot.html
祝你好运!
If they are both AS3 movies then I don't see why you can't access the corresponding textfields. If the text is in a dynamic textfield you can access it directly after loading the movie. If the text is static then you may be able to change it using the TextSnapshot class
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextSnapshot.html
Good Luck!