A Better Way to Build Flash Banners

A Better Way to Build Flash Banners

Tutorial Details
  • Difficulty: Intermediate
  • Program: Flash CS4, Photoshop, HTML Editor
  • Estimated Completion Time: 60 minutes

Flash banner development is often plagued by multiple files, fragmented code and messy timelines. This tutorial will show you how you can create a project template to serve as a solid base which will help you develop robust flash banners quickly, freeing you up to focus on bringing the creative idea to life.


Step 1: Setting Up Project Folder Structure

When building multiple flash banners, good file management is essential to keep your workflow efficient. Start your banner project template by creating the folder structure shown below:

Step 1

Step 2: Creating A Photoshop Template

Now we are going to create a set of Photoshop templates to use when starting to design a flash banner campaign. (If you don’t have Photoshop don’t worry, you can skip ahead to Step 5). The Interactive Advertising Bureau maintain Ad Unit Guidelines that list the common dimensions of ad units (banners). For the purposes of this tutorial, we’re going to create the three most common:

  • The Wide Skyscraper (160px wide x 600px tall)
  • The Medium Rectangle (300px wide x 250px tall)
  • The Leaderboard (728px x 90px tall)

Let’s start by creating the template for The Wide Skyscraper. Open Photoshop and select File > New. Configure the properties for your new Photoshop document as shown below:

Step 2

Step 3: Adding Layer Groups

To keep the layers in your Photoshop file as structured as your project folders when it’s time to produce a banner design, we’re going to add Layer Groups in the template file to hold core design elements.

Using New Group from the menu in the top-right corner of the Layers panel create the Layer Group structure shown below:

Step 3

The ‘Background’ layer group will hold design elements that are in the background of your banner at all times, for example a color or a texture.

The ‘Foreground’ layer group will hold design elements that are in the foreground of your banner at all times, such as a company logo.

The ‘Frame’ layer groups will hold design elements of the key moments in your flash banner sequence or interaction. This could include key messages, critical points of an animation, or user interfaces.


Step 4: Save

Now your template is ready to save. Go to File > Save As and navigate to the ‘design’ folder in your project folder structure. Name the file according to its dimensions, in this case ’160×600′ and ensure it’s in Photoshop format, with Layers checked.

Step 4

That’s your first fantastic flash banner template created! Repeat these steps for The Medium Rectangle (300px wide x 250px tall) and The Leaderboard (728px x 90px tall). With these Photoshop templates completed, we’re ready to move into Flash.


Step 5: Creating Your Flash Project

Let’s start by creating a Flash Project so you can navigate your file structure in the Flash IDE. Open Flash CS4 (the process is very similar in Flash CS3 although the Flash interface will differ) and go to Window > Other Panels > Project. In the Project panel, click on the Projects dropdown and select New Project. Specify the Project name as ‘BannerTemplate’.

For the Root Folder, navigate to the /banner_template/development/ folder you created in Step 1 using the folder icon. Make sure the ActionScript version is set to ActionScript 3.0 and click Create Project.


Step 6: Flash Project Classes Folder

Now we are going to set the Flash Project properties to help Flash do the work of stubbing out our classes for us. Click the dropdown with the gear icon in the top right corner of the Project panel and select Project Properties. For the ‘Save classes in’ field, navigate to the /as/ folder you created in Step 1 and click OK.


Step 7: Banner Package Folder

If you performed the last step correctly, you should see little code brackets are now on your /as/ folder icon. We are now going to create a folder for all classes specific to our banner templates. Select the /as/ folder and click the new folder icon in the bottom of the panel. In the dialog box that appears name your folder ‘banner’ and click OK.


Step 8: Banner Base Document Class

Now (at last!) you are ready to create your banner base document class. If you’re not familiar with using document classes (or classes in general), it’s a good idea to read this quick tip first.

With the /as/banner/ folder selected, click the Create Class icon in the bottom of the panel. In the Class field add the class name ‘Banner’ after the package name ‘banner.’ and click Create Class.

Now we need to take this class stub and modify it to a functional base document class. Add to the ActionScript to reflect the code shown below:

package banner {
	
	import flash.display.MovieClip;
	
	public class Banner extends MovieClip {
		
		// Constants:
		
		// Public Properties:
		
		// Private Properties:
		private var config:Object;
	
		// Initialization:
		public function Banner(config:Object = null):void {
		}
	
		// Public Methods:
		public function init():void {
			trace("Banner class initialized");
		}
		
		// Protected Methods:
	}
	
}

Let’s quickly cover the changes we’ve made to the Banner class:

  • Imported the MovieClip class.
  • Made the class Banner extend MovieClip (so it can be used as a document class).
  • Made the Banner document initialization function receive an optional config Object that we can use to pass in parameters.
  • Created a public init() function that outputs a trace when called. The reason why this is handy will be explained when we start to create the banner .FLAs.

Right now this isn’t doing much, but the important thing here is to build a class structure that allows us to centralize banner logic, reducing code repetition. From here, we can now extend the Banner class to create our individual banner document classes.


Step 9: Banner Document Classes

Let’s start with the class file for The Wide Skyscraper. Create a “WideSkyscraper” class in your Flash project /as/banner/ folder just as you did for the “Banner” class. Take the generated class stub code and add to it so it looks like this:

package banner {
	
	public class WideSkyscraper extends Banner {
		
		// Constants:
		// Public Properties:
		// Private Properties:
		private var config:Object;
	
		// Initialization:
		public function WideSkyscraper() {
			super();
		}

		// Public Methods:
		public override function init():void {
			trace("WideSkyscraper class initialized");
			super.init();
		}
		
		// Protected Methods:
	}
	
}

Let’s go over the changes we’ve made to the WideSkyscraper class:

  • Made the WideSkyscraper class extend Banner.
  • Called the base Banner class document function with super() in the WideSkyscraper document function.
  • Overridden the base Banner class init() function with a custom init() function that outputs a trace when called, then calls the Banner class init() function.

Now repeat this step to create the banner document classes for the MediumRectangle and the Leaderboard. With this done, our document class structure is now in place.


Step 10: Creating Your Banner .FLAs

Now we can start to create the .FLA files we need. Again, let’s start by creating the template for The Wide Skyscraper (160×600).

Open Flash CS4 and select File > New. Select “Flash File (ActionScript 3.0)” as the Type and click OK. In the Properties panel, edit the Publish and Properties settings as shown below:

Now save your file as “160×600.fla” in the /development/ folder of your project.


Step 11: Setting A Relative Source Path

We’re now going to set a relative source path and a relative publish path. This becomes important when you want to make a copy of your banner template project, rename it and start working, or when you want to give the template to someone else. Absolute paths can be a real pain to update (especially across multiple files!) every time you want to start a project.

To set the source path go to File > Publish Settings and click the Flash tab. Now click the Settings button beside the Script dropdown to open the Advanced ActionScript 3.0 Settings window. Make sure Source Path is the active tab and click the ‘+’ to add the ‘./as’ path. Now you can add the text ‘banner.WideSkyscraper’ in the Document Class field. Your window should look like this:

Click OK and your document is now linked to the WideSkyscraper class you created in Step 9.


Step 12: Setting A Relative Publish Path

To set the publish path, go to File > Publish Settings and click the Formats tab. We don’t need the HTML file, so uncheck this box. In the publish path for the SWF, target the /www/ folder in your project folder as shown below. If everything looks correct, click OK. Your compiled swf will now be put in the /www/ folder when you preview or publish it.

There’s a little more info on this in this Quick Tip screencast.


Step 13: The Main Timeline

For some reason, some ad serving systems require the first frame of your movie to be blank (Eyeblaster is an example of this), or to import their classes/include their ActionScript on the first frame. Often the Flash extensions you can install for these ad serving systems will refuse to package your file if you don’t comply with this stipulation.

This is where the init() function you created in your document class earlier comes in. To ensure our template can be used in this situation, we are going to create a two frame timeline with the first frame blank, the second one containing a stop action and a call to the init() function as shown below:

If you compile this file now you should get the following in your Output panel which confirms your WideSkyscraper document class and Banner base document class are working:

WideSkyscraper class initialized
Banner class initialized

Step 14: Creating A Library Symbol Class

Now we’re going to create a library symbol to hold the banner creative, whether it’s an animation or an interface. Go to Insert > New Symbol and give it the name “creative”, check Export for ActionScript and give it the class “Creative”. Make sure the type is Movie Clip and click OK.

Now add some placeholder text on the stage as shown below so you can see something when you add it to your stage in code later:

And that’s all we need from the .FLA file! Go ahead and create the other .FLAs for The Medium Rectangle (300 wide x 250 tall) and The Leaderboard (728 wide x 90 tall). With this in place, we can revisit our Banner document class and start adding core functionality across all these banners.


Step 15: Adding A Background Sprite

Nearly all banner guidelines advise you to place a solid background color in your Flash file as the Stage background color can be overwritten when the Flash object is embedded in an HTML page. Rather than going into every .FLA and drawing a shape on the stage, we can centralize this task in code. Open up your Banner class and update the file to reflect the code shown below:

package banner {
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.display.Graphics;
	
	public class Banner extends MovieClip {
		
		// Constants:
		private const BG_COLOR:Number = 0x0E0E0E;
		
		// Public Properties:
		
		// Private Properties:
		private var config:Object;
	
		// Initialization:
		public function Banner(config:Object = null):void {
		}
	
		// Public Methods:
		public function init():void {
			trace("Banner class initialized");
			
			// Create background
			var bg:Sprite = new Sprite();
			bg.graphics.beginFill(BG_COLOR);
			bg.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
			bg.graphics.endFill();
			addChild(bg);
		}
		
		// Protected Methods:
	}
	
}

Let’s recap the modifications we’ve made to the Banner class:

  • Imported the Sprite and Graphics classes.
  • Added a constant BG_COLOR and assigned to it a hexadecimal value.
  • Created a bg sprite and drawn a rectangle with a fill of BG_COLOR that covers our whole stage.
  • Added bg to the display list.

Now all you need to do is change the BG_COLOR value to get the right color background in all your banners.


Step 16: Adding to the Display List

Now we need to add the Creative symbol that we created in Step 14 to the display list as this will be the container for the creative execution. This is really easy to do, just update the init() function to this:

// Public Methods:
public function init():void {
	trace("Banner class initialized");
	
	// Create background
	var bg:Sprite = new Sprite();
	bg.graphics.beginFill(BG_COLOR);
	bg.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
	bg.graphics.endFill();
	addChild(bg);
	
	// Add Creative
	var creative:Creative = new Creative();
	addChild(creative);
}

Step 17: Adding A Clickable Area

Another common requirement is for the banner’s clickable area to open a new window based on a “clicktag” variable passed in from the HTML page when the Flash object is embedded. Let’s create a utility class to handle this for us. In the Flash Project panel navigate to your /as/banner/ folder and create a new subfolder called /util/. Create a new class in here called ‘ClickArea’ and code this as shown below:

package banner.util {
	
	import flash.display.Sprite;
	import flash.display.Graphics;
	import flash.display.Stage;
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	public class ClickArea extends Sprite {
		
		// Private Properties:
		private var clickthroughURL:String;
	
		// Initialization:
		public function ClickArea(loaderInfo:Object,stage:Stage) {
			
			// Create clickable area
			this.graphics.beginFill(0x00FF00,0);
			this.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
			this.graphics.endFill();
			
			// Determine clickthrough URL (by checking known naming conventions)
			if(loaderInfo.parameters.clicktag != null) {
				clickthroughURL = loaderInfo.parameters.clicktag;
			} else if(loaderInfo.parameters.clickTag != null) {
				clickthroughURL = loaderInfo.parameters.clickTag;
			} else if(loaderInfo.parameters.clickTAG != null) {
				clickthroughURL = loaderInfo.parameters.clickTAG;
			}
			
			// Add button behaviour
			this.buttonMode = true;
			this.addEventListener(MouseEvent.CLICK, mouseClickHandler, false, 0, true);
		}
	
		// Public Methods:
		
		// Protected Methods:
		private function mouseClickHandler(e:MouseEvent):void {
			if(clickthroughURL != null) {
				navigateToURL(new URLRequest(clickthroughURL),"_blank");
			} else {
				trace("Clickthrough");
			}
		}
	}
	
}

Let’s quickly summarize what the ClickArea class is doing:

  • Imports the necessary Flash classes.
  • Is based on the Sprite class.
  • ClickArea’s constructor function requires two variables, the loaderInfo Object and the Stage. We will pass these in from our Banner document class.
  • Draws a transparent clickable area the width and height of the stage.
  • Attempts to get a clickthrough url out of the loaderInfo object and assign it to the clickthroughURL variable.
  • Adds behavior on mouse click that launches a clickthroughURL in a new window or outputs a trace if no URL is available. This is handy when testing in the Flash IDE.

Now open up your Banner class again and add import banner.util.ClickArea under your list of Flash class imports and update the init() function to instantiate the ClickArea and add it to the display list as shown below:

// Public Methods:
public function init():void {
	trace("Banner class initialized");
	
	// Create background
	var bg:Sprite = new Sprite();
	bg.graphics.beginFill(BG_COLOR);
	bg.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
	bg.graphics.endFill();
	addChild(bg);
	
	// Add Creative
	var creative:Creative = new Creative();
	addChild(creative);
	
	// Create clickable area
	var clickArea:ClickArea = new ClickArea(loaderInfo,stage);
	addChild(clickArea);
}

We’re adding the basic fundamentals of banner development into this class, but the real value here is that we are adding these to all our banners in one centralized class. Any common tasks you find yourself doing repeatedly in banners can be added in here to free up your time to craft the unique animation or interaction the banner creative has.


Step 18: Publishing Your .FLAs

With all of our code nicely organized, opening the individual .FLAs and publishing them is starting to feel like a hassle. The good news is, we can automate this as well. Go to your Project panel and check the tickbox beside each banner .FLA format (if you can’t see them in this list, click on the dropdown with the Gear icon and select Refresh) as shown below:

Now you can publish all of your banners to the /www/ folder you configured in Step 12 by clicking on the dropdown with the Gear icon and selecting Publish Project.


Step 19: HTML Presentation Page

The last element we need to complete to finish our banner project template is creating an HTML page to present them on so they can be shown to a client easily. Download SWFObject and place swfobject.js in the /www/ folder, then create a HTML file in the editor of your choice and write the code shown below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Banner Signoff Template</title>
	<style type="text/css" media="screen">
		body { padding:60px; }
		.banner { padding:0 40px 40px 0; float:left; display:block; }
	</style>
	<script src="swfobject.js" type="text/javascript"></script>
	<script type="text/javascript">
		var flashvars = { clickTag: "http://www.hornergraphic.com/" }
		swfobject.embedSWF("160x600.swf", "wide_skyscraper", "160", "600", "9", false, flashvars);
		swfobject.embedSWF("300x250.swf", "showcase", "300", "250", "9", false, flashvars);
		swfobject.embedSWF("728x90.swf", "leaderboard", "728", "90", "9", false, flashvars);
	</script>
</head>
<body>
	<div class="banner"><div id="wide_skyscraper"></div></div>
	<div class="banner"><div id="showcase"></div></div>
	<div class="banner"><div id="leaderboard"></div></div>
</body>
</html>

You can read more about how to use SWFObject in the online documentation, but let’s quickly cover the key things we’re doing here:

  • Declaring two css styles to create some space around the page and the individual banners.
  • Including swfobject.js, creating a test clickTag to pass in to our banners and writing the swfobject embed statements.
  • Defining a div structure and assigning a unique id to a div for SWFObject to dynamically replace with our SWF file.

Now save this file as index.html in the /www/ folder. You can now preview your banners in a web browser or upload this folder somewhere for your client to view:


Step 20: Review Your Project File Structure

Let’s finish by reviewing our populated folder structure and ensuring all files are in the appropriate place:

You now have a project template with:

  • A set of Photoshop templates to produce the artwork in.
  • A set of Flash templates to import library assets into and create timeline animations in.
  • A document class structure that allows you to implement functionality in one or all banner formats.
  • A way to compile all of your banners at once.
  • An HTML page to view all the banners together for yourself and your client.

Conclusion

This tutorial is really only the start. Identify recurring tasks in your banner projects and tailoring your project template to address them to make it speed up your workflow as much as possible. Extend upon it by including your favorite lightweight frameworks (TweenNano is great for scripted animation) and libraries so your favorite tools are at your fingertips when you start your next project.

If you use Subversion or some other kind of source control, this would be a great project to include in your repository so you can improve on it over time and check out the latest revision for each banner project you start.

Got ideas about how this could be improved or comments about issues that hamper your banner development? Join in the discussion below!

  • http://www.juxt2.com Dimitree

    I didn’t know that you need to use object oriented methods to build a banner ad…
    IMHO is more time consuming to use written code instead of timeline to create a banner.
    For the sake of evolution and for educational reasons (I love Object Oriented programming) I will try your method.

    • http://www.hornergraphic.com/ Stephen Horner
      Author

      It’s true, you don’t need to use OOP to build banners. In certain instances this approach might be ‘best practice’ overkill!

      But as you say, it has educational value. The opportunity it creates for flash developers currently doing banner work is the chance to grow their skills and learn file structure and programming practices that they can scale up to a website or application build.

  • http://www.codeculture.de codeculture

    Great Post, I was searching for that. Thanks!

    • http://www.hornergraphic.com/ Stephen Horner
      Author

      Thank you for reading! ;)

  • Felipe

    very nice but there are a couple of issues there:

    (regular media buys are 30k, so….)

    1. most media companies will ask for player 8 unless is a rich media banner
    (this is changing slowly to flash 9)
    2. Doing OOP means bringing more classes which increases K size
    3. your banner as it is With TweenNano is 5099 B
    4. AS2, flash player 8, no OOP with TweenNano is 2468 B

    no saying that this method is bad but when it comes to banners, K size is way more important than making your code look nice and neat with OOP. So, unless i have a generous K size limit i wouldn’t do this.

    • Daniel Apt

      Agreed, nevertheless this is a good approach, but I think this would work better for larger projects, instead of banners (which tend to be fairly simple).

    • André

      Wow, doing it in AS2 got only 2468 with TweenNano?
      If you go to the TweenNano home page you will see that compressed it represents 2kb in AS2, it´s here: http://www.greensock.com/tweennano/ in the top of the site… so i think that the method you´ve used is shorter tham his methor, to say the truth i think it´s too much code for a simple banner in this tutorial…

      2. Doing OOP doesnt means more classes or more kb, it means a very better habit, but if you use a lot of class it will really increase the filesize, the point that made it bigger is that he created a pattern to extend whenever you create a new banner, so it´s much faster when you create another banner latter. If you try to do exactly the same thing he did in AS2 i am sure you will get a bigger file.

      PS: The performance of the AS3.0 is much bigger tham the AS2.0, in a simple banner maybe we cant see, but for much bigger applications sure everbody feels the difference…

    • http://www.hornergraphic.com/ Stephen Horner
      Author

      It’s valid point that every kilobyte counts when you develop banners! The main reason this approach works in my workplace (an advertising agency) is that client and creative changes will often be made up to (or after!) the time files are dispatched to media.

      Trading off a couple of kilobytes for the ability to quickly effect changes across multiple banner sizes is worthwhile for us in these time pressure situations.

  • vdubplate

    Sweet. Should expand on this idea and do a tutorial on how to set up a rich media ad.

  • Jack

    This is sort of useless because

    1. Most add networks can only run AS2 code.

    2. Most banner monkeys dont know much ActionScript and youll get a lot of complaints because other people cant work with your code (timeline coders)

    • André

      Sorry, but i have to disagree with you…

      First of all the ad networks only stores the .swf file, who will run is the flash player wich is installed into the user´s machine, and most users (more tham 90%) are using now flash player 10.0 or above, wich has support to AS3.0… See here: http://www.adobe.com/products/player_census/flashplayer/version_penetration.html

      About the actionscript codes, the use of external .as instead of timeline is a question of good habit, but both works as well, but the better of using external files is extending the Sprite instead of MovieClip, wich is much heavyer, but using external .as files these codes are incorporated in the final .swf file, so it wont have any difference in the runtime…

      • http://posterous.anatomicdesign.co.uk Ian Thomas

        From experience I’ve not been able to use AS3.0 in any banner ad project to date because all the Ad networks specifically ask for Flash Player 8, AS2 banners. We’ve had them rejected before for not matching up to this expectation.

        I think the project workflow is nice though, keeping track of lots of files for the different sizes is always a pain and having the ability to publish them all at once is very good. I had been wondering if this was something that could be achieved using ANT but haven’t had a chance to look into it properly yet.

        As someone said above, though not really the best case to showcase OO and AS3.0 best practice, it is nevertheless really important that people get into good habits and articles like this are great for encouraging it.

      • Rich

        Unfortunately, this isn’t correct. I haven’t really done much work with banners, but when I have as2 has always been a requirement. This is to do with the company that serves the banners and nothing to do with player penetration statistics.

        I’m all for design patterns and OOP, but in my opinion the benefits in this case won’t really be felt. Using an OOP approach will increase file size, if you are actually coding to true OOP practices at least, because one of the key principles of OOP is that a class should have a single responsibility. Whilst this is an excellent practice to follow it will obviously increase file size – not enough for it to be a problem for most applications, but in this case size is of utmost importance.

      • André

        They dont need to ask for AS2.0 since the .swf isnt a server-side file but a client side file… i´ve never seen an ad netword asking for a specific actionscript version… but if you say…

      • Rich

        Obviously a swf isn’t a server side file, but it’s still been a requirement from any ad networks I have dealt with. I’d assume it would be to do with the virtual machine the banner container runs in. If they use as2 then any interaction with the banner itself is more difficult if it is coded in as3, plus running both AVM1 and AVM2 has performance implications. However, it’s been a while since I’ve had to produce any banners and from what others are saying this might now be changing.

        Even if you do have to use as2 you could still use OOP( PureMVC has an as2 implementation), but I still fail to see the point of this for the vast majority of banners.

      • André

        Ohh, now you said something that makes much sense, and now i really have to agree with you, if the banner runs inside a content in AS2, it really wont work as3 files… Sorry about it, it´s that i didnt get any ad network that runs the content inside another swf file, but i know that exists…

    • http://www.hornergraphic.com/ Stephen Horner
      Author

      Ad serving network support for Actionscript 3.0 and Flash Player 9+ has improved dramatically in my experience with Eyeblaster and DoubleClick now providing full AS3 support. I agree there are still cases (Atlas being one) where ActionScript 2.0 is still a frustrating constraint but the move to AS3 continues and this should cease to be an issue in the near future.

  • http://michaelposso.com michael

    I totally agree with Jack and Felipe. My take on banner ads is a more creative than technical since the projects are very simple. I rely on my creativity to produce an engaging and beautiful banner ad that can engage the client and the users. Now, with all the hype about HTML5 and iAds, I guess the issues does become a more technically correct problem since the Ad will rely only on hard coded code in order to work.

    hopefully, there will be some tool similar to the flash time line that will export ads in HTML5. Anyway, this is not happening anytime soon.

    • http://hornergraphic.com/ Stephen
      Author

      This is a belated (like, months belated!) reply but ironically this was posted on April 11 2010. Flash CS5 is capable of exporting to the HTML5 Canvas code, as to how well I don’t know. Article here: http://rww.to/bblaoc

  • Pingback: A Better Way to Build Flash Banners | Activetuts+ Terms

  • Joao Aliano

    Ad networks and medias will most of the time throw in a spec sheet for your banner. From my experience working in ad agency in Brazil and producing many many polite banners, the norm in 20K for a full size banner (468×60), AS2, Flash Player 7.

    What I’d love to see here is material on rich media banners, like the stuff from eyeblaster.com
    http://creativezone.eyeblaster.com

  • Pingback: A Better Way to Build Flash Banners  | WarrensWork.com

  • Pingback: Best of Tuts – April - Programming Blog

  • Jairo

    Hi, I like the way you explained this, good tips and easy to follow for a beginner like me. could you refer me to a tutorial on how to create the actual banner so I can apply this tutorial too please, Thanks.

  • Pingback: Best of Tuts+ – April - Programming Blog

  • http://spotdex.com Davidmoreen

    I am not much of a Flash guy, but those banners look really cool!

  • Pingback: Best of Tuts+ – April | Synergy Webdesign

  • http://nick-brewer.com Nick

    Great post, agree with some of the others, it may be more educational than practical due to some of the restrictions in place by Ad Networks.

    Many of times I am having to create 100+ Ads in a 2 week window. I just finished this past week up with the latest round. Fun. This time was much easier than the previous from just making little efficiencies here and there.

    All my animation is done in AS2 rather than via timeline, using TweenLite. All the animation was the same or similar across all the ads, just different creative. So I setup the file to where I could drop each creative image or item into it’s final position, and use AS2 to sort of rewind the animation based on it’s final frame. So that all I had to do was drag and drop the creative into it’s final position and let the AS2 do the rest. Rather than custom animating/coding each Ad.

    I want to do something similar to what the Article describes. But with such limitations in Kilobytes to work with it’s really difficult to have a quality Ad that does anything interesting.

  • Chris

    i’m looking for a site that will show me how to produce agency-level Flash banner and homepage canvas work. does anything exist out there like http://psdtuts.com/ but for Flash FLAs?

    Can anyone help

    Please

  • pixel

    I’m a newbie to this I got everything working how do I add my PSD to the stage now ?
    all I see is the creative MC I made, is there another tutorial that explains that ?

    Cheers

  • Pingback: Boost Your Skills: 20 Awesome Flash Tutorials | [Re]Encoded.com

  • Pingback: Best of Tuts – April | Best Web Magazine

  • Pingback: Daily Digest September 10th

  • http://www.flashbanners.be Flashbanners

    Checkout some flash banner example’s here: http:/www.flashbanners.be

  • jim

    Piece of crap tut.

    Thanks for having me spend two hours to get to the bottom of the tutorial and with no banner completed and a bunch of crap files.

    • http://www.hornergraphic.com Stephen
      Author

      Hi Jim,

      Sorry that this tutorial wasn’t so helpful for you, this was my first attempt at writing a tutorial for Flash development. ;) If you could describe the problems you had I would be happy to help clarify anything for you, I know how frustrating it can be when things don’t work how you’d expect!

  • http://www.bannerflash.ro dan

    thank you Stephen Horner for excelent tuts, it’s realy nice doing this, it will save mutch time for us, but not for the gay how will try to insert some specifical parteners code, if you hate someone, this is the moment for a new banner :D

  • Pingback: 35 tutoriales de alto nivel para Actionscript | CyberHades

  • MaRmAR

    No offence, but this is practically unusable way of creating banners. I’ve been creating banners for 2,5 years (~1270 SWF banners so far). There is pretty big portfolio of their sizes, from completely unusable 530x20px or 100x100px to enormous sizes like 1000x400px or even HD version 1280x720px(!). So maintaining consistent file+dir structure while creating e.g. 15 sizes of the same banner in let’s say 2 hours is insane and time-consuming.
    But overall it’s pretty nice tutorial. ;)

  • http://www.hjfugygh.com Cyndy Balkin

    You completed some nice points there. I did a search on the subject and found mainly people will go along with with your blog.

  • http://www.caberman.com Craig

    Great tutorial. I am really new to making flash banners and this is great for me to get into using as3. I would love to see an even more complete tutorial. Like a simple banner expanding on this so I end up having a complete banner made when I am done.

    I am not sure where to add the transition classes or how to get more elements on the page.

    Thanks for all your hard work!

  • Pingback: » AS 3 – banner templateDrPunchBlog

  • http://www.hotbeatstore.com Marcel

    Isn’t very time consuming, doing it this way? You can learn from it, though.

  • Miguel

    What about this tool ?

    http://bannersnack.com …. I think is the most easiest way you can use to create ads.

  • http://haungo.net HaunGO

    The biggest gripe I’ve got is having to publish at Flash Player 8 with AS2, on account of client specs.. Yuk!

    This is a related discussion, and supposedly has a resolution posted in the comments:

    http://www.kirupa.com/forum/showthread.php?260312-clickTag-in-AS3/page2

    Here’s the code that supposedly works: ( I HAVE NOT TESTED IT, SO I CANNOT CONFIRM. )

    private function click(event : MouseEvent) : void {
    getURL(LoaderInfo(root.loaderInfo).parameters.clickTag);
    }
    private function getURL(url : String,window : String = “_blank”) : void {
    var broswer : String = ExternalInterface.call(“function getBrowser(){return navigator.userAgent}”) as String;
    if(broswer.indexOf(“Firefox”) != -1 || broswer.indexOf(“MSIE 7.0″) != -1) {
    ExternalInterface.call(‘window.open(“‘ + url + ‘”,”‘ + window + ‘”)’);
    } else {
    navigateToURL(new URLRequest(url), window);
    }
    }

    • http://haungo.net HaunGO

      Oh.. a source of frustration is dealing with the ClickTag, and apparently some kind of issue with IE blocking the link when coded in AS3… i think that’s what the above code resolves.

  • http://gidea.co Vlad Gidea

    This was my first time working with ActionScript and I can say it went pretty well. Doing banners with AS3 seems a bit too much to be honest but it’s a good method to learn to work organized get better at AS3.

  • Quintis

    Thank you so much, messy files = a thing of the past

  • Thomas H.

    There is a small bug that is related to generating the clickArea with stage.stageWidth/height making the banner unclickable in some browsers – see this link to fix it:

    http://test.adform.com/testpage/banner-specifications/general-specifications/flash-banners-restrictions/

  • Rob

    This is a great Tutorial for organising your files, is there any chance for the working banners in the demo to have their own tutorial using the tweenclass.