This is a discussion on "Scrub external SWF timeline and video within that SWF" within the Flash & Multimedia Forum section. This forum, and the thread "Scrub external SWF timeline and video within that SWF are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Scrub external SWF timeline and video within that SWF
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Scrub external SWF timeline and video within that SWF
Anyone have any ideas of how to scrub an SWF timeline and a video that's in an that SWF...
I have the play/pause, rewind and mute all working to control both the SWF timeline and the video in that SWF. I have the scrubber scrubbing the SWF timeline but can't figure out how to get it to scrub the video as well. I've done this by linking an external video into a fl movie, exporting SWF then importing that SWF into another fl movie to control both video and timeline (timeline calls java functions for footnotes to appear thoughout the movie). Any geniuses out there today? Let me know if u need to see the code. Herez the scrub code: // -- scrub --------------------------------------------------------------------------------------- // video extSWF["onMetaData"] = function(obj) { duration = obj.duration; } function videoStatus() { amountLoaded = extSWF.ns.bytesLoaded / extSWF.ns.bytesTotal; loader.loadbar._width = amountLoaded * 680; loader.scrub._x = extSWF.ns.time / duration * 680; } // end video extSWF_onEnterFrame = function() { var isFirstFrame = extSWF._currentframe == 1 if (i_isPlaying) { var startFrame = extSWF._currentframe; for (var nextFrame = startFrame; nextFrame < i_speed + startFrame - 1; nextFrame ++) { extSWF.gotoAndPlay( Math.min(nextFrame, extSWF._totalframes) ) } var nextX = (extSWF._currentframe / extSWF._totalframes) * loader.loadbar._width; if (nextX >= loader.scrub._x || isFirstFrame) { loader.scrub._x = nextX } } if (extSWF._currentframe == extSWF._totalframes) { stopPlaying() } if (extSWF._currentframe > 1 && rewindButton.onRollOver == undefined) { rewindButton.setState("up") rewindButton.onRollOver = rewindButton_onRollOver rewindButton.onRollOut = rewindButton_onRollOut rewindButton.onPress = rewindButton_onPress } } function checkSwfLoadStatus() { var amountLoaded:Number = extSWF._framesloaded / extSWF._totalframes; // 0-1 loader.loadbar._width = amountLoaded * i_loaderBarStartWidth; if (i_isScrubbing) { loader.scrub.startDrag(false, 0 , loader.scrub._y, loader.loadbar._width, loader.scrub._y); loader.scrub._x = Math.min(loader._xmouse,loader.loadbar._width) } } loader.scrub.onPress = function() { i_isScrubbing = true swfSyncToScrubberInterval = setInterval(swfSyncToScrubber,10); this.startDrag(false, 0 , this._y, loader.loadbar._width, this._y); // Video clearInterval(videoInterval); scrubInterval = setInterval(scrubit,10); this.startDrag(false,0,this._y,680,this._y); // end Video } loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() { clearInterval(swfSyncToScrubberInterval); this.stopDrag(); swfSyncToScrubber() i_isScrubbing = false // Video clearInterval(scrubInterval); videoInterval = setInterval(videoStatus,100); this.stopDrag(); // end Video } function swfSyncToScrubber() { var nextFrame = Math.max(( Math.floor((loader.scrub._x / (i_loaderBarStartWidth - (loader.scrub._width/2)) )* extSWF._totalframes))-1 ,1) extSWF.gotoAndStop(nextFrame); stopPlaying() if (extSWF._currentframe == 1) { rewindButton.setState("disabled") delete rewindButton.onRollOver delete rewindButton.onRollOut delete rewindButton.onPress } else if (extSWF._currentframe > 1 && rewindButton.onRollOver == undefined) { rewindButton.setState("up") rewindButton.onRollOver = rewindButton_onRollOver rewindButton.onRollOut = rewindButton_onRollOut rewindButton.onPress = rewindButton_onPress } } // Video function scrubit() { extSWF.ns.seek(Math.floor((loader.scrub._x/680)*duration)); } |
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Timeline difficulties | serepro | Starting Out | 5 | Nov 30th, 2007 18:39 |
| Animated Timeline in Flash | student_in_training | Flash & Multimedia Forum | 3 | Nov 19th, 2007 14:12 |
| Video player preview Image fade to video | Lchad | Flash & Multimedia Forum | 10 | Sep 4th, 2007 15:37 |
| Help with timeline transition | LyndonSG | Flash & Multimedia Forum | 1 | Aug 15th, 2007 07:56 |
| Can I invoke a timeline from an external text file Array? | d-kam | Flash & Multimedia Forum | 5 | Apr 1st, 2005 09:25 |