Problem
How to create an email form in AS3 without any redirection to a mail application, such as Mail (mac) or MS Outlook… Have the form and the confirmation all in the same flash.
Solution
First you need to be aware of your server and back-end script capabilities. I’m using my host which runs PHP (which is probably the only language I am comfortable writing in and there are tons of resources online) Then, I am considering factors such as: People may send emails not using real emails so you will possibly need to add validation. To get started: We are going to use AS3 but we are also going to use PHP as back-end. Everything else is done in one swf.
Detailed explanation
I made two movieclips that I used as buttons: sendbtn and resetbtn .
I created input fields called: yourName , fromEmail, yourSubject and YourMsg.
They post the variables: name, from, subject and msg to the PHP.
/************************************* Buttons **************************************/ sendbtn.buttonMode = true; sendbtn.addEventListener(MouseEvent.CLICK, submit); resetbtn.buttonMode = true; resetbtn.addEventListener(MouseEvent.CLICK, reset); /************************************* Variables needed **************************************/ var timer:Timer; var varLoad:URLLoader = new URLLoader; var urlRequest:URLRequest = new URLRequest( "mail.php" ); urlRequest.method = URLRequestMethod.POST; /************************************* Functions **************************************/ function init():void{ //Set all fields to empty yourName.text = ""; fromEmail.text = ""; yourSubject.text = ""; YourMsg.text = ""; } function submit(e:MouseEvent):void { //Check to see if any of the fields are empty if( yourName.text == "" || fromEmail.text == "" || yourSubject.text == "" ||YourMsg.text == "" ) { valid.text = " All fields need to be filled."; } //Check if you're using a valid email address else if( !checkEmail(fromEmail.text) ) { valid.text = "Enter a valid email address"; } else { valid.text = "Sending over the internet..."; var emailData:String = "name =" + yourName.text + " from = " + fromEmail.text + " subject = " + yourSubject.text + " msg = " + YourMsg.text; var urlVars:URLVariables = new URLVariables(emailData); urlVars.dataFormat = URLLoaderDataFormat.TEXT; urlRequest.data = urlVars; varLoad.load( urlRequest ); varLoad.addEventListener(Event.COMPLETE, thankYou ); } } function reset(e:MouseEvent):void { init(); //call the initial clear function } function checkEmail(s:String):Boolean { //This tests for correct email address var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/; var r:Object = p.exec(s); if ( r == null ) { return false; } return true; } function thankYou(e:Event):void { var loader:URLLoader = URLLoader(e.target); var sent = new URLVariables(loader.data).sentStatus; if( sent == "yes" ) { valid.text = "Thanks for your email!"; timer = new Timer(500); timer.addEventListener(TimerEvent.TIMER, msgSent); timer.start(); } else { valid.text = "Oh no! Something is wrong! Try again..."; } } function msgSent(te:TimerEvent):void { if ( timer.currentCount != 10 ) { init(); timer.removeEventListener(TimerEvent.TIMER, msgSent); } }
————-
PHP file called mail.php with the code:
<?php $yourEmail = "yourEmailAddress@yourdomain.com"; // This will be your email address so please change this $ipAddress = $_SERVER['REMOTE_ADDR']; // This gets the user's ip Address $emailMsg = "Name: $yourName sent this from IP: $ipAddress\n\nReturn Email: $sender \n\nSubject:$yourSubject\n\nMessage:\n\n$YourMsg \n\nThis email was sent using a form on your site";$return = "From: $sender\r\n" . "Reply-To:$sender \r\n" ."X-Mailer: PHP/" . phpversion(); if( mail( $yourEmail, "$yourSubject", $emailMsg, $return)) { echo "sentStatus=yes"; } else { echo "sentStatus=no"; } } ?>
emailer.zip *remember to change your email address in the PHP where it says
yourEmailAddress@yourdomain.com
Original link at Adobe, click here.
Color Spectrum Chart is a AS3 tool for creating different types of color spectrum chart. It is very useful for custom color picker. This class includes ColorUtils class, another class which is useful in manipulating colors.
This is PURE CODE and PURE CALCULATION, using pixels and arrays. Absolutely no images embeded. This only requires 2-kb of filesize, and the speed is well analyzed and it is very fast.
I have no liable in other color spectrum charts or others. This class is purely coded and no tools, besides with FlashDevelop, has been used. I’m sharing this to others with no charge. Again, The images (Bitmap) that comes out after finishing this tool was not intended to copy with the others. It is only how it was output by the algo.
The AS3 file is documented well, and will easy to be use by other developer. The tutorials is in the class itself as well as in the ColorUtils class.
Source code here. (used FlashDevelop, if using Flash IDE/FLEX, just copy the src foloder and use the Main.as)
Demo here.
Adobe prereleased Flash Player 10.1 for Android last June 2, 2010. This was most awaiting releases of Adobe. Because there are flash developers there who are willing or wanted to develop Android applications. It will have a higher market competition between Android developers so it is a good news for Android users, too. Because Android’s application might get cheaper and will have wider libraries to choose from.
To download Flash Player 10.1 for Android click here.
AND
if you want to read more about Flash Player 10.1 for Android click here.
AND
for Adobe blogs click here.
To download Flash Player 10.1 for Windows, MAC, Linux click here.
I have encountered an issue regarding with preloader, by using:
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress);
There is inconsistency when I used it in IE and FireFox. Sometimes it works on IE, sometimes it only works on FireFox. But with client’s side, this is not acceptable. So I researched and looked for reasons and possible solution to solve this issue.
The reason why it is ProgressEvent not firing when you refresh your flash content in IE, because I don’t have yet the reason. But I have found a turn around solution. This I usually used in AS2. Instead of using the ProgressEvent, I replaced it by Event.ENTER_FRAME. It is nasty but it works.
This is my Preloader.as
package { import flash.display.DisplayObject; import flash.display.MovieClip; import flash.events.Event; import flash.utils.getDefinitionByName; // preloader class public class Preloader extends MovieClip { // initial function public function Preloader() { addEventListener(Event.ENTER_FRAME, enterFrame); this.loaderInfo.addEventListener(Event.COMPLETE, loadComplete); // show loader } // loadComplete listener private function loadComplete(e:Event):void { // removing unnecessary events removeEventListener(Event.ENTER_FRAME, enterFrame); this.loaderInfo.removeEventListener(Event.COMPLETE, loadComplete); // start calling Main startup(); } // enterFrame listener private function enterFrame(e:Event):void { trace(this.loaderInfo.bytesLoaded, this.loaderInfo.bytesTotal); } private function startup():void { // adding my Main class var mainClass:Class = getDefinitionByName("Main") as Class; addChild(new mainClass() as DisplayObject); } } }
This is my Main.as
package { import flash.display.Sprite; import flash.events.Event; // my Main class structure public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point } } }
I’m still looking the reason why ProgressEvent is not working on IE. But I’m sure it is not with the browser, probably it is in the Flash Player itself. Will update this article when I got valid reason why is there an inconsistency with using this ProgressEvent.
Note:
FlashDevelop’s built-in Preloader.as is also using ProgressEvent. Here is the built-in Preloader.as for FlashDevelop (I love using FlashDevelop, but sometimes this didn’t work, so I need edit the code):
package { import flash.display.DisplayObject; import flash.display.MovieClip; import flash.events.Event; import flash.events.ProgressEvent; import flash.utils.getDefinitionByName; public class Preloader extends MovieClip { public function Preloader() { addEventListener(Event.ENTER_FRAME, checkFrame); loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress); // show loader } private function progress(e:ProgressEvent):void { // update loader } private function checkFrame(e:Event):void { if (currentFrame == totalFrames) { removeEventListener(Event.ENTER_FRAME, checkFrame); startup(); } } private function startup():void { // hide loader stop(); loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress); var mainClass:Class = getDefinitionByName("Main") as Class; addChild(new mainClass() as DisplayObject); } } }
I will demo here how to use Singletons pattern.
First, for those who don’t know what is Singletons. Singleton is:
- is a useful Design Pattern for allowing only one instance of your class, but common mistakes can inadvertently allow more than one instance to be created. In this article, I’ll show you how that can happen and how to avoid it.
- is just a global dressed up to look like OOP. Question is “is it good or bad?”
IMO, Singleton in AS3 is a function that bridge a class to another class which only allow single instantiation. I agree it is just a static (global) function which has a private helper class, so I didn’t prefer this pattern of programming, although it is useful and I did used it in my latest project.
Here is a look for Singleton AS3 pattern done:
package { import flash.events.*; import flash.display.*; public class SingletonDemo extends Sprite { /// static var _instance use for getinstance(); private static var _instance:SingletonDemo; /// this will allow single isntance for this SingletonDemo class public function SingletonDemo(singletonEnforcer:SingletonEnforcer) { } /// static function getinstance() will return SingletonDemo public static function getInstance():SingletonDemo { if (_instance == null) { _instance=new SingletonDemo(new SingletonEnforcer ); } return _instance; } } } /// private helper class. this is to blocker of the clas SingletonDemo internal class SingletonEnforcer { }
How to use this example? If you have another class example Controller, then you can call public functions and variables inside of the SingletonDemo class. Here is a demo how to use a Singleton pattern in AS3:
This is the SingletonDemo class
// SingletonDemo class package { import flash.events.*; import flash.display.*; public class SingletonDemo extends Sprite { /// private static var _instance use for getinstance() private static var _instance:SingletonDemo; /// for demo purposes public var isTest:Boolean = true; public var isSecondInstance:Boolean = true; public var isEnd:Boolean = true; /// this will allow single instance for this SingletonDemo class public function SingletonDemo(singletonEnforcer:SingletonEnforcer) { trace("Single instantiate"); } /// publci static function getinstance() will return SingletonDemo public static function getInstance():SingletonDemo { if (_instance == null) { _instance = new SingletonDemo(new SingletonEnforcer); } return _instance; } } } /// private helper class. this is to blocker of the clas SingletonDemo internal class SingletonEnforcer { }
This is the Main class:
// Main class package { import flash.display.MovieClip; import flash.events.Event; public class Main extends MovieClip { // Main function public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point trace(SingletonDemo.getInstance().isTest); trace(SingletonDemo.getInstance().isSecondInstance); trace(SingletonDemo.getInstance().isEnd); // trace ouput: // Single instantiate // true // true // true /// you can notice that it will only instantiate the class SingletonDemo once. } } }
You can recode the SingletonDemo according with your need, and you can also rename the class. Just follow the pattern and it will look nice. Again, me and there are programmers which are not prefer this kind of pattern as OOP.
Here is a simple way how to embed font using ActionScript 3 and shared library.
I rename this file MyFont.as and should have MyFont.swf
// simple way to embed font using AS3 package { import flash.display.*; import flash.text.*; // I'm using FlashDevelop so it is "extends Sprite" // If using Flash IDE replace "Sprite" with "MovieClip" public class MyFont extends Sprite { // embeding font with font weight, unicode range // i used public static to share publicly [Embed(source = "C:/Windows/Fonts/Arial.ttf", fontName = "Arial", mimeType = "application/x-font", fontWeight = "normal", unicodeRange = "U+0020-U+007E, U+005B-U+0060, U+007B-U+007E")] public static var RegularFont:Class; public function MyFont():void { // need to register the font Font.registerFont(RegularFont); } } }
for unicode range:
* Uppercase : U+0020,U+0041-U+005A
* Lowercase : U+0020,U+0061-U+007A
* Numerals : U+0030-U+0039,U+002E
* Punctuation : U+0020-U+002F,U+003A-U+0040,U+005B-U+0060,U+007B-U+007E
* Basic Latin : U+0020-U+002F, U+0030-U+0039, U+003A-U+0040, U+0041-U+005A, U+005B-U+0060, U+0061-U+007A, U+007B-U+007E
Some say that unicodeRange=”English” is working, but I haven’t tested it yet.
You can also learn more about the Latin Unicode characters from Wikipedia.
You can check here the unicode viewer.
for font weight:
* bold
* regular
* italic
* underline
In other source code or other project (Main.as with Main.swf)
package { import flash.display.*; import flash.net.*; import flash.text.*; public class Main extends MovieClip { private var fontsSwf:String = "MyFont.swf"; private var fontsPath:String = "assets/swfs/fonts/"; private var tFormat:TextFormat = new TextFormat(); public function Main():void { var loader:Loader = new Loader(); loader.load(new URLRequest(fontsPath + fontsSwf)); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fontInit); } function fontInit(evt:Event) { // to get the access the shared library var MyFont:Class = evt.currentTarget.applicationDomain.getDefinition("MyFont_RegularFont") as Class; // initialize the font var myFont:Font = new MyFont(); // setting textfield & textformat var tFormat:TextFormat = new TextFormat(); tFormat.font = myFont.fontName var tf:TextField = new TextField(); tf.embedFonts = true; tf.x = stage.stageWidth / 2; tf.y = stage.stageHeight / 2; tf.autoSize = "center"; tf.multiline = true; tf.text = "\"Do not be a hard-worker, \nbut be a smart worker.\" - Mykhel Trinitaria"; tf.setTextFormat(tFormat); // rotate the textfield to check if embeding font is correct tf.rotation = 10; addChild(tf); } } }
This is very useful when developing games or flash applications with very minimal filesize required. Instead of embedding the whole “FONT”, we can embed the selected character only.
I can tell “goodbye” to the Flash IDE’s Library, we have learned here how to embed fonts (can also be used in images, songs, flvs), and how to use the external shared library.
People are getting insane with removeChild() in AS3. They addChild() the object in the same level but they can’t remove it.
There are several ways to use removeChild() of course it depends what you need.
#1
mc.parent.removeChild(mc);
#2
MovieClip(mc).parent.removeChild(mc);
#3
function loadMovie (){ var my_mc:MovieClip = new MovieClip(); var my_Loader:Loader = new Loader(); my_mc.addChild(my_Loader); addChild(my_mc); var my_url:URLRequest=new URLRequest("pic1.swf"); my_Loader.load(my_url); my_mc.x = 206; my_mc.y = 100; } function removeMovie():void { // you can use this my_Loader.parent.removeChild(my_Loader); }
These are the common mistake when using removeChild() of AS3, there are other problems or factors that’s why removeChild is not working in your project.
It probably improper declaring the function or events or objects. Just check the codes, and to make sure it will work use #1 or #2 as my advise.
If this won’t help, try this my other article about removeChild() in AS3.
Will going to update this every time and then I encounter some improper declaring of removeChild() in AS3.
List of twitter accounts which follow back to you. I just got this in the internet, I haven’t yet add them all but I will want to. I will just need to finished my script how to add bulk of twitter accounts in just few and light process to add.
Feel free to add them all, but please do not use it to spam. People are intelligent they will know if you are spam or not. You can follow me as well.
tvipowerboard
aBeaugh
MichaelSalvo
MegChavalier
Kendra_Jordan
MyNameIsJovi
Dellu_OK
sNIEKi
DiehardThreads
Dejir0
TVI_PowerBoard
Josh4Q
XtremePicks_com
The_wow_factor
DreamMosaic
Jofrix
UpsideDownText
Kris10ized
DeborahVanHoose
IM_CP
AliKingsMusic
ShareYourLove
KiteString
ShopRite
Jesse111
IanMaffett
Pirawte
BenNicky
BostjanCizelj
CandiCunningham
Thomas_Fischer
JamesClarkin
JustinComeauRE
EdLaHood
MainCloud
drcmblake
StarTwits
_McLaughlin
_SamJones
00Joe
0Boy
1MILLIONorBUST
1Thing4Green
9Miles
A_Lan
a1antiques
AaronMartirano
absolutebica
AccuWxChicago
AceFerdinand
acmaurer
adelarubio
Adnagam
AdornedAnkle
Adult
agrabher
airbrush_art
ajmadison
alandavidson
alanjchapman
AlexBlom
AlexisNeely
AlexKaris
alexmalave
alexsol
AlFerretti
aliciabankhofer
allenjesson
AllisonHarkett
AlliWorthington
AlohaArleen
althetaxman
AlwaysBluff
amarsrivastava
AmazonCares
AmazonFreak
AmbitiousGreen
AmericanElement
Andrew303
AndrewWindham
AndroGeek
Anexemines
angievinez
Ann_Sieg
anonyguy
AnthonyNitz
antsmarching
apocketofcoins
Archimedius
Arcticmatt
area53
AskDayton
asktheboater
Astronautics
audreychernoff
auntiethesis
AureliusTjin
b2bchristos
babaialainn
backhomeagain
BalanceForce
ballermann666
BarackObama
Barb_G
Barefoot_Exec
bcotto
BeautyWriter
BedsMatters
Beeftrain
BellaSmiles
BenCarroll
benirawan
bernardoChris
BertoniGallery
BettyDraper
BeverlySchmitt
BigRichB
Bill_Romanos
billbaren
BillCrosby
billyjackson
BioTecK
bizziemommy
bjbyrne
blackberrypros
BlackBottoms
BlazingMinds
BlissSpa
blogyn
blujam
blustok
BMXJake
bobbylewis
BobCallahan
bobgower
BobOnSixMinutes
BodyVox
boldapproach
boom8088
BootcampMommy
boygirlboygirl
BradFallon
BradHoward
BradleyWill
bradwozny
brainstormghana
BrandAmp
brandondonaghy
brettbrtsk
brotherjesse
BryantSmith
BucksMatters
builder4U
bukisa
bullyinguk
cacoff
CaliDeals
calliopes
CallOfBeauty2
calpianoguy
Carbon_Offset
carbonadvicegrp
CarbonHeart
CarolAnnB
carriekerpen
CaseyWright
cathybaker
cc_chapman
chadnilsson
chartsfm
chasecolasonno
chelseagreen
ChelseaMoser
ChezChani
Chicago_News
chicagosoydairy
ChicagoTweetups
Chris_Robbins
chrisblackwell
chriscobb
ChrisMillerJr
ChrisMoreschi
ChrisPirillo
ChrisSpagnuolo
ChristianFea
christianwake
CindyKing
CircleOfFood
Citipeeps
ciupanezul
clarissaburt
clarky07
clemonty
CleveEngSoc
climatechanger
CMChadwick
COasis
CoffeeCupNews
CoffeeTweet
Comcastcares
ComcastGeorge
cooldude13233
CoolEcoStuff
Coolsi
cosguru
CosmoBC
CountryDiscount
couponmenagerie
CouponTweet
cowartandmore
cpetrzelka
cr8tivecitizen
CraftyCoach
craigsandrews
CraigTeich
creativechick
creepypasta
CrowdSproutJon
CrumCake
crypticnights
cselmah
ctrebnick
ctrygstad
CupKozy
CurlyQCuties
cynthiambarnes
CyprianoHawaii
dailystump
damienstevens
Dana_Willhoit
DanekS
daneskelson
danhamon
DanielleBirch
dannyintampa
DanPlasticMan
DanSchawbel
DanTanner
darrenmonroe
Dasit
datadirt
datadirtrss
datenschmutzrss
DaveLawrence
DaveMalby
DaveMarshall
DaveSandell
davidbmiller
davidhenderson
DavisSimon
DawudMiracle
dbounds
dcagle
dcook04788
DCRBlogs
ddhamm
dealexpert
Debbas
DebtPost
definium_kevin
Degoon
DennisFMaloney
denverfoodguy
Dexin
DianaSmiles
DickensFenster
dillonburroughs
DiyanaAlcheva
dj_stevens
djplb
dlarusso15
dlmcwilliams
DMular
dockane
Dollars5
DonRJeffries
donrock1
donshults
doterrahealth
DougH
DowningStreet
Drewko
Drfighter
DrJeffersnBoggs
DSMPublishing
DwaynePyle
dylanfogle
E_Stampede
EarthHourForBiz
earthXplorer
East_Bay_Green
EasyLocalShopin
Eat_Organic
ecbeauty
eclickz
EcoChic
EcoInteractive
ecoorganic1
edcurran
edie
EdStivala
EdwardMoore
efairhurst
ejoep
electronicpets
Eleesha
EllenKramer
EmiRH
eMom
emory49
emudeer
emzanotti
epleasures
ESPN
EssexMatters
eunice007
eunmac
evahester
EverywhereTrip
EvilSnail
expandonline
EzineArticles
FacebookFlow
FarmerPhoebe
feelgoodguru
Fifth_Grouper
Figliuolo
Flap
FLWBooks
follower1
Foodimentary
footballaustria
Forechecker
franchise
FredaMooncotch
FreedomOverdose
FreedomWeaver
freeseoinfo
frontofmonitor
Frostfire
frugalfreebies
fruitadvantage
gardenorganic
GarinKilpatrick
garlandrobinson
gazelle_com
Gemstars
genuine_rp
GeoffWigz
Gerald_Janauer
GetCateringJobs
getdannow
GetMarManagJobs
GetMarReseaJobs
GetMedSalesJobs
GetPubRelatJobs
GHChealth
Ginae
GinaSelir
GlennGrundberg
globeizer
Gloson
Go2DavidLeFevre
goodpasture
googlegadgets
gorillacd
gotmelik
govaporize
graciew
GrahamY
Grapho
Greengamma
GreenGardenChic
GreenJobIdeas
GreenPlanetOrg
greenprofs
greenripple
greentweet
greenwala
GreenWishTM
Greggaz
growline
GSpowart
guestbook
GuyKawasaki
gw3
gwenbell
hamsterkitten
handylittleme
Happymaker
harshnoise
HashTags
HawaiiRealty
Healthymoney
HeatherinBC
heatherknitz
helmeloh
HelpAnimals
Helping_Animals
hippygrandma
HisBoysCanSwim
HoleInHisEye
homeincome
homeopathyworks
hootsuite
HotelLawyer
hotkeywordspy
HowardBienstock
htmhelen
Hubpages
iandavidchapman
ibusinesstalk
Iceburner
IdaliaJewelry
idealpinkrose
ImogenHeap
in_social_media
InfadelsAreCool
infidelsarecool
invoker
iPodiums
iSaleswriter
IssueTrak
Itipp
ITjoblog
itresource
JackBastide
jaheed
JamesByers
JamesRivers
JamiePappas
JanSimpson
japhyat
Jason_Pollock
JasonFinch
JasonMitchener
JasonTryfon
JayOatway
jbatts
JeanetteJoy
jeanjoh
JeanLucR
jeff_green
JeffCzyz
JeffHerring
JeffPulver
jeffreygoodwin
JeMarie
JeMarieTa
Jerell
JeremyRDeYoung
jerlewis
Jesse
JesseNewhart
jessepowell
jessicaprah
JesusFucking
jhongren
Jim_Turner
JimDeMint
JimFoss
JimmySmithTrain
JimOdom
JinShing
JivaFitJulie
jmarks
jmlebeau
joekasper
JoelDrapper
JohnChow
johnconroy
johnculberson
johnflynn50
johnmasters
JohnReese
JokerArt
jokezguy
Jonathan360
JonathanMizel
jtitamer
juanjosealcala
judypdi
JudyRey
JulieRoy
JulietEaston
JustingLover
JustinLL
jutecht
jwamyer
Kamper
KarlRove
karnies
kbfarrell
kdelin
Keith_Brown
KeithGoodrum
KellieMcCoy
KellyJoGould
KellyShibari
Ken_Cosgrove
Kerrysherin
KevinEdwardLong
kevinhell
KeyKnowHow
ki2mylife
KICC
Kidscash
kiiworld
KikiValdes
kim_willis
klaus2go
KMesiab
kmeyers13
KnitStorm
KonaEndurance
KrisColvin
kristenking
KristenNicole2
kristn
krusk
kstien1959
kurtismarsh
kyledylanconner
kylelibra
LadelleDesigns
LaMamaNaturale
LanceScoular
LarryBrauner
LarryLanier
LATimes
LaunchLab
LauraLeeSparks
LeahEstella
LEEDLoop
leethost
LenDevanna
Lennar
Leplan
LesM
lexus36
LikeSoy
LimerickLover
Linc4Justice
LisaTorres
LittleQuiz
liver4carole
livingthread
livinthefitlife
lizzed
LOAnow
LonnieHodge
LookCook
lopezpatricia06
losethefatnow
Lotay
Lotuspad
loudhive_trex
LouieBaur
loveheylola
lovepeaceunity
Loyalty360
LPT365
LRHguild
Lt_Draper
luxurypaw
lxcoza
lyal
lyndsay82
LynzieCox
MadMadMargo
MadMadMaxx
mahadewa
MakaLeWakan
makelemonade
makescents
Malc0
managerlady
ManuelViloria
maramingsalamat
marcmad
marcusambrosch
MarcWarnke
MariaAndros
MariSmith
Mark33
MarkDavidson
MarketingProfs
marketingwizdom
MarketingZap
MarkGabel
MarkRMatthews
MaryAMcNeil
marylougall
mattbacak
matthewcostner
mauricecastle
max_i_million
maxiecoldiron
MaXsiM
MayhemStudios
MediaBistro
Meteorit
michael_advena
Michael_Bryn
michaelbanovsky
MichaelEmlong
michaelfidler
MichaelKan
michaelwong38
MichaeMillman
MichDdot
mickeysnow
MickMonroe
middle_east
mikedipetrillo
MikeFilsaime
MikeKlingler
MikeMacLeod
MikeMayhew
mikenolan99
MikePFS
MilitaryMama
Millionairemakr
milner0520
minigarden
misaacmom
MiserableThings
MistyKhan
Jamak
MJBerry
mmdogtraining
ModelsNBusiness
ModernMom
mojobob
MojoJuju
mombloggersclub
MomDot
momsnetwork
MonkeyDeLaCode
Montaignejns
MortgageCloser
MOSNetwork
MothersWork
MrSocial
mskpetigo
msocialm
mtgmantx
mugsymalone
MurrayNewlands
mydog
myhomeca
mysticquest
MyTweetheart
Nabbit
nabylc
namenydotcom
Nancy846
Nansen
NapervilleIL
nathanmcgee
nationwideclass
ndwells05
NearlyPrfctVeg
needcaffeine
nemasisx
Neticule
NewHomesFresno
NewMediaJim
newoldmom
NicheTitans
NicholasPatten
Nicolane
NicoleDean
NixTheNews
njpaust
nlawhead
nontheist
NorthantMatters
nukemdomis
NurseBills
officialpeta
OHHDLInfo
Oliver_Turner
OneSourceTalent
only2degrees
onStorage
ooffoo
oomobile
openhippo
OpenZine
operationcarbon
Orrin_Woodward
OudiAntebi
OutlawMarketer
OutsideMyBrain
overlinker
PaigeNoelleS
PanNature
ParkHowell
parnellk63
Pat_Lorna
PatricChocolate
PawLuxury
pcremix
pepperpicker
Peppersantblai
pereca
PerryBelcher
petdognation
Peter_R_Casey
PeterDrew
PeterSantilli
pgiblett
PhilBundy
PhotoCanvas
pianofactorygal
PilonBignell
pingvid
PinkElephantPun
Pistachio
pluckypea
poligraf
pollypearson
populizer
Portnik
posr367
PowerSystem
PragueBob
prayerman
pressefreiheit
primecredit
Prinz_Rupi
projectVISUAL
properthinking
PropPreview
ProsperityGal
PsychicPattyann
PsyCode
PurpleTriangle
QuadrilleEco
QuadrilleFood
QuantumKnight
QueenoftheClick
Queensboroshirt
querform
RadioBlogger
ralphclaxton
RAMMFENCE
RawAndFit
rawdivas
rawgoraw
rdnxla
redb27
redeyechicago
reedracer
regnordman
reisingers
remoteinsider25
rentcentralpa
res_change
ResponsivHealth
Rex7
RFDAmerica
RichCurrie
richdinatlanta
RichReising
rickyrod1385
RickySantos
RightWingNews
Risdall
RiseSmart
RizzoTees
RobMcNealy
roboreel
RockingJude
rocknrod
rockstarpr
roncallari
RonnieWilson
rossanneg
RubberMulch
rustydeals
Ryo
saffmichelle
SamAhern
sandyhall
saurav99
SBoSM
scarfmonsters
SchumacherTS
Scobleizer
ScotMcKay
scotteyre
ScottWilliams
SeanMalarkey
seanpower
SebastienPage
sebs
segdeha
SengSenabandith
SethSimonds
sexysustainable
Sgrunenwald
shadonna
ShakleeMama
Shama
ShannonHerod
ShannonSeek
SharatJaswal
sharonjam
shaunbonk
ShawnRobinson
SheriTingle
ShileenNixon
shoestringing
shoppingcoupons
ShoppingFinds
ShopZilla2009
ShortAwards
shultquist
Silbersurfer
simonjwebber
Simple_Hosting
simplegreenlvng
SimpleSchooling
simplyjo1
SistersTalk
SitePointdotcom
sk8tergaro
skashliwal
skyyogastudio
slowpctips
smartgardener
SmartWoman
Snowshadow
SocialMediaClub
socialmediamind
socialtoo
Socrates_Soc
solismarchela
solnetwork
SomersetMatters
sos4children
Sotero_Garcia
spaminal
SPARKt
SPnWin
Sri747
StacieinAtlanta
StaffInSeconds
StanleyTang
Starbucks
starstreet
steamykitchen
steelydaniel
Steinhoefel1
Stejules
stephen8227
StephenKruiser
StephHarrington
SteveGarfield
SteveGoltiao
stevenbanville
SteveOuch
SteveWeber
Stickham
StockTwits
stoned_alien
StrangeDayz
SuccessBooks
successmastery
suganeseo
SuggestionBox
surfsusan
Survival
susanvhinds
swd788
swedal
Swiggs
syndetech
Szetela
taghioff
TaigaCompany
TakeMyVoice
taless
tallivansunder
TankaBar_Summer
tarafireball
TASOW
TattooNate
Techhie
technofinger
TechXav
TeddyShabba
Teedubya
TeleDirect
terrafx
TerriZSoloCEO
terrywhalin
TeslaOne
TessStaadecker
ThaPaparazza
The_Gman
TheBigKlosowski
theBilly
TheBusyBrain
TheCardioExpert
theCRICKETtoy
TheDigitalLife
theDukeOfSEO
TheEngineer2008
thefightgeek
TheFind
TheGazzMan
thelettingsite
TheMarvelman1
TheNOssip
TheOnion
thepoems
thepoopoopaper
TheSoothieRanch
TheStarShineCo
TheStoolPigeon
THESTORYOFSTEPH
thetearooms
thetwinkieaward
ThinkGeek
TicketSaver
TimeForSuccess
TimJensen
TimothyBlack
timothyodell
Tina_Sparby
tinahelwig
tinatessina
TKirkby
TKLV
TMaduri
tmoneyholder
tmpollard
ToddPLamb
Tom_Siwik
TomTroughton
topfmodel
TopJobsInLondon
toptoys
ToThink
tpgordo99
TraderAdvice
TradingGoddess
TrafficGen
TravisGreenlee
TreeBanker
TrendTracker
trishlawrence
troytolan
TUAW
turquoisemoon
TVTimeMachine
TweeterTags
tweetliberty
TweetReferrals
TweetStats
TwinkieR
twitaddict
TwitLive
TwitPic
Twitter_Tips
twitterbo
twittermoms
twittle_dee_dum
twitVoyeur
TwoDogs
TwoSeasideBabes
TylerTorment
TYSONtheQUICK
UCBearcats
Ukeycheyma
Ultimo119
ultrawellness
Unmarketing
unseenenergy
Upicks
upromise
urbannutrition
usaglobal
USBargains
uzziemom
Vegimentary
verkoren
veronica_duran
VideOptin
vikrambkumar
vipvirtualsols
virtual_host
virtualkaren
VirtualPath
vjhoneycut
voplanet
vsatie
wakooz
warp50cd
washingtonson
waterdropblog
WayneMansfield
WBAustin
web20maven
WebAddict
webdesign_uk
Weblord
WeirdChina
WeSeed
whizkids
willfrancis
WillieCrawford
winerecipes
WineTwits
wolfmuel
WomenCan
wordsthatwork
wpdude
writing_prompts
WritingHannah
WritingSpirit
wsly
wude72
xsnation
yestocarrots
yoga_mama
YogiMarilyn
Zaibatsu
Zefrank
zehm
zAndroidBlog
ziPhoneApps
zSpyderx
zupreme
zweinullweb
msslw86
happeeM
Chris
Rob Gooch
Derek
If you found this in the internet, and you want to add your twitter to the list, just add a comment with your twitter account.
Other useful link where you can submit your twitter account:
I always used custom EventDispatcher in big project even in small project, just to simplify my work load and working hours. This is a simple Custom EventDispatcher.
The class goes here:
// save as CustomEvent.as package { import flash.events.Event; public class CustomEvent extends Event { public function CustomEvent (type:String, bubbles:Boolean = false, cancelable:Boolean = false){ super( type, bubbles, cancelable); } } }
Put this together with the main file.
And here how to use it:
...
...
dispatchEvent(new CustomEvent("SEND_COMPLETE"));
...
...
addEventListener("SEND_COMPLETE", onSendComplete);
...
...
private function onSendComplete(evt:Event):void {
trace("send complete callback"); // ouput: send complete callback
}

