package {
import flash.display.*;
public class DisplayListExample extends Sprite {
public function DisplayListExample( ) {
var red:Shape = createCircle( 0xFF0000, 10 );
red.x = 10;
red.y = 20;
var green:Shape = createCircle( 0x00FF00, 10 );
green.x = 15;
green.y = 25;
var blue:Shape = createCircle( 0x0000FF, 10 );
blue.x = 20;
blue.y = 20;
var container1:Sprite = new Sprite( );
container1.addChild( red );
container1.addChild( green );
container1.addChild( blue );
addChild( container1 );
var container2:Sprite = new Sprite( );
addChild( container2 );
container2.addChild( red );
}
public function createCircle( color:uint, radius:Number ):Shape {
var shape:Shape = new Shape( );
shape.graphics.beginFill( color );
shape.graphics.drawCircle( 0, 0, radius );
shape.graphics.endFill( );
return shape;
}
}
}
我把这段代码写到exemple.as中,测试exemple.fla时,exemple.swf中什么都不显示,我想知道,exemple.as与
exemple.fla中是如何建立关系的,殿堂之路中没有啊
------解决方案--------------------------------------------------------
文档属性有个“发布”有个类将你的类名填入!