Advertisement

04.01.2008 at 02:45PM PDT, ID: 23287404
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Add Playback Control To Video Object

Tags: ActionScript
We are using AS 2.0 Targeting Flash 8

We are streaming flv's through our swf using a video object like this:

...
var movieName = "likeloans";
var stream_ns:NetStream = new NetStream(nc);
myVideos.attachVideo(stream_ns);
stream_ns.play(movieName);
...

where myVideo is the name assigned to a video object

is it possible to attach a FLVPlayback component to this or do we have to script our player
and if so how do I do that- I was hoping to use ClearOverAll.swf with autohide enabled
but since we moved over to a video object we cannot figure out how to do this
thanks
Start your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: ivmedia
Solution Provided By: Jakob_E
Participating Experts: 1
Solution Grade: B
Views: 35
Translate:
Loading Advertisement...
04.02.2008 at 05:10AM PDT, ID: 21262127

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.02.2008 at 07:33AM PDT, ID: 21263442

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.02.2008 at 02:01PM PDT, ID: 21267489

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.02.2008 at 03:14PM PDT, ID: 21268098

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.02.2008 at 10:25PM PDT, ID: 21269866

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
04.02.2008 at 05:10AM PDT, ID: 21262127

Rank: Master

Try this:

1) Open your flash file and drag the FLVPlayback component onto the stage
2) Select the component and click the parameters tab
3) Select the ClearOverAll.swf skin
4) Publish the movie
... you'll see the ClearOverAll.swf has been created in the folder together with your movie.

5) Select the FLVPlayback component on the stage and hit Delete to remove it
6) Since the component is still in your library you can now access it using script

    var fp:MovieClip=this.attachMovie('FLVPlayback','fp',this.getNextHighestDepth());
    fp.skin='ClearOverAll.swf';
    fp.skinAutoHide=true;
    fp.contentPath='myMovie.flv';


~Jakob E


 
04.02.2008 at 07:33AM PDT, ID: 21263442
I am very hopeful that this will work
but I must need to do some thing different
here is what I have

you can see I am commenting out the contentPath because I am already connecting the stream to the video object

how should I proceed?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
nc = new NetConnection();
nc.connect("rtmp://oeo2kogrq1.rtmphost.com/test2/");
var stream_ns:NetStream = new NetStream(nc);
myVideos.attachVideo(stream_ns);
 
var fp:MovieClip=this.attachMovie('FLVPlayback','fp',this.getNextHighestDepth());
fp.skin='ClearOverAll.swf';
fp.skinAutoHide=true;
//fp.contentPath='myMovie.flv';
 
stream_ns.play(movieName);
Open in New Window
 
04.02.2008 at 02:01PM PDT, ID: 21267489

Rank: Master

Hi,

Since I've no access to a FMS server (nor ever worked with one) this is in no way tested....
First I don't think you need the NetConnection at all (It should be a part of the FLVPlayback)  

    var fp:MovieClip=this.attachMovie('FLVPlayback','fp',this.getNextHighestDepth());
    fp.skin='ClearOverAll.swf';
    fp.skinAutoHide=true;
    fp.isLive=true;
    fp.contentPath=rtmp://oeo2kogrq1.rtmphost.com/test2/'YourMovieName.flv';

If this doesn't work try reading this: http://www.adobe.com/devnet/flash/articles/video_player_print.html
I know it's a bit of a best-guess-lottery-ticket-adviced but I hope some of it pays out (let me know if it does).

~ Jakob E

Ps. Note the main.asc (in case it isn't already on your server )

 
04.02.2008 at 03:14PM PDT, ID: 21268098
That might be a solution
but it basically stops using the video object and the netsream
and I require the functionality of those

for instance

stream_ns.onStatus

provides me with a lot of info that I need

and this is not available through the flvplayback control as far as I can tell

so I am still looking for a way

I appreciate your efforts though
 
04.02.2008 at 10:25PM PDT, ID: 21269866

Rank: Master


I belive you can get the info you want using event listeners (see code snippet below).


... And I also found this in the help docs:

" If you use a FMS to stream FLV files to the FLVPlayback component, you must add the main.asc file to your Flash Media Server FLV application. You can find the main.asc file in the samples available online at www.adobe.com/go/learn_fl_samples.

1) Create a folder in your FMS application folder, and give it a name such as my_application.
2) Copy the main.asc file into the my_application folder.
3) Create a folder named streams in the my_application folder.
4) Create a folder named _definst_ inside the streams folder.
5) Place your FLV files in the _definst_ folder.

To access your FLV files on the Flash Media Server, use a URL such as rtmp://my_servername/my_application/stream.flv.

For more information on administering the Flash Media Server, including how to set up a live stream, see the documentation at www.adobe.com/support/documentation/en/flashcom/. When playing a live stream with FMS, you need to set the FLVPlayback property isLive to true. For more information, see FLVPlayback.isLive."

~ Jakob E



 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
  // Imports
  import mx.utils.Delegate
 
      // The usual suspect ;)
  var fp:MovieClip=this.attachMovie('FLVPlayback','fp',this.getNextHighestDepth());
      fp.skin='ClearOverAll.swf';
      fp.skinAutoHide=true;
      fp.isLive=true;
      fp.contentPath=rtmp://oeo2kogrq1.rtmphost.com/test2/'YourMovieName.flv';      
 
      // Add event listeners to watch flv state, metadata etc. 
      fp.addEventListener("metadataReceived",Delegate.create(this,onFlvMetaData))
      fp.addEventListener("stateChange",Delegate.create(this,stateChange))
      fp.addEventListener("playheadUpdate",Delegate.create(this,playheadUpdate))      
 
 
      // You can also access the video inside the FLVPlayback
      // I use it mostly for smoothing flv
  var vp:MovieClip=fp.getVideoPlayer(fp.activeVideoPlayerIndex)._video
      vp.smoothing=true;
 
      
  function onFlvMetaData(evtObj:Object){ 
     // Trace metadata 
     trace('\n\nMetaData\n_____________________________')
     for(var i in evtObj.info)trace(i + ': '+evtObj.info[i])
     trace('\n... or use the fp.metadata\n')
     for(var i in fp.metadata)trace(i + ': '+fp.metadata[i])        
        
     // Using metadata
     fp.setSize(fp.metadata.width,fp.metadata.height)
  }
      
  function stateChange(evtObj:Object){
     // Trace state change
     trace('\n\nState Change\n_____________________________')
     for(var i in evtObj)trace(i + ': '+evtObj[i])
     trace('\n... or use the fp.state and fp.playheadTime\n')
     trace('fp.state       : '+fp.state)
     trace('fp.playheadTime: '+fp.playheadTime)        
  }
      
  function playheadUpdate(evtObj:Object){
     // Trace playhead update
     // I think the update follows the framerate
     // of the flv (fp.metadata.framerate)
     trace('\n\nPlayhead Update\n_____________________________')
     for(var i in evtObj)trace(i + ': '+evtObj[i])
     trace('\n... or use the fp.state and fp.playheadTime\n')        
     trace('fp.state       : '+fp.state)
     trace('fp.playheadTime: '+fp.playheadTime)        
       
     // Use playheadTime 
     if(fp.playheadTime>5)fp.stop()
   }
Open in New Window
Accepted Solution
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628