Changeset 2 for trunk/as3/com/jeroenwijering/views/ControlbarView.as
- Timestamp:
- 06/05/08 11:54:24 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/as3/com/jeroenwijering/views/ControlbarView.as
r1 r2 64 64 private function captionHandler(evt:ControllerEvent) { 65 65 if(evt.data.state == true) { 66 bar.captionButton.icn.visible = true; 67 bar.captionButton.alt.visible = false; 66 try { 67 bar.captionButton.icn.visible = true; 68 bar.captionButton.alt.visible = false; 69 } catch (err:Error) {} 68 70 } else { 69 bar.captionButton.icn.visible = false; 70 bar.captionButton.alt.visible = true; 71 try { 72 bar.captionButton.icn.visible = false; 73 bar.captionButton.alt.visible = true; 74 } catch (err:Error) {} 71 75 } 72 76 }; … … 160 164 pc2 = evt.data.offset/evt.data.total; 161 165 } 162 var wid = bar.timeSlider.bck.width; 163 bar.timeSlider.bar.x = Math.round(pc2*wid); 164 bar.timeSlider.bar.width = Math.round(pc1*wid); 166 try { 167 var wid = bar.timeSlider.bck.width; 168 bar.timeSlider.bar.x = Math.round(pc2*wid); 169 bar.timeSlider.bar.width = Math.round(pc1*wid); 170 } catch (err:Error) {} 165 171 }; 166 172 … … 208 214 if(evt.data.width > 640) { 209 215 bar.x = Math.round(evt.data.width/2 - 300); 210 bar.back.width = 600;216 try { bar.back.width = 600; } catch (err:Error) {} 211 217 } else { 212 218 bar.x = view.config['controlbarsize']; 213 bar.back.width = evt.data.width - view.config['controlbarsize']*2;219 try { bar.back.width = evt.data.width - view.config['controlbarsize']*2; } catch (err:Error) {} 214 220 } 215 221 } else { 216 222 bar.x = 0; 217 bar.back.width = evt.data.width;223 try { bar.back.width = evt.data.width; } catch (err:Error) {} 218 224 bar.y = evt.data.height; 219 225 if(view.config['playlist'] == 'right') { 220 bar.back.width += view.config['playlistsize']; 221 } 222 } 223 if(evt.data.fullscreen == true) { 224 bar.fullscreenButton.icn.visible = false; 225 bar.fullscreenButton.alt.visible = true; 226 } else { 227 bar.fullscreenButton.icn.visible = true; 228 bar.fullscreenButton.alt.visible = false; 229 } 226 try { bar.back.width += view.config['playlistsize']; } catch (err:Error) {} 227 } 228 } 229 try { 230 if(evt.data.fullscreen == true) { 231 bar.fullscreenButton.icn.visible = false; 232 bar.fullscreenButton.alt.visible = true; 233 } else { 234 bar.fullscreenButton.icn.visible = true; 235 bar.fullscreenButton.alt.visible = false; 236 } 237 } catch (err:Error) {} 230 238 setButtons(); 231 239 }; … … 317 325 } catch(err:Error) {} 318 326 var pct = evt.data.position/evt.data.duration; 319 var xps = Math.floor(pct*bar.timeSlider.bck.width); 320 if (dur <= 0) { 321 bar.timeSlider.icn.visible = false; 322 } else { 323 bar.timeSlider.icn.visible = true; 324 bar.timeSlider.icn.x = xps; 325 } 327 try { 328 var xps = Math.floor(pct*bar.timeSlider.bck.width); 329 if (dur <= 0) { 330 bar.timeSlider.icn.visible = false; 331 } else { 332 bar.timeSlider.icn.visible = true; 333 bar.timeSlider.icn.x = xps; 334 } 335 } catch(err:Error) {} 326 336 }; 327 337
Note: See TracChangeset
for help on using the changeset viewer.
