Innovative Tech Consulting

Contact UsView Openings

Flash AS3 Tutorial – FlashVars – What is flashvars?

flash-logoWhat is FlashVars?

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.

  • The data to be passed is fairly simple. Which could be simple text (such as user name, filename, cookie value or user id).
  • You should not implement Flashvars for sensitive or private data.  Anyone can easily see the content of the FlashVars by page view-source.  Something like a password or SSN should NEVER be passed via FlashVars.
  • FlashVars file size limit is 64K. (more…)

Flash AS3 Tutorial : How to link flash file to external webpages using AS3

flash-logoThis article will explain how you can link your button in your Flash file to external webpages. It will take the user to external webpages when user clicks the button in your flash content.

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…)

HTML5 – Video and Audio File formats and browser support

HTML5-logoBy now we have learned about HTML5 Video and Audio elements. As we discussed in our earlier articles, different browsers support different formats for audio and video files.

I’ve listed down below 3 supported video formats that are supported by particular browsers.

  (more…)

Flash AS3 Tutorial: Validate email address in AS3

Flash AS3 Tutorial: Validate email address in AS3

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.

You can simply use the following function in AS3 to validate user email addresses, and call in your flash project or banner. This is similar ActionScript code that you normally do in JavaScript within your browser, if you don’t have flash content for your form.
(more…)

CSS3 – Interview Questions

1. What is the difference between CSS and CSS3 ?

CSS is used to control the style and layout of Web pages CSS3 is the latest standard for CSS. Whereas CSS3 is split up into “modules”.
The old specification has been split into smaller pieces, and new ones are also added.
Some of the most important CSS3 modules are:
Selectors
Box Model

(more…)

HTML5 Audio element

HTML5-logoHTML5 has an “audio” element. You can play directly audio content in your web page. I’ve sample code for you below.

Sample code for HTML5 Audio element :

<audio controls=”controls”>

<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.

</audio>

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 Video

Until now, all video elements on a web pages were displayed using plugins, such as Flash.

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.
(more…)

Flash versus HTML5

Flash versus HTML5

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…)

Flash – AS3 : How to insert ClickTag in Flash ActionScript 3.0 and ActionScript 2.0

flash-logoYou can write ClickTag in both ActionScript 3.0 (AS3) and ActionScript 2.0 (AS2).

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.
(more…)

Flash – AS3 : How to load external SWF file into a Parent SWF file in ActionScript 3.0 (AS3)?

flash-logoSWF files are loaded using the Loader class. To load an external SWF file, you can follow the steps below.

     

  1. Create a new URLRequest object with the url of the file.

  2. Create a new Loader object.

  3. Call the Loader object’s load() method, passing the URLRequest instance as a parameter.

  4. 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()
loader.load(request);
addChild(loader);

You can load external SWF in movieClip or directly on your flash timeline.