PDA

View Full Version : SeekBar handle won't show up with FLVPlayback


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

dragoblade
01-04-2008, 04:01 AM
why make one in actionscript what is the difference?

also it may have something to do with the fact that when i checked out the seeker component the handle is on the 2nd frame, besides that i dont know enough actionscript to help that much,

randomZ
01-06-2008, 04:15 PM
I think the fact the handle is on the second frame is merely a convenience for the designer; the handle should be created by the FLVPlayback.

Well, I'm gonna experiment some more.

dragoblade
01-06-2008, 05:29 PM
i made a seekerbar by taking their seekerbar and changeing the pictures

on the 2nd frame i changed what the handle look like, and it did change, so i dont think it is just created by itself

you can always do what i did it is really easy in fact