Scrub external SWF timeline and video within that SWF

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.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 15th, 2007, 22:46
New Member
Join Date: Oct 2007
Location: Earth
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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));
}
Reply With Quote

Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 17:35.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43