package { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.BlendMode; import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.display.Shape; import flash.display.Sprite; import f…
package { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.BlendMode; import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.display.Shape; import flash.display.Sprite; import f…
package com{ import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import flash.display.Shape; import flash.geom.ColorTransform; import flash.geom.Rectangle; public class Drow extends MovieClip { private v…
转自zrong's blog:http://zengrong.net/post/1295.htm ActionScript ActionScript通常简称为AS,它是Flash平台的语言.AS编写的程序,最终可以编译成SWF.SWC.SWF就是我们常说的Flash动画.但是现在SWF已经不仅仅是动画,而是RIA的载体. ActionScript有3个版本,分别是1.0版(AS1),2.0版(AS2)和3.0版(AS3).只有Flash Player 9及以上播放器才支持AS3编译的SWF.这三…
import flash.display.Shape; import flash.display.GradientType; import flash.geom.Matrix; import flash.display.Sprite; var myShape:Shape = new Shape(); var gradientBoxMatrix:Matrix = new Matrix(); gradientBoxMatrix.createGradientBox(400, 400,0, 0, 0);…
package { import flash.display.Loader; import flash.display.SimpleButton; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.geom.ColorTransform; import flash.net.URLRequest; /** * ... * @author Frost…
import flash.geom.Point; import flash.display.MovieClip; import flash.display.Graphics; function drawDashed(mc:Sprite,p1:Point,p2:Point,length:Number=5,gap:Number=5):void { var max:Number = Point.distance(p1,p2); var l:Number = 0; var p3:Point; var p…
JS端: <script type="text/javascript"> <!-- var winWidth = 0; var winHeight = 0; var scrHeight = 0; function findDimensions() //函数:获取尺寸 { //获取窗口宽度 if (window.innerWidth) winWidth = window.innerWidth; else if ((document.body) && (d…
首先介绍SWFObject的用法: swfobject.embedSWF(swfUrl, id, width, height, version, expressInstallSwfurl, flashvars, params, attributes) 有5个必须的参数和4个可选的参数: 1. swfUrl(String,必须的)指定SWF的URL. 2. id(String,必须的)指定将会被Flash内容替换的HTML元素(包含你的替换内容)的id. 3. width(String,必须的)指…
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <style type="text/css"> *{ padding: 0; margin: 0; } .wrap{ width: 400px; height: 430px; margin: 20px auto; border: 1px sol…