12 2008 档案

摘要:1.工厂方法模式: 定义一个用于创建对象的接口,让子类决定实例化哪个类。工厂方法模式使得一个类的实例化延迟到子类。 2.工厂方法模式应用场景: 某个对象的创建,由于需求的变化导致这个对象的具体实现面临着剧烈的变化,但是它却拥有比较稳定的接口。 3.举例 ILight.cs Code highlighting produced by Actipro CodeHighlighter (freeware... 阅读全文
posted @ 2008-12-31 22:41 HelloCG 阅读(126) 评论(0) 推荐(0)
摘要:1.生成器模式: 将一个复杂对象的构建与其表示相分离,使得同样的构建过程可以创建不同的表示。 2.生成器模式应用场景: 一个复杂的对象的创建,通常由各个部分的子对象构成,由于需求的变化,各个子对象经常发生变化。 3.举例 IProduct.cs Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.Co... 阅读全文
posted @ 2008-12-31 22:24 HelloCG 阅读(169) 评论(0) 推荐(0)
摘要:1.抽象工厂模式: 提供一个接口,让该接口负责创建一系列相关或者相互依赖的对象,无需指定它们具体的类。 2.抽象工厂模式应用场景: 一系列相互依赖的对象的创建工作;同时,由于需求变化,往往存在更多系列的对象的创建工作。 3.举例 例1 AbstractFactory.cs Code highlighting produced by Actipro CodeHighlighter (freeware... 阅读全文
posted @ 2008-12-31 22:08 HelloCG 阅读(245) 评论(1) 推荐(0)
摘要:1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-31 16:44 HelloCG 阅读(216) 评论(0) 推荐(0)
摘要:1.创建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-31 15:47 HelloCG 阅读(212) 评论(0) 推荐(0)
摘要:1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-31 11:50 HelloCG 阅读(276) 评论(0) 推荐(0)
摘要:Flash CS3的内部计算的最小的单位是twip。 1twip=1像素的1/20。 可以用简单的trace来获得 Test.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->var sprite:Sprite=new sprite(); addC... 阅读全文
posted @ 2008-12-31 11:32 HelloCG 阅读(217) 评论(0) 推荐(0)
摘要:1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-31 11:16 HelloCG 阅读(434) 评论(0) 推荐(0)
摘要:1. 构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-30 22:44 HelloCG 阅读(190) 评论(0) 推荐(0)
摘要:1.构建小球精灵 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-30 21:59 HelloCG 阅读(202) 评论(0) 推荐(0)
摘要:构建Ball精灵: Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-30 20:30 HelloCG 阅读(225) 评论(0) 推荐(0)
摘要:1.计算基本的三角函数 正弦=对边/斜边 Math.sin(弧度值):Number 余弦=邻边/斜边 Math.cos(弧度值):Number 正切=对边/邻边 Math.tan(弧度值):Number 余切=邻边/对边 1/Math.tan(弧度值):Number 2.转换弧度为度和转换度为弧度 radians = degrees * Math.PI / 180; degrees = radia... 阅读全文
posted @ 2008-12-30 14:18 HelloCG 阅读(345) 评论(0) 推荐(0)
摘要:1.构建小球 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Sprite ... 阅读全文
posted @ 2008-12-30 11:50 HelloCG 阅读(251) 评论(0) 推荐(0)
摘要:1.构建小球 Ball.as package { import flash.display.Sprite; public class Ball extends Sprite { public var radius:Number; public var color:uint; public function Ball ... 阅读全文
posted @ 2008-12-29 22:25 HelloCG 阅读(305) 评论(0) 推荐(0)
摘要:1.用ball构建单个粒子 Ball.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Ball extends Spr... 阅读全文
posted @ 2008-12-29 20:56 HelloCG 阅读(277) 评论(0) 推荐(0)
摘要:1,构建精灵 Arrow.as Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package { import flash.display.Sprite; public class Arrow extends Sprite ... 阅读全文
posted @ 2008-12-29 11:43 HelloCG 阅读(233) 评论(0) 推荐(0)
摘要:Flash ActionScript 阅读全文
posted @ 2008-12-29 09:11 HelloCG 阅读(295) 评论(0) 推荐(0)
摘要:flash ActionScript 阅读全文
posted @ 2008-12-28 21:23 HelloCG 阅读(260) 评论(1) 推荐(0)
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->obj_sp=sphere() obj_sp.segments=40 obj_sp.radius=50 ConvertToPoly obj_sp for i=1 to obj_sp.G... 阅读全文
posted @ 2008-12-28 19:57 HelloCG 阅读(228) 评论(0) 推荐(0)
摘要:自己在博客园的blog开通了! 非常高兴! 阅读全文
posted @ 2008-12-28 19:39 HelloCG 阅读(127) 评论(0) 推荐(0)