[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

scrubber (slider) navigation for .flv

hello,

im using flashMXPro2004, designing a cd-rom with external .flv being controlled by .swf's. I know there's 'media display' component that scrubs the .flv, but i want my own design and programming.

so, can anyone show me how to create a button that works as a scrubber for .flv video?, the .flv is using NetStream and Net Connection,

thanks
jk
0
jk-mc
Asked:
jk-mc
  • 4
  • 3
1 Solution
 
negatyveCommented:
this.createEmptyMovieClip("slider_mc", 1);
slider_mc.moveTo(0, 0);
slider_mc.lineStyle(1, 0x00000, 100);
slider_mc.beginFill(0xFFCC00, 100);
slider_mc.lineTo(20, 0);
slider_mc.lineTo(20, 10);
slider_mc.lineTo(0, 10);
slider_mc.lineTo(0, 0);
slider_mc.endFill();
slider_mc.onPress = function()
{
      this.startDrag(false, 0, 0, 100, 0);
}
slider_mc.onRelease = slider_mc.onReleaseOutside = function()
{
      this.stopDrag();
      stream_ns.seek((stream_length * this._x) / 100);
}
0
 
jk-mcAuthor Commented:
hi negatyve,

thanks for replying, it works great, and if it's not too much to ask, i would like the buton to move along the _x axis in sync. with the .flv

i've used,
_root.slider_mc._x = _root.stream_ns.time();
but to no avail;

cheers
jk
0
 
negatyveCommented:
time is a property, not a method:

_root.slider_mc._x = _root.stream_ns.time;

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jk-mcAuthor Commented:
small problem ,

_root.slider_mc._x = _root.stream_ns.time;
is holding the button at a certain place, not allowing me to move it further along,

any ideas?
0
 
negatyveCommented:
Are you using an event, like enterFrame, or a setInterval, to update the slider position?
0
 
jk-mcAuthor Commented:
eh well, i've got a movieClip called 'drag' in a movieClip called 'totalTimeLine',
and i've attached the following code to the button that sits within mc 'drag',


on (press) {
      this._parent.stop();
     this.startDrag(false, 0, 0, 201, 0);
}

on (release, releaseOutside) {
     this.stopDrag();
     _root.stream_ns.seek(this._x);
       this._parent.play();
      }

mc 'totalTimeLine' has 2 frames, on which
_root.slider_mc._x = _root.stream_ns.time;
is in frame 1, and a gotoAndPlay(1) is in frame 2.

the
this._parent.stop(); and
this._parent.play(); in the button allows it to move along the _x axis, but there's an unprofessional delay on mouse release for hald a second,

hope that all makes sense



0
 
jk-mcAuthor Commented:
negatyve,

i think im happy enough with what i've got,  
thats the 2nd time you've helped me, i appreciate it a lot,

jk
0
 
gwasnyCommented:
jk,

I hate to impose and excuse my duhness, but would you have a sample .fla file to share which provides a working example of your flv scrubber.  If you wish, please feel free to contact me at gwasny@telus.net

I'm new to Flash MX and online video, and struggling with the coding.

Thanks in advance,

Garrett
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now