Chinaunix首页 | 论坛 | 博客
  • 博客访问: 697565
  • 博文数量: 160
  • 博客积分: 8847
  • 博客等级: 中将
  • 技术积分: 1656
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-25 16:46
个人简介

。。。。。。。。。。。。。。。。。。。。。。

文章分类

全部博文(160)

文章存档

2015年(1)

2013年(1)

2012年(4)

2011年(26)

2010年(14)

2009年(36)

2008年(38)

2007年(39)

2006年(1)

分类:

2008-09-28 19:06:42



package {
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.system.Capabilities;
    [SWF(width="400",height="300",backgroundColor="#00ffee",frameRate="32")]
    public class actionscript3 extends Sprite
    {
        public function actionscript3(){
            //调整影片在播放器中的基准位置
            //默认情况下,影片在播放器中是居中对齐的
            //你可以使用stage.align属性进行调整
           
            stage.scaleMode = StageScaleMode.SHOW_ALL;
            stage.align = StageAlign.BOTTOM;
           
           
              this.graphics.beginFill(0xff0000);
              this.graphics.drawEllipse(2,2,stage.stageWidth, stage.stageHeight/2);
              this.graphics.endFill(  );
              //屏蔽右键菜单大部分选项
              this.stage.showDefaultContextMenu = false;
             
              //检查运行影片的声卡设备
              //如果返回true,说明声卡设备是可用的,否则返回false;
              //设置静音也会返回true
              trace(flash.system.Capabilities.hasAudio);

            //即使有声卡设备,也不一定可以播放mp3,所以,如果需要播放mp3时,可以考虑判断
            if (flash.system.Capabilities.hasMP3){
                var mp3url:URLRequest = new URLRequest("");
                var mp3:Sound = new Sound(mp3url);
                mp3.play();
            }
           
        }
        public static function checkIp():String{
            return actionscript3.checkIp();
        }
    }
}
阅读(895) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~