Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home AJAX-with-Flash
 

Implementing Flash Player

 

The improvement of JavaScript and Ajax for the past few years has made it possible for developers to build online applications in the browser. Through JavaScript, developers can implement functions that can emulate operations in a regular installed application.



The improvement of JavaScript and Ajax has even further pushed the idea of cloud computing wherein basic operations can be done online. Instead of a fully installed application, users simply go online and use the application.


But, even though JavaScript has practically done everything to allow creation of online browsers, there are still functions they can't win over. A good example is the video stream wherein Flash has simply dominated in this format. Almost every video sharing website use flash in order to seamlessly stream videos to their users.


It's no surprise then that developers wanted to implement Flash player in their Ajax or JavaScript based application. With Flash player in the application, users will be able to access video files faster because of their familiarity with Flash videos.


One good solution to this problem is to use an API in order to implement Flash player in an online application. There are various APIs for Flash videos that can be used for free online. They are relatively easy to implement but it will require you to connect your data to an API which will be another step before your video is played.


Using SWFObject


On the other hand, there is another option developers can use to properly implement Flash player in the application. Developers can site swfobject.js as a function to implement Flash videos. The advantage of this function is that JavaScript will allow developers to transfer Flash videos right from Dreamweaver. Developers simply add the swfobject.js code and then target the specific file created from Dreamweaver.


Required Arguments


The Flash video will not work without these arguments:


Width and Height - Indicate how tall or how wide the Flash video will be implemented in your application.


SWF and location - Inform the application where to find the file and it's filename.


Required Flash version - Developers have to indicated the version needed to play the video file. This will automatically prompt the user to update in case the browser do not have the compatible version.


Background - Although the background in a Flash video is barely noticeable, it has become a standard requirement to play the file on JavaScript.



Optional Arguments


There are also additional arguments that developers can add in order to fully customize the Flash player in a JavaScript or Ajax based application:


Video Quality - If you don't want your video to be on the default "high" quality, you can set the video in lower quality for faster loading.


detectKey - This argument is highly recommended for developers who want the video to load faster as it will not check the Flash version of the user.


xiRedirectUrl - Provide URLs for users who wanted to update their Flash players. You can provide the direct link to Adobe or another link that has the version you prefer.



Read Next: Cross-Domain Ajax with Flash


 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links