File tree Expand file tree Collapse file tree
tests/tests/swfs/avm2/context3d_creation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package {
2+ import flash.display.MovieClip ;
3+ import flash.display.Stage3D ;
4+ import flash.events.Event ;
5+
6+ public class Test extends MovieClip {
7+ public function Test () {
8+ var s3d: Stage3D = stage . stage3Ds[ 0 ];;
9+ var self: Test = this ;
10+
11+ trace (this . currentFrame );
12+
13+ addEventListener ("enterFrame" , function (): void {
14+ trace ("Running enterFrame, currentFrame=" + self. currentFrame );
15+ });
16+ addEventListener ("frameConstructed" , function (): void {
17+ trace ("Running frameConstructed, currentFrame=" + self. currentFrame );
18+ });
19+ addEventListener ("exitFrame" , function (): void {
20+ trace ("Running exitFrame, currentFrame=" + self. currentFrame );
21+ });
22+
23+ s3d. addEventListener ("context3DCreate" , context3DCreateHandler);
24+ s3d. requestContext3D();
25+ }
26+
27+ public function context3DCreateHandler (e :Event ):void {
28+ trace ("context3DCreate dispatched, currentFrame=" + this . currentFrame );
29+ trace ("Stack trace from within context3DCreate: " + new Error (). getStackTrace ());
30+ }
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ 1
2+ Running frameConstructed, currentFrame=1
3+ Running exitFrame, currentFrame=1
4+ context3DCreate dispatched, currentFrame=1
5+ Stack trace from within context3DCreate: Error
6+ at Test/context3DCreateHandler()
7+ Running enterFrame, currentFrame=2
8+ Running frameConstructed, currentFrame=2
9+ Running exitFrame, currentFrame=2
Original file line number Diff line number Diff line change 1+ num_frames = 2
2+
3+ [player_options ]
4+ with_renderer = { optional = false , quality = " low" }
You can’t perform that action at this time.
0 commit comments