Цитата:
Сообщение от Akopalipsis
я точно знаю, что добавлять на стейдж обьекты - нельзя!
|
Хм, а по Муку вроде как можно, вот например:
For example, the following code modifies the App class from Example 20-5 so that the Sprite object
and its child Shape object are added directly to the Stage instance. Because the Sprite
and Shape objects are not descendants of a .swf file’s main class instance, their root
variables refer to the Stage instance.

Код AS3:
package {
import flash.display.*;
import flash.geom.*;
public class App extends Sprite {
public function App ( ) {
var rect:Shape = new Shape( );
rect.graphics.lineStyle(1);
rect.graphics.beginFill(0x0000FF, 1);
rect.graphics.drawRect(0, 0, 75, 50);
var sprite:Sprite = new Sprite( );
sprite.addChild(rect);
// Add child to Stage instance, not this App instance
stage.addChild(sprite);
trace(rect.root); // Displays: [object Stage]
trace(sprite.root); // Displays: [object Stage]
}
}
}
Ну, то есть, чисто технически можно.
Но идеологически, как мы теперь знаем, это есть зло - согласно заповедям от Wolsh, например : )