SWFObject

SWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file.

Trust me, it saved my time more than I could ever thank those guys.

HERE is the link to the project

Pie Preloader Animation in Actionscript 3.0

PiePreloader.as 

package
{
	import flash.display.Shape;

	public class PiePreloader extends Shape
	{
		private var _radius:Number = 0;
		private var _bc    :int    = 0;
		private var _fc    :int    = 0;
		private var _bs    :int    = 0;

		public function PiePreloader($radius:Number, $border_size:int, $border_color:int, $fill_color:int)
		{
			_radius = $radius;
			_bs     = $border_size;
			_bc     = $border_color;
			_fc     = $fill_color;
		}

		public function Draw($e:Number):void
		{
			var $end   = 2*Math.PI*$e/100;

			this.graphics.clear();

			if ($end != 0)
			{
				this.graphics.lineStyle(_bs,_bc);
				this.graphics.beginFill(_fc);
				this.graphics.lineTo(_radius,0);

				Curve(0, 0, 0, $end);

				this.graphics.lineTo(0,0);
				this.graphics.endFill();
			}
		}

		private function Curve($x:Number, $y:Number, $start:Number, $end:Number)
		{
			 var diff = Math.abs($end -$start);
			 var divs = Math.floor(diff/(Math.PI/4))+1;
			 var span = -(diff/(2*divs));
			 var rc   = _radius/Math.cos(span);

			 this.graphics.moveTo(Math.cos($start)*_radius, Math.sin($start)*_radius);

			 for (var i=0; i<divs; ++i)
			 {
				  $end = $start+span;
				  $start = $end+span;
				  this.graphics.curveTo(Math.cos($end)*rc, Math.sin($end)*rc, Math.cos($start)*_radius, Math.sin($start)*_radius);
			 };

			 return this;
		};
	}
}

How to use it:

var _preloader:PiePreloader = new PiePreloader(35, 1, 0x000000, 0x74C2E1);
_preloader.x = stage.stageWidth/2;
_preloader.y = stage.stageHeight/2;
addChild(_preloader);


var _loader:Loader = new Loader();
_loader.load(new URLRequest("punk.jpg"));
_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, Progress, false, 0, true);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,         Complete, false, 0, true);


function Progress($e:Event):void
{
	var $p:Number = $e.target.bytesLoaded/$e.target.bytesTotal*100;
	_preloader.Draw($p);
}

function Complete($e:Event):void
{
	addChild(_loader)
}

Lite Photographers’s Fan Page

Lite Photographers's Fan Page

Lite Photographers's Fan Page

Lite Photographers’s Facebook Fan Page


Facebook can be a photographer’s BEST forms of free advertising !

More than 500 million Facebook users are waiting to get impressed by your page as Facebook Fan Pages have become a standard in Social Media.

FEATURES

  • XML driven content
  • FLASHVARS support ( for the location of the XML file )
  • unlimited number of images
  • resizable
  • choose to auto slide images ( slideshow ) and/or manual navigation
  • set the delay time for slideshow
  • choose your own fonts
  • chnage the color of buttons
  • set how many thumb buttons you want per line ( in case of many pictures  )
  • title can auto hide ( optional from XML )
  • text can be HTML formatted
  • special character support: ¿ÀÁÅÆÇÈÉËÌÎÏÐÑÒÓÔØÙÚÛÜÝÞßàáäåæçèîïðñòóôùúûüýþÿ™®©
  • text supports hyperlinks
  • help file
  • organized OOP code

[ LINK ]

Music Club Facebook Template

Music Club Facebook Template

Music Club Facebook Template

Music Club Facebook Template


Facebook can be one of the BEST forms of free advertising !

More than 500 million Facebook users are waiting to be impressed by your page as Facebook Fan Pages have become a standard in Social Media and advertising.

Key Features:

– XML driven content ( change content without modifying the source )
– Flashvars support ( for the location of the XML file )
– Size : 520 x 680
– Text HTML formatting
– Text supports hyperlinks
– Images slideshow
MP3 player with nice effects
– Posters supports external links
– Optinal slideshows for POSTERS, NEWS and DJs
– HELP file
– Ready to deploy files

Also you can change the colors of all graphical elements from the XML

LINK

Loading External Fonts in Actionscript 3.0

First step:

– create a flash file ( font.fla) linked to a actionscript class file (Font.as).
– copy and paste the code bellow in Font.as

package
{
import flash.display.MovieClip;

public class CustomFont extends MovieClip
{
[Embed(source='/font.ttf', fontName='CUSTOM', mimeType='application/x-font')]
public static var CUSTOM:Class;
}
}

– compile the files, now you should have a font.swf in your folder.

Second step:

– create a flash file ( main.fla) linked to a actionscript class file (Main.as).
– copy and paste the code bellow in Main.as

package
{
import flash.display.MovieClip;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
import flash.text.Font;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.utils.getDefinitionByName;
import flash.utils.getQualifiedClassName;

public class Tutorial extends MovieClip
{
public function Tutorial()
{
var $loader:Loader = new Loader();
$loader.contentLoaderInfo.addEventListener(Event.COMPLETE, Complete, false, 0, true);
$loader.load(new URLRequest("font.swf"));
}

private function Complete($e:Event):void
{
var FontLibrary:Class = $e.target.applicationDomain.getDefinition(getQualifiedClassName($e.target.content)) as Class;
Font.registerFont(FontLibrary.CUSTOM);

ShowText();
}

private function ShowText():void
{
var $tf:TextField = new TextField();
$tf.defaultTextFormat = new TextFormat("CUSTOM", 60,0x000000);
$tf.width = 500;
$tf.embedFonts = true;
$tf.text = "HELLO WORLD";
addChild($tf);
}
}
}

– compile the files and you should have your text with your custom font.

Photographer’s Facebook Fan Page

Photographer's Facebook Fan Page

Photographer's Facebook Fan Page

Facebook can be a photographer’s BEST forms of free advertising !

More than 500 million Facebook users are waiting to be impressed by your page as Facebook Fan Pages have become a standard in Social Media.

Key Features:

– XML driven content ( change content without modifying the source )

– Flashvars support ( for the location of the XML file )

– resizable

– Text HTML formatting

– Smart scrollbar ( visible only if the content is bigger than the section’s visible limit )

Sections:

– news

– about

– portfolio / gallery

– contact

– homepage

[ News ]

– change text colors

– change date color

– HTML formatting text if necessary

– hyperlinks

[ About ]

– change text colors

– HTML formatting text if necessary

– hyperlinks

– change the avatar

[ About ]

– add as many images you want

– set how many thumbs ( circles ) per line

– smooth scrolling

[ Contact ]

– add contact information and how people can reach you

– support for HTML formatting

– external links

– send mail php file

– form validation

Also you can change the colors of all graphical elements

[ link ]