randomZ
01-02-2008, 10:53 PM
Hi,
I built a small FLV player. I originally added a seek bar by simply dragging it onto the stage, and everything worked fine. Now I've tried to convert it to use a seek bar I create in my ActionScript code.
However, while the seek bar shows up in the right place, the seek bar handle isn't be created. Is there anything I forgot?
I first create the seek bar like this:
mySeekBar = new SeekBar;
mySeekBar.x = largeVideoExtent.x + buttonsWidth;
mySeekBar.width = largeVideoExtent.width - buttonsWidth;
mySeekBar.y = largeVideoExtent.y + largeVideoExtent.height;
myContainer.addChild(mySeekBar);
Then I create my FLVPlayback component and set its seekBar attribute:
myVideo1 = new FLVPlayback;
myVideo1.x = largeVideoExtent.x;
myVideo1.y = largeVideoExtent.y;
myVideo1.width = largeVideoExtent.width;
myVideo1.height = largeVideoExtent.height;
myVideo1.seekBar = mySeekBar;
myVideo1.load(myLVideoFile);
myContainer.addChild(myVideo1);
The video is playable by calling the play() function, so the video is definitely loaded correctly. Does anyone have any idea how I might solve my problem?
Thanks in advance,
Sebastian
I built a small FLV player. I originally added a seek bar by simply dragging it onto the stage, and everything worked fine. Now I've tried to convert it to use a seek bar I create in my ActionScript code.
However, while the seek bar shows up in the right place, the seek bar handle isn't be created. Is there anything I forgot?
I first create the seek bar like this:
mySeekBar = new SeekBar;
mySeekBar.x = largeVideoExtent.x + buttonsWidth;
mySeekBar.width = largeVideoExtent.width - buttonsWidth;
mySeekBar.y = largeVideoExtent.y + largeVideoExtent.height;
myContainer.addChild(mySeekBar);
Then I create my FLVPlayback component and set its seekBar attribute:
myVideo1 = new FLVPlayback;
myVideo1.x = largeVideoExtent.x;
myVideo1.y = largeVideoExtent.y;
myVideo1.width = largeVideoExtent.width;
myVideo1.height = largeVideoExtent.height;
myVideo1.seekBar = mySeekBar;
myVideo1.load(myLVideoFile);
myContainer.addChild(myVideo1);
The video is playable by calling the play() function, so the video is definitely loaded correctly. Does anyone have any idea how I might solve my problem?
Thanks in advance,
Sebastian