FlashVars is a way to pass data or variables from html to a Flash movie. The general idea of FlashVars is very similar to a Query String. Variables passed via FlashVars will go into the _root level of your Flash movie.
You can use ActionScript 3.0 to link from your Flash file to a webpage using the navigateToURL() method.
You can use navigateToURL() method as shown below. (more…)
I’ve listed down below 3 supported video formats that are supported by particular browsers.
Are you using AS3 and wondering how you can validate if the user submits valid email address?
You can use textfield in your Flash banner or site.
The code below checks standard email patters of the string entered by user which has “@” sign and the domain ends with “.net” or “.com” etc. which is normally 3 character long.
Sample code for HTML5 Audio element :
<source src=”audiofile.ogg” type=”audio/ogg” />
<source src=”audiofile.mp3″ type=”audio/mp3″ />
Your browser does not support the audio tag. View in a different browser.
Attributes for audio element :
controls : adds controls to your audio element such as play, volume and pause.
type : specifies type of format for the audio file.
src : source or location of your audio file.
Audio element supports multiple source file for your audio. Note that different browsers support different format for both Audio and Video file formats.
Click here to find out files and format supported by various browsers.
Hope this is helpful. Please write your feedback or comments below if you have any questions. We will get back to you!
HTML5 has the <video> element. It’s a new element which specifies how to embed a video/movie on a web page.
If you use HTML5 for your media elements such as Video and Audio, your site viewers will not required additional plugins such as flash installed and enabled in their browsers.
If you want to embed HTML5 video element into your webpage, I’ve the sample code for you below.
Have you ever thought about Mobile devices? Have you ever thought about why your viewer would download flash plugin to view your flash content? Have you ever thought to serve your content same across multiple browsers? If you are very well aware of all that, then your solution is HTML5!
In the early days of user interactive content, Flash had a very dominant market. Why? Simple, you can create stand-alone element that can be plugged easily in any website using flash. You can create dynamic content as well. You can capture user’s information easily. On the top of all that, you can make it look pretty and user friendly. (more…)
Below is the ActionScript 3.0 code. If you name your button something other than ASClickTagButton you will have to edit this code to change the button name. Also, you should be aware that Flash 10 treats the clickTAG parameter name case sensitively.
Create a new URLRequest object with the url of the file.
Create a new Loader object.
Call the Loader object’s load() method, passing the URLRequest instance as a parameter.
Call the addChild() method on a display object container (such as the main timeline of a Flash document) to add the Loader instance to the display list.
Sample code in ActionScript 3.0 :
var request : URLRequest = new URLRequest(“http://www.yoursite.com/file.swf”);
var loader:Loader = new Loader()
You can load external SWF in movieClip or directly on your flash timeline.