Adobe Dreamweaver Forums



Last 10 THreads :         static sound (Last Post : kglad - Replies : 11 - Views : 12 )           »          Code that can effect two movie clips (Last Post : Alessandroy - Replies : 2 - Views : 3 )           »          load xml into mc symbols (Last Post : kglad - Replies : 1 - Views : 2 )           »          Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 83 - Views : 955 )           »          Create 2nd animation in same flash file (Last Post : dabooj - Replies : 0 - Views : 1 )           »          Local host and php Solutions help... (Last Post : RJweb - Replies : 1 - Views : 6 )           »          problems linking PDFs (Last Post : Alan - Replies : 3 - Views : 4 )           »          Flash movie not working in html (Last Post : WEBDavid - Replies : 0 - Views : 1 )           »          drop down menu over flash (Last Post : ltartisel - Replies : 2 - Views : 3 )           »          Flash-PHP Mail Form (Last Post : kglad - Replies : 3 - Views : 4 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #11 (permalink)  
Old 12-01-2008, 05:02 PM
rckehoe
 
Posts: n/a
Diggs:
Default Re: playheadTime issue

I think I found the issue...

It wasn't the code, it was the FLV file itself. I think it was encoded
wrong... So I used another FLV that I encoded myself and it seemed to work fine.

However, If I don't add any cuePoints or Keyframes when I encode the FLV,
would that allow me to add them in my Flex app without issue?



Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 12-01-2008, 06:23 PM
rtalton
 
Posts: n/a
Diggs:
Default Re: playheadTime issue

I experimented with the playheadTime property and learned that you cannot set
it to an exact time unless it coincides with a keyframe (see explanation below).
See an example here:
http://www.anaheimwib.com/_comps/video/ (I'll leave it up for a couple of
days).

This will let you experiment with different times to see where the playhead
moves to.
Essentially, what happens when you set playheadTime is that it will move to
the first keyframe AFTER the cuepoint.
I used After Effects to create the FLV and set the cuepoints (see details
below). By default, the Adobe Media Encoder set the keyframes at 2-second
intervals. Note that in the application example I posted, you cannot move the
playhead to any other value except 2 seconds, 4 seconds, 6 seconds etc. Any
value you input in between these 2-second keyframe intervals will move the
playhead to the next keyframe downstream in the file. (Note: this test is for
progressive download, not streaming)

So, unless your cue points match up exactly with a keyframe, you will not be
able to move the playhead exactly to that cuepoint.

Settings the keyframes manually might help you, but keep in mind that
overriding the encoder keyframe placement can degrade video quality in some
cases and you'd have to increase the bitrate to compensate, resulting in a
larger file (this is a whole 'nother topic I won't get into here, but it
involves how the encoder is compressing the frames).

Video details:
Used the Adobe Media Encoder in After Effects CS3.
frame rate: 24 fps (set to match Flex's default frame rate)
bitrate: 400 kbps
no audio
codec: On2 VP6
cue points were encoded at 0, 11, 22, 33, 56, 69, 82, 108 and 120 seconds, as
rckehoe used in his example.

Let me know if this was helpful.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="initApp()" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[

private function initApp():void{
trace('stop');
}
private function stopVid(event:MouseEvent):void{
vidPlayer.stop();
}
private function pauseVid(event:MouseEvent):void{
vidPlayer.pause();
}
private function playVid(event:MouseEvent):void{
vidPlayer.play();
}
private function setPlayheadTime(event:MouseEvent):void{
vidPlayer.playheadTime = Number(tiPlayheadTime.text);

vidPlayer.pause();
}
]]>
</mx:Script>
<mx:VideoDisplay id="vidPlayer" x="188" y="28"
source="assets/videos/test_video.flv" width="320" height="240"/>
<mx:Button id="btnSeek" x="315" y="334" label="Set Playhead"
click="setPlayheadTime(event)"/>
<mx:TextInput id="tiPlayheadTime" x="283" y="304"/>
<mx:HBox x="188" y="276" width="320" height="22" horizontalAlign="center">
<mx:Button id="btnPlay" label="Play" click="playVid(event)"/>
<mx:Button id="btnPause" label="Pause" click="pauseVid(event)"/>
<mx:Button id="btnStop" label="Stop" click="stopVid(event)"/>
</mx:HBox>
<mx:Label x="188" y="306" text="Jump to Time:" textAlign="right"/>
<mx:Label x="516" y="228" text="Current Playhead Time:"/>
<mx:Text id="txtPlayheadTime" text="{vidPlayer.playheadTime.toFixed(4)}"
x="516" y="247" width="138" height="18"/>

</mx:Application>

Reply With Quote


  #13 (permalink)  
Old 12-01-2008, 06:35 PM
rckehoe
 
Posts: n/a
Diggs:
Default Re: playheadTime issue

I understand perfectly... Thank you for spending time on this!
Reply With Quote
  #14 (permalink)  
Old 12-01-2008, 06:35 PM
rtalton
 
Posts: n/a
Diggs:
Default Re: playheadTime issue

No problem. I needed to test the VideoDisplay control anyway. Never use it, myself!

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:57 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk