简体   繁体   English

如何使用Flex SDK将帧添加到Flash电影

[英]How to add frames to a flash movie using Flex SDK

I'm new to Flash authoring and just started using the mxmlc Flex SDK tool to compile MXML and ActionScript3 sources into a swf file. 我是Flash创作的新手,刚开始使用mxmlc Flex SDK工具将MXML和ActionScript3源代码编译为swf文件。

I've been able to compile and run some examples and tests; 我已经能够编译并运行一些示例和测试; now I want to define multiple frames for my movie and attach objects to them frames, eg sprites, sounds, etc. 现在,我想为我的电影定义多个帧,并将对象附加到这些帧,例如,精灵,声音等。

How do I add frames using only MXML and ActionScript 3? 如何仅使用MXML和ActionScript 3添加框架? If this isn't possible, what do I need to do to create frames? 如果无法做到这一点,我该怎么做才能创建框架?

While technically possible - it's essentially never done from a Flex point of view. 尽管在技术上可行-从Flex的角度来看,这从来没有做过。 But because Flex sits on top of the Flash Player stack it is still governed by the rules of what Flash originally started out as - as is still used for - an animation tool. 但是因为Flex位于Flash Player堆栈的顶部,所以它仍然受Flash最初作为动画工具开始使用的规则的约束-至今仍在使用。

Flash is the primary tool you want to use if you need to manually add frames/scenes (as part of an animation sequence. Here you can also attach timeline code (the old school "AS2"ish way), or associate a class that needs to be bound to a particular graphic / movieclip from the library. 如果您需要手动添加帧/场景(作为动画序列的一部分,则Flash)是您要使用的主要工具。在这里,您还可以附加时间轴代码(老式的“ AS2”方式),或关联需要的类绑定到库中的特定图形/动画片段。

For strictly Flex based applications (data centric UI) the compiler automatically generates a 3-part frame sequence to handle the original FP problem of running/starting frame code before total assets are loaded. 对于严格基于Flex的应用程序(以数据为中心的UI),编译器会自动生成一个三部分的帧序列,以处理加载总资产之前运行/启动帧代码的原始FP问题。

The technical: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html 技术: http//help.adobe.com/zh_CN/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html

It's a compiler option under frames - however you really do need to know what your doing to work with this. 它是框架下的编译器选项-但是,您确实确实需要知道如何使用它。

From what I can understand of what you're trying to do: " attach objects to the frames ", again - this is the Flash perspective. 从我能理解你正在试图做什么:“ 连接对象框架 ”,再次-这是Flash透视图。 With Flex any graphical element is declared in code with a new operator, and attached to the "current timeline" via addChild / addElement of a DisplayObjectContainer. 使用Flex,任何图形元素都可以使用新的运算符在代码中声明,并通过DisplayObjectContainer的addChild / addElement附加到“当前时间轴”上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM