zoukankan      html  css  js  c++  java
  • tut11脚本基础

    Dean's: http://www.deansdirectortutorials.com/scripting/tut11.htm 

    Director的脚本有4类:

    behaviors, cast member scripts, movie scripts, parent scripts

    前3感觉上像是,以其保存位置决定了脚本的有效范围和生命周期。

    最后一种可理解成类库。

    操作一个 

    从工具面板,拉一个button(右下最后一个)到stage,

    在cast中button上右键 cast member script..

    在脚本中的

    on mouseUp

    end

      beep

    然后播放,然后单击按钮。。。。

    问题来了,为啥就没反映呢?

    然后再在beep后加

    alert "Multimedia in Design is the greatest subject!"

    还是没动静呢? 

    因为当初添加的按钮是Tool面板不在classic mode。

    director mx 2004和以后,都要先mode改成classic。

    I mentioned at the start that you should use Classicmode buttons. The reason is that the other modes create  

    Flash Component buttons, which work in a slightly different way. 

    其他mode创建的按钮都是flash组件的按钮,它的工作方式略有不同。

    flash组件按钮本身就默认被设置成不给你交互的,inactive.当然这个在property inpector里面是可以改的。

    flash component里面的最后一项eventPassMode默认是#passNever,改成#passAlways就可以了。 

  • 相关阅读:
    jdbc调用存储过程和存储函数
    jdbc测试
    JDBC -JSP
    eclipse连数据库(sql server)的注意事项
    九大内置对象(新)
    application 全局对象
    编码:session
    建库和建表
    db vs dbm
    Source Insight异常退出,错误代码C0000005
  • 原文地址:https://www.cnblogs.com/mumuliang/p/2224174.html
Copyright © 2011-2022 走看看