Difference between revisions of "Actionscript 3 Snippets"
From Wikicliki
(→removeChild) |
|||
Line 35: | Line 35: | ||
WILL WORK!! BUT I DON'T KNOW WHY? | WILL WORK!! BUT I DON'T KNOW WHY? | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | [[Category:Programming]] |
Latest revision as of 02:39, 12 July 2013
Useful AS3 Snippets
Contents
Fullscreen
import flash.display.*; stage.displayState = StageDisplayState.FULL_SCREEN; stage.scaleMode = StageScaleMode.SHOW_ALL; // SHOW_ALL or NO_SCALE stage.align = StageAlign.TOP_LEFT; fscommand("fullscreen", "true"); fscommand("allowscale", "true");
No Cursor
import flash.ui.Mouse; // Mouse.show(); - optional line Mouse.hide();
removeChild
removeChild(video_holder);
will return this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at tanah_1920x1080_v5b_fla::gedung_vid_17/closeVideo1()[tanah_1920x1080_v5b_fla.gedung_vid_17::frame1:50] at tanah_1920x1080_v5b_fla::MainTimeline/menu_press()[tanah_1920x1080_v5b_fla.MainTimeline::frame1:184]
BUT
if( container.contains( video_holder) ){ container.removeChild( video_holder ); }
WILL WORK!! BUT I DON'T KNOW WHY?