Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Working with Images, Sound, and Video > About using FLV video > Creating a video banner | |||
Video content within banners and other Flash advertisements is often used for advertising, such as showing Flash movie previews or television advertisements. The following example shows how you might create a video instance and add ActionScript in a FLA file to create a banner advertisement that contains video.
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.setBufferTime(5);
my_ns.play("http://www.helpexamples.com/flash/video/vbanner.flv");
The size of the rectangle does not matter because you'll resize it by using the Property inspector.
The rectangle is currently on the first Up frame of the button you created. This is the Up state of the button--what users see when the button is on the Stage. However, you want the button to not be visible on the Stage, so you need to move the rectangle to the Hit frame, which is the hit area of the button (the active region that a user can click to activate the button's actions).
You can now click in the entire banner area, but there is no visual appearance of the button on your banner.
A teal rectangle appears over the banner area, representing the invisible button's hit area.
inv_btn.onRelease = function(){
getURL("http://www.adobe.com");
};
In this example, you created a banner and resized its dimensions to the established, standardized dimensions that the Interactive Advertising Bureau specifies. For information on standard advertising dimensions (and many other useful guidelines), see the Interactive Advertising Bureau's Standards and Guidelines page at www.iab.net/standards/adunits.asp.
Despite standardized guidelines, ensure that you confirm the advertising guidelines for the advertising service, client, or website that you're advertising with first. If you submit your banner to an advertising company, make sure the file meets a specified file size, dimension, target Flash Player version, and frame-rate guideline. Also, you might have to consider rules about the kinds of media you can use, button code you use in the FLA file, and so on.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001035.html