Hello,
I would douvrir this new discussion, because despite my research on the net, resource sites or tutorials, and this forum...I havent found a solution.
A few months ago jai made a Flash interface (designed to Loff-line), its a exe or app that is launched from a CD.
In this interface, there are videos that I chose to implement "integrated video" (for several reasons).
Javais already created buttons Play - Pause - Back to Top - Jump to the end to control the video.
Today, this video, i wish i could add a controlbar (or timeline bar). Cest to say, like any video player (or audio) to have a horizontal bar (representing the duration), and a button that advance (which is visually representative video over the entire duration).
The idea is to first just to see where we are in the video.
And 2nd, you can click this button to manually move the video.
The trick is for a classic video What ^ ^
I'm not a pro at programming...
Here is yet jarrive what to do.
For example, my onboard video is 2000 frames, and my timeline 800px.
So there is a report x2. 5
on(press) {
startDrag(bille, false, 0, 400, 800, 400);
}
on(release) {
stopDrag();
//On récupère la position x de la bille
this.bille._x;
//On implante la position x de la bille dans une variable
positionbille = bille._x;
//On multiplie cette valeur au prorata du nombre de clé de la vidéo
positionclip = positionbille * 2.5
//On arrondi cette valeur pour avoir un nombre entier
positionclip = Math.round(positionclip/100) * 100
//Ce nombre correspond à la clé du clip de la vidéo
_parent.COMFORT.gotoAndPlay(positionclip);
}
- on(press) {
- startDrag(bille, false, 0, 400, 800, 400);
- }
- on(release) {
- stopDrag();
- //On récupère la position x de la bille
- this.bille._x;
- //On implante la position x de la bille dans une variable
- positionbille = bille._x;
- //On multiplie cette valeur au prorata du nombre de clé de la vidéo
- positionclip = positionbille * 2.5
- //On arrondi cette valeur pour avoir un nombre entier
- positionclip = Math.round(positionclip/100) * 100
- //Ce nombre correspond à la clé du clip de la vidéo
- _parent.COMFORT.gotoAndPlay(positionclip);
- }
A priori, it seems to work...
On this point, I only manage a quà if / else, to put a gotoAndPlay if the movie is playing or gotoAndStop if the video is paused.
Well there cétait easiest ^ ^
But the most difficult tasks lie ahead, that automatically advance the ball on the timeline when the video is playing. And its where I hang.
(Jappelli that the ball is the button or slider)
In my thinking (maybe fake)...to the ball ahead of the timeline, it must recover linformation on what "key" is the video (eg 250), divide this value by 2.5 (so 100), and thus move the ball x 100px.
But I can not find how in AS2, you can retrieve linformation to-know-what-to-be-key-is-lanimation.
Because once this information back, just (I assume I'm) implement that value in a variable, and always with a nice rule of three, convert this value to indicate the ball position in which x must be found.
If you have any ideas, leads, suggestions or even a solution, thank you
