header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
amutha
Points:0
Posts:0

6/23/2010 12:50:37 AM

Title: videoplayer


i want to add forward and rewind option in my player using flex 3. how can i do it. help me please.



1
gourav
Points: 540
Posts:0
6/23/2010 2:47:41 AM



hiii.amutha .


do u want this on scroll bar thumbPress/thumbReleaseor on buttongs?

see the code given blow for thumb:

---------------------------------------------------------
<mx:Script>
<![CDATA[
private function slider_thumbPress():void {
videoDisplay.pause();
}

private function slider_thumbRelease():void {
//videoDisplay.pause();
videoDisplay.playheadTime = slider.value;
videoDisplay.play();
}

</mx:Script>
<mx:HSlider id="slider" width="358"
allowTrackClick="false"
invertThumbDirection="true"
liveDragging="true"
maximum="{videoDisplay.totalTime}"
minimum="0"
thumbPress="slider_thumbPress()"
thumbRelease="slider_thumbRelease()"
tickInterval="1"
value="{videoDisplay.playheadTime}" height="14"
/>

2
gourav
Points: 540
Posts:0
6/23/2010 2:48:27 AM



you can update this for ur application.

3
amutha
Points: 0
Posts:0
6/23/2010 3:52:57 AM



thanks for your reply gourav. but i had 2 buttons for forward and rewind once i click it means it will play the forward r rewind action. i dont want the above one.plz help me...

4
Ohio
Points: 0
Posts:0
6/23/2010 4:16:40 AM



I have altered gaurav's code. for forward use

private function forwardVideo():void {
// 5 is the jump that you want to make to forward video
videoDisplay.playheadTime = videoDisplay.playheadTime+5;
videoDisplay.play();
}

for backuse

private function forwardVideo():void {
// 5 is the jump that you want to make to forward video
videoDisplay.playheadTime = videoDisplay.playheadTime-5;
videoDisplay.play();
}

5
gourav
Points: 540
Posts:0
6/23/2010 4:59:42 AM



hiii ur welcome..

i mean bow u have concept you can apply this code to ur button also
u can use ohio code also it will work

6
amutha
Points: 400
Posts:0
6/23/2010 9:09:52 PM



thanks ohio its work well thanks for your replay.

7
amutha
Points: 400
Posts:0
6/23/2010 9:57:17 PM



i have an another problem shall i control playing speed of my player that means i had normal and slow button if i click normal means video will play normal speed ,if i click slow means it will play slow , speed will reduced from normal.can i do it. please help me?

8
Iblis
Points: 0
Posts:0
6/24/2010 6:50:04 AM



there is no way in the flash to change the speed or framerate of a video. An alternative is that your video should contain every frame as keyframe and then you can set the playhead property in a loop to move the video slow or fast. see this code

function slowVideo (){
myMovie.playheadTime=myMovie.playheadTime+.1;
}
var slowTimer=setInterval(slowVideo, 1000);

But remember if you create keframe on every frame of your video , the video size becomes very big


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions