有多个ActionScript 3层 [英] Multiple Actionscript 3 layers

查看:188
本文介绍了有多个ActionScript 3层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果我分裂了code某些位,则意味着不同的部分成不同的图层将它们作为单独的东西他们或行为的功能。 (我能够从其他的引用变量上一层?)

I'm wondering if I split up certain bits of code that are meant for different sections into different layers will they have functionality between them or act as separate things. (will I be able to reference a variable on one layer from the other?)

基本上我有一组贯穿每一帧code,但还需要具体到某一帧,但仍然可以访问主code code。

Basically I have a set of code that runs throughout every frame but also need code specific to certain frames but still be able to access the main code.

感谢

推荐答案

您可以有code跨越多个帧以及单个帧脚本:

You could have code that spans multiple frames as well as individual frame script:

在这种情况下,从行动个别关键帧的脚本层可以调用定义的功能主要行动,同样的主要行动可以在的行动在当前帧中调用从code函数层。

In this case, individual key frame script from actions layer could call functions defined in main actions, likewise main actions can call functions from code within the current frame of actions layer.

随着应用复杂性的增加,你可能要考虑使用类在帧脚本,定义一个基础文件类项目。

As applications increase in complexity, you may want to consider using classes over frame script, defining a base document class for your project.

同时,通过AS联动库中的定义每个符号类:

As well, define classes per symbols in the library through AS Linkage:

有很多设计模式对于较大的应用程序,以降低复杂性。

There are many design patterns for larger applications to reduce complexity.

这篇关于有多个ActionScript 3层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆