@@ -143,49 +143,6 @@ package imree.modules
143143
144144 private var sound: MP3Loader;
145145
146- public function draw_on_image ():void
147- {
148- sound = new MP3Loader(asset_url, {autoPlay : true , noCache: true });
149- sound . load ();
150-
151- var play_button: button_play = new button_play();
152- main. Imree. UI_size(play_button);
153- play_button. x = text_backgound. width / 2 - play_button. width / 2 ;
154- play_button. y = text_backgound. height - play_button. height - 30 ;
155- text_backgound. addChild (play_button);
156- var pause_button: button_pause = new button_pause();
157- main. Imree. UI_size(pause_button);
158- pause_button. x = play_button. x ;
159- pause_button. y = play_button. y ;
160- text_backgound. addChild (pause_button);
161- play_button. visible = false ;
162-
163- TweenLite. from(pause_button, 1 , { y : pause_button. y + pause_button. height * 2 , x : pause_button. x - pause_button. width * . 5 , scaleX : 2 , scaleY : 2 , ease : Cubic . easeOut } );
164-
165- play_button. addEventListener (MouseEvent . CLICK , play_button_clicked);
166- function play_button_clicked(a_variable_that_dont_matter: MouseEvent ): void {
167- TweenLite. to(sound , . 5 , {volume : 1 , onComplete: onCompletePause});
168- play_button. visible = false ;
169- pause_button. visible = true ;
170- }
171- pause_button. addEventListener (MouseEvent . CLICK , pause_button_clicked);
172- function pause_button_clicked(a_variable_that_dont_matter: MouseEvent ): void {
173- TweenLite. to(sound , . 5 , {volume : 0 , onComplete: onCompletePause});
174- play_button. visible = true ;
175- pause_button. visible = false ;
176- }
177- function onCompletePause(e:* = null ): void {
178- sound . paused = ! sound . paused ;
179- }
180-
181- asset_content_wrapper. addEventListener (Event . REMOVED_FROM_STAGE , stop_playing_the_damn_sound);
182- function stop_playing_the_damn_sound(dummy_var: Event ): void {
183- sound . pause ();
184- sound . dispose ();
185- }
186-
187- }
188-
189146 override public function draw_feature (_w :int , _h :int ):void {
190147 phase_feature = true ;
191148 main. log ('Loading module.module_asset_image [id:' + module_id + '] [name: ' + module_name + '] ' + asset_url);
0 commit comments