Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

FLV seek component.

Hi,

I'm wanting to add the functionality to the flv seekbar UI component so that when you click on it, the flv seeks to that point.
I've found a couple if AS3 examples but I need to do this in AS2.

Would anyone have any examples of the AS2 needed to achieve this or provide links to any reference/tutorials?

Thanks in advance.

Mark

0
crooksy88
Asked:
crooksy88
  • 2
1 Solution
 
Aneesh ChopraCommented:
following code will do the magic:


// replace 'this' with the reference of base movieClip where seekBar and FLVPlayback instance resides
// replace "seekBar_mc" with the instance name of "SeekBar"
// replace "FLVPlybk" with the instance name of "FLVPlayBack instance.
var myListener = new Object();
var _this = this; 
myListener.onMouseDown = function() {
	if (_this.seekBar_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
		_this.FLVPlybk.playheadPercentage = _this.seekBar_mc._xmouse;
	}
};
Mouse.addListener(myListener);

Open in new window

0
 
crooksy88Author Commented:
Thanks Aneesh ;)
0
 
crooksy88Author Commented:
Hi Aneesh,

Following on from your solution above. Would you know how (or if possible) to get the hand cursor to appear when rolling over the seekbar?

Using something like :

_this.seekBar_mc.useHandCursor = true;

doesn't seem to work.

Thanks,

Mark
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.

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