Hi
Main.as
Code:
package {
import flash.display.*;
public class Main extends Sprite {
[Embed(source='Test.swf')]
private var Test:Class;
public function Main() {
var test:Sprite=new Test();
addChild(test);
}
}
}
This code works in Flex, but when I am trying to do run it in Flash I am reciving error.
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Main$iinit()
It seems that flash can't see SWF files embeded this way. Is there any way to emdeb SWF in flash clases? (besides library linkage)