Adobe Flash CS4

download Adobe Flash CS4

If you can't read please download the document

Transcript of Adobe Flash CS4

WHAT'S ON THEDISC _Is on 0 .OJ ".W of , ... cont..... of.". OM ......... !rI. _dIic lesson files... and 50 much more _""",,"n..AQ4""".oJ''C.'f..'.' __,,hot 1"""1_ to ...,It .. ,"" ....,..... ;" ..... -......d....""._.... '0 ,,",,)"001.............. _.. _n.... C"I.od ..... ".."h ......................., .,oJ ...... 1"'- ik>r >- Tho """"" ",.. _".. IN 000,,... ,, 0( ,,,. d,,.,, ",hoch """,Id ...... p _lox... ,Iw (, .... )'000....... ---'""--------"-"-_... _---.... _... _-------_ .. ---_ .. ----... ----_(.. tl .... -_. - .......'_._'.----.. ""-.,.-..._ ....'" .. -""'''''-.... -.-/.:>siQl",1 Classroom illa Book isnolm ..anllo replace docu- that comes with the program or to bEa (omprd,ensiwfor .. \"t'ry f...alUreinFlashCS.I. Only the commands and options useJ inthelessolls are .. xplainffiinIhisbook for comprf)u'nsi,'"il1formalion aboutprog,ramfealur .. s, to any of tlle$eresources: Adobeflash CS4Communit), Hdp. which }'OUcan viewb}' choosingHelpFlashHelp. Connnunil), Help isan i[lteg,rotedonli"e environmenl of i"struction, i"'piratioll, and .upporL It indudes custom search of experl.selt"Cted, rel",'.nl (;l1Il((>l1 t on and oIl' Adobe ,com. CommunilY H .. lpcombines conlentfrom Adm,.,Hell'. Support,DesignDe\'eloper Connection, andForums-along with gr...at online community contentso thatusers can easil)' findthe !>eSImostup-to-d;ol ..resources. Access I"wri.ls, lechnial "'pport, onlin(> producthelp, "ideos, articles. tips and techniques. blogs, examples, andmuch more. AdobeHash Support Cent .. r,where youcan (uldartdbrowsesupporl and learning cOlltent on Adol>e.com.Visitwww.adobe.com/sul.llOrtllhshl. Adobe TV,where )'0\0willfindprogramming on Adobe prod"cts, including a channel forprofessiomllpholognll'h.. rs and. How To clHumeithat cont"ins hundreds of I11m'ies onFlashCS4 and other products across Ihe Adobe CS4 lin .. up.VisithUp:llt\",.dobe.coml . Alsocheck out these usefullinks: TheFlash CS4l!roducthome page alwww.adobe.contlproductsIAashl. Flashuser forums at www.adobe.comlsupporll forumsl forpeer-Io-peer di5Cuss.ion, of Adobe products. Flas!lExcha"ge otwww.adobe.CO ... lcfusio .. forfu"clions, code, and more. Flashplug.ills at www.adobe,collll productsl pluginslHashl. Adobe Certification fheAdobe urtififfi program is desi!(nffito hdp Adm.., and trainers in, I'm"" andpromote their product-profidellcyare fourof certification; AdOOt>As> if 'I', not Ihae. ,J .0-.-.-.-..-.. Inf l.>h. 1M Stage i< the ""lion takes pla New. InNewdialog box. chOOS S.we,Name the f,le 0 , _ " 'o,kingcol' y.lla and ..we it inthe 0 ISta,t folder. Sowingyourright ""'J)' is a grtonto Ihe Stage is also10tlw library. an)' 51'mools }'OUcreate. Youcan th"n "asily access the items to add th"m to the Stage 'gain, ro,ttt..,m, or see their properties. To displ"y Librar)' panel. chooseWindowLibr::of}', or press Ctrl+ L (Windows) or Con",,,ud+L (Moe OS). Not. :y",,'lIlearn mu Import to Library,Inthe Open dialog bo., Sorting allthe other JPEGimages inthe DISrart folder. 4'Thelibrary pand " 'illdisplay allthe import,.,jIPEG imag"" with their filenames and a thumbnailpre'oj .. w.1hese images are nOW,v:lilable 10 boto I layer aoo.."itis el11ply. 4St>lcctthe top layer calleLibraryto ol"'nthe Library pand if itisnt already Ol"'". 6Dmg. theLibrary(all("[{"({"a b)"n dde(e .11I"y ers inside thatfolder as well. Changing the Appearance of the Timeline Youcan adjust the Timehne's appear. ance to accommodate )'our "'orkftow, Whenyou"""t to 60eemore layers. select Short fromthe Frame View pop-up menu;n theupper-right corner of the T imeline. TI,e Short command decreases the height of (rMne cellrows. 18[(lION1Goottl"llAlntod p'ht... ln (! Hi"'" y, By d..tauk, the Propeny in,peaor. library panel, and Tool. panel appe"logether at the right of the t l>peseiooed tool. The "xpand...Jmenu on tt>eright ,how. tt>e hldd"" tool .. The on the expanded menu to It>e'ight indicate tt>eappears In tt>eTools panel, The single , .pOt.llen.,s inpa renthese.lndic.te the keyboard shortCuts to select tool.,how the tool re grouped together by similar /unction. Orawingond eo.,..,., l.mo (l ) T".I m Ur>e (l ) Pmc. (V) De Preferences. 2Chaos Other Pands > History to 01"'" the History panel. 1Drag thelilsto!)' p3nel slider up to the step justbefore )'ourhelow that point a,. .. dimmed intheHistory panel and 3re remO\'ed fromthe ["0 add" step Q3ck.mo'"esl iderdown. 26((ISONI(,oW"IIA Test"'Io';e.Flash OpellS "lid pla)'sthe movi .. inasepardte windo..... Flash automatically loops )"our1ll0";c illIhis preview mod.. , If )-OU1011',"'alll the lIIo\'ie10loop, choose Conlrol> Loop 10 d"sdocIIlw oplion. 2dose the pr",;ew window. Fl.o\SI!(\.4PROFBSKIN.I.l(l.o\SSAOOMINBDcerlain Ihat it' s properly, 1Choose file ,.Publish $eltings. 2aick the formats lab. 3SeIe.:1Flash Cswf) andHTML (.hlml). _. '-- M" '-'' , . .,._.... ., ... 75 .-0,-,,':,Joo .,.-__ 01.__.-01.__-( ---, 4Click the HTML tab. -' : "---'--!illl!...! """ ,-, ----- -- ag .. at ("OIlHllU'HI).dohe.co.n/ help/mai n. H@I f ... IoW'Iq u..mloM n..." 5.A keyfrnme isr.. pre.... nted on th .. Timeline w,th a circle and iudic-dtes " chan)(e In(ontenl on the Stage. 1Ilea usethere ar..tOOIllany tools to displa) a\ onCr inth ..I"oolsp.,nd. SOme loois are grouj>etl.and onl)" Onetoolinthe groUI) is ,Iispla)"",,!.(lhe toolyoumo.tres.o'-al . and Ii""" Underslillle!the differencebetwek' x g,aph;':, 000 i!Y,"a\ioo, in Flash, Combj"" ,""'"g,diem"I"",Ie"'. Mod fiK ... 1o.>foredoing flash anim;uion. 20100* File> New.IIIthe New[)ocunwnt dialogbox.choose FlashFile (ActionScript 3.0). )Inthe Proper!)" inspector. make the Stage siztO700 pixels byISO pIxels andmah the color of the SI;!S< 00 . Clickingf illColor 00.0l> )'OU don'. r>eed when you'r" Omponing at.itmap. Adding a Bitmap Fill is of drawn ob;"':l_YouCan"1'1'1), a ",lid color, a or abilmap "nage (such as " TI FF,)PEG. or GI F f,le)as0 fillillFlash. or rou (on spephk, FlashDrawing Modes Flash provide. thr .... drawing modes. whkh detl'lmine how objoo. ,111 ...3(\ w' lh eachother on 100 St09" and how you can edll1hem. By del""'!, FI.m usesdrawing mode. but you can enable object drawing mode 0gleand tM in"", ,.)(I;us of oval primiti"". usir>gthe p,operty insp gradientfill shouldblelld into the edge of the glass. Making Selections To modif), an obi""t, )UUmustfirstselectit InFl.lsh. }'OUcan make sdinan obiect_ Withthe !.ossa tool.)'OUdraw a fr.,.,formselection. Hot.:Move lhe drphk. SWith the Selection tool. ...Iectthe center area of the ba... shape. Startthe ...I",tionfromtlw groul,- eit lwr .bo,e or below it- to prewnt mm'ing the entire ba.... 6Clicl the FillColor icon inthe Tools panel. and ... Iectwhite or In'" #FFFFFF ,n th..Color Picker. lh.....lectedportion be to tI>t uppet'_ Iofl, ......... Wrou ",HI ,t,j1 ... OpIion,l.... object is scalftl .....1.... ,ran.to.mation by ,he New S)"mool 2Inthe CreateNew Symbol dialog box that app"ars, enter fill Ylinefor the name and choose Ihe Graphict)'P" s)"l11boLOick OK -1ft" ...tl"':I '''''' (C.Lot) ,- Ubwy ...". SO[(ISONlWotklngwi'" Gr>phk. 3Flash immediately tak ....you to Symbol-editing mooe. Notice the top horizontal bar 'lbo'etlwSt"ge. which )ouare"ditins th" s)mbol coll{' Align), 7a,ck on the Ahgnhorizontal center. 1he star_shaped group and m':llbecome aligne Apart on.. more time. 1he collection of fizzy line symbols breaks iouo its componetH parts and beGr.phiortit into Flash. When you importallJIIustrator f,le,you can choose which l.yers inthe fileto import"lidhowFlashshouldtreal tllOSoeI.)'ers.You'll;ml>orlanIlluSTratorfile that ronl.ins allthe chanKlers forthe cartoon frame. 1C"hooM>file >Import > Imporl to Siage. 1Soclt'ol "'. I>tmap image.ln thl ConvertnlUlUilwr 'iI)'fl' to FI h keyframes Convert e",h .'ustralor laye< 10 f l.,h graphic symbol C"".... "illlll lu",ator lay""to iI single FI ..h lay'" Importing symbols Working symbols InIIIUSlrator is slmll., to working them in Fla5l1. In1gS,mboh Importing Photos hop Files \' oull import"I'holoshol'for !background, lh...Pholo,hop (,Ie conlai"s ,W.., la)"ers with a blendins effec;t.A blending etfe 11dick OK. 'n", Iwol'holOl>hoplayers intpOrlN!into nosh "nd placN! on larers OnIhe Timdin". lhe Pholoshop imago'S.ro' aUlom"ic.,lI y COI"''' rTlod;1110 dip symbols and so"N! in)'ourLibrary.Alllh" blend'"g "lid Inrorm. lion is pr....,,....,J. If )'oulinagE"IIIIh ..flor .. ... r. )'ou'l1set' Ih.llh.. Bl .. nding oplion is sorllOUghltninlloe- Property insplor u""",,.lilt O"pl.y ....,Iion. 1":-:,-::-u - ----TU. .. --\oj..... .---. .. _. ---12Drag lhe rbotlile hero bIers 10 Iloe- lOp of the Ti",.. I",.. IIwy 0...,1.1'Ih.. bacLgrowKl La)... rs.. About Image Formats FIWl 'l4>PO"I'..... for ...."lot 1"'90'1. fI.1sh CM!tlandle JPEG.GIF. PNG. M>d P50 {Photoshop) 1\16. Use JPEGfIIK fOlItlal grodi.nto; and subtle vori.otion .. such HIt.oo.\N1 occur .. phoIogrjphl.. GlFftlH Me used fof i",.. with 1Moe solid blocks of color 01blKk ond while line ""aWWlgs. Use PNG flies lot IhM include ""''opMerq. Use P50 ftlH if)'Oll 10tile loyer, "'""",'eney. Jnd blending Informillion hom ilPIlolmhop ftle. , .. JC- .. _ -.. - Converting a Bitmap Image to a Vector Graphic Sometime< you'll want to conven a mtmap image to a vMor graphk While fla'" handles mtm"llimages as a series of coloredi'l'lay it ""'rply and ,moothly. Convert ing a bitmap image to a Vl'Ctoroften N" the effect ofit 1001 BItmap > TraceBOtmap.The option. del",mlne how faithllJlof a trace the vectorwillbe to the original mtmap, fle!ow,the left image I, an original mlmap and the right im"9(' i. a Vl'Ctorgraphic. Exerd.e caution whe-nu.lng the Trate Bitmap command, bee.... se compiicate.which youbreak apart furtherto edit as),oupleaS!egrateers intheFilters window with options forBlur X andBlurY. 4aick the linkiconn"xlto Ih ..Blu, X andBlurY "I,[ions 10linkthe blur effect,n hoth directions. S$tthe Blur X audBlurY value toto pixels. VF1lTEIU

..lIur 1111')( 1111'Y Qu,aJ,rv More Filter Options AlUwix>t!om 0( thewindow "row of opti"'" t o you manag.e ;md apply multiple--,I .----- " ' ..L -------._-The Presets buuon I("IS yOQl. 7Into Symbol dialog box. a....100 aip tn>e.and dick OK -. Foldor:I!bwy""" Younowa dip symbolin)'ourLibmry with your textinside. An instance of the movie dip symbol appears on the Slage. 8CilooSe grefnline 'llong the equatorrotates yourinstance around the y Thecircular blue guide rotates your instance aroundthe z axis. 9a,ck on one of the guides-red forx, greenfor y.or blue for z-and drag your mou ... in dir.,.,l;on toyour instancein3D spac..... Youcall also click and drag the outer orange cin; ul" gUIdetofreelyrotate the instance in alllhr.....dir.,.,tions. FLASHCs..PROFBSIONAlClASSROOMINABOOK93 Changing the 3D Position of an Object Inaddition to changing an objfs rotation in3D spaa, )'OUmO""itto a spt'-cific point in3D sl"'ce. Usethe3D Translation tool,which ishiddenunder the 3D Rotation tool. 1Choos.e th" 3D Tr.Hlslation tool . 2 on yourA guide 011the insta"ce, 1his is a guide forthe 3Dtranslation. 1he re Conwrt to Sl"mool. 1When YOlllmporlla)'ers inanIlIuslralor fileas 1o)'ers,Flashrecogu;zes the layersin theIllustrator document and adds Ihem as separate bl'ers intm- Timeline. When )ou imporlaskeyfrol11es.Flash "dds .. "ehIllustratorla)'er 10 a st'p''''le frameinthe Timeline and crealesfor them. 4The lransparency of an ;n,tallcdmore-----as.ic' ",,""ique of ""'ling ....""'tion with .ymbol ;"'lO"'.... ' dobe FlashCS4Profe ssionalClassroominalJ.ook To b l4of Conto nbInduExo mpl.. .....,. .,.UTYW W " Getting Started Startb)'the f"'ished mo\-;ef,leto...., the a"illlatt'ci page that)'ou"U create inl lus lesson. 1Doublc-dkl the 0.1 End ...... f fileillthe Le.sonOHO-l[nd folde, to play the animalion. The project is"" animated .plash page for as00lHo. be_rel ..."""d fictIonal motion picture,In this lesson. )'0,,'11usemotion tWet'Il' to ""lmale ...'-eral onthe p.1ge:the cityscape. rtwmain actors. se"en,1o)d. (ashionetion 1Locl allthc existing lay..", soyoudon't .ccid.. ntalll' modify thcm. Crcate ant"W la)"er abow the foole,1,))'OMINA BOOK107 TIM ...... 1"" lasl inIhe motion Iween remains al frame 60, but additional frome. added \0 (r."ne190. 14inoInlliO17011i1110Iii Mddlo_c_X Rig/d..CArX X . X . X . CO " X .-t====::::;============= X... Not. :Youcan aho addby choosiro:;JIn .."> Ti"""'..., > F'an\@(HI or ,emo"" individual I,.""" by chooslro:;JEd it> TomeIi ... >(ShiIHf S). Movi ng Keyframes When you did on amolion tween on the Timc1ine, the entire span isselected. This allows )'OU10 mo,'eIhe enli .....mOlio"I"'..... "(or"'Md or back",,,,d in lime as a singleunit,However, if you ",ant 10 mm'e particular keyf,.mes "'ilhin amol ion tw.... n 10 change the pacing of the ""jmalion, t'OUh.,.., 10 selectindividual ("''''.. s, Holding downIhe Cui (Wilidowsj/CouHlland(Mac)willie! you select single frames Of a .pan of framrs within amotion tween. 1Ctrl.dick/Command.cl icl on Ihe kel'frallle al frame60. 1",1Ihe alfrome60is selc IOp-righl side of the Stage. the transpmentinslance ",ill be se!".,ted. SInIhe Property in'Pfftor. expandthe Filters seclion. 6Oick the filt ... rs bntton atbottom of the FiltNS section and sel""tBlur. 11", Blur filteris applied to the instance. -...._. _. -AOOBEflASH(\.4PROFESSIONAL(L.o\SSIIOOMINA BOOK1 1 3 No. r.You .M ..CIII , Inthe filters section of Property..,.IU '... ;nspet:tor, diLXelRlur filter is "pplied to the ,,"Ol\laniLl!;tancethroughout the motion t""""". 114tESSON4Adding..... "'... ion 9Right-cliclICtrl-clicl Oilwoman at 140 and choose Insert . .. -... ..,- ,. ,-c-t ......................' ... _.. _I'tt>ot". -'-.,, . Akeyframe forfilters is estabhshed at frame140. 10Mo'", the redpbyheadto Ihefmme160, 11SeI"':1Ilw i nSI"''':e of the WOmanOnI he Stage, 12Inthe Propt'rt)' inspe"fl(len, 01 each other and do not need to be t ied 10 ,he .ame keyframe . Tha, is.yoo can have a keyfrome lorpo$i,ion. a different keyfrome for the color effect. and yet a.,.,tll Transform) and ch:mge the ..:ale of lhe Carto about 29.4' _ 9Movethe car to its slarting position at aboutX. 71 0 and Y. '188. 10Int!...Pro]X'rty inspClor . .scieelAlpha for11>("ColorEffect_ 11Setlilt- value of I h" Alpha 100'1,,_ The car bffom"" totally transparent. .....1- 12Right .dickICtrl_dick on the car on the Stage and ..,Ieel Creale I>10tionTWffn. lhe current la)'er bedig t .... , you , Flash ash ),ou if youw"m to replace the existing object with anew object. Do)'O\lwish to " pi... . ".. ..io'''' _n I. ,I/O! - , __UD o n ~ _ _In. 1aick OK. 126LSSON4Addil'l!l..."1""",,,, 41"" roch-t ship is replacedwith the alien. The mOl ionrem,,,,, the same. but the target of the motion twee"has Mn "",.pped . Not.:You ollomof I> lotionEditor 10 change Ihe numbO'rof framesthat appear inthe tnnel ine.Sellhe Vie",able frames "alne to maximum to....., the motiont,,'cell , I , AOOSEFLASH( \.4PROFESS'ONAl(U,SSROOMINA 900K133 8dick and drag ExpandedGraph $iu icon al bottom of Malian Ed ilor to d,.nge Ilw heighl of eocll SkM. 57", ""W .,

.. El"Ihi ... I ., . ,,"lolL r....... lhe bKe}'f..."m{>10dd{>t{>" ke)fr.me. Select"and did, the rellow diamond to delete the ke)frome. Shifldick to selectmultiple contiguous ke),fr.m", andmow 1hem IOgel her. 136lESSON4Adding",""",toon Resetting Values andDeletingProperties Okk the Reset buuon to rest'tpropOOSt'the Sek'ction tool. 140LSSON4Adding..... malion 7Mo'-ethe car down about OJ pixels. Flash creates" smooth annnation of the car mming down slightly. 8Click on the motiontw""n i"the Timelin.. and ope"the ,\lotion [dno. 9Click the Plus button Onthe E."", category ,,,,d choose Random_ --._-". 7 --.-.----" - ~ " 1io1 1"" Random preset ease appears_ , , _(I' u ~ ( I ' " ,.. t) , ...... _5 Play.Youcan alSdl T""lbars > Controller to display acontrollerpand with buuons to atldpb)" )'o"r Timdine, Howe'er, to preview your animation as ),our willsee itand to pr",iewany nested Conc.roller tH ""imations within elil' s)mOOI!;.rou sllO,,\d )'our nlO';';'.Control > TestMovic. Flash exports a SWF file""d sa...,s it inlhe same location as )"ourFlA ftle,"[he S\VF (rleis the comprtok '" Getting Started \' ou'li startthe lesson by Ihe a nimaled cr.lle thaI)'0,,'11create as you learn about arti(ulatwmot;on ""d Il\orphing inFlash.You'll.IS(> beanimating a tentade of an octopus, 1Double-dick the 05End,swf fileinIhe lesson05105End folder10pia)'the "mmalion.Double_clIck the 05SMpei K_End.swf to pia)' thaI animation as well. lhe firstprojectis an animat ion depicting acrane ""oTking at Ihe seaside dock. Inthis lesson. )'ou'li "nimate the crune arm as wellas the smooth mOTionof the waws. Th" other Pl'ok!ance. 1 S4LESSONSArtkua.to Tesllllo,ie. 1he crane "tHtHales.tHo,'ing allits cmne segments to tHOWfrotHone pose 10 the nut. Not .:Y",,l,d. Thebone and allthe bones Cllrleee within a sh.pe and the Fr...,Transform tool call1I10"e or rotate the entire armature. 1Choose the Sub...lectiontool. 2C!.cl 011"joint. 1Click and drag the ;oint within the shape to ane",location. Ho :Add '-points onconlou, "hc..Add Anchor Poinl tool. Do>tete1>""on the o:ontour of the >hapo with the Delete Anchor PoOn.lOI. AOO8EFLASHCS4PROFESSIONALCU.SSfK>OMINA BOOK17S No : additional _.0 YOU' C"""",, ",.,001OM Timeline >Keyframe (F6). A ne'" kerframe is inserted atframe56.The contents. of the pre'ious keyframe 'Ire copit' Shape> Add Shape Hint. 1I10\'e the fi",t . hap" himto the edge of the shapc.1II0\'ethe pkl)'head to the finalke)frame andmow corresl>olIdinS shape h;nl10 a matching en"'ill1"'0 .nd ,half hou", 10 ",mplt'le. If Ilt"t'dctI. rt'moo"the fold", from)'OUt ilJrd d.",., and copy thtLt"",n06 fold", onto It. YOU' """'Of' YOU'and Bunonand Ae.,n set and a pleasan! gradient shape has been addedill. laye, Adding a Simpl e Design El ement You11create a black recla"gle th"t"ill serw 10 \';sually sep.,,.,te tile t itleand the na,' bar fromthe main conlent, 1St-Ieclthe existing la)"er_ 1Oick the InsertNewbutton 'lnd rellame it na"bar_ 1Inthe Tools pan"l. selecttheRectangletool . AOOBEFLASIiCS4PROFESSIONALCLASSROOMINA BOOK197 / J. '9 .. -&. " {7 0 "-/ & tl Sel""t ablack filland black for a stroke color. , Draw arectangle on the Stage starting atthe top corner of the Stage. 6Inthe Propt'rty ;n"p,,(10n. y ou'JIunderstand Ihe relationship bel"'""n these ke)framcs and the button "ppear_ ance as you work throughIhis lesson, 1a.oos.,Insert > New Symbol. 2I n the Create New Symbol dialog box, selectButton a nd namethe spnbol butt on I . Click OK. ---- .-I': ADOBEFLASIiCs..PROFESSIONAL(U."ROOMINA 201 3flashbrings youto symbol-editing mode (oryour new bunon. 4Inthe Up keyframe of the Timeline. drag the small image Photol .bmp fromthe to the middle of the Stage_ S inthe Prop"rty insl>{'K.. yframe. A ne .....ke)"fram .. is inserted inIhe Ow. k.. yfram .. of lilt-top larer. 9Dnlg the )"ello ....l i" ..mO"ie dip symbolfromLibrar}' to the Stage. 10I n Propert)set theX '";llueto 0 andthe Y ,'"I"e to ,7. 1he r d10whorizontalline appears o\"erIhe thumbnailimage"'henc'"cr the mOuse (ursorrolls o"er llwbutton. 11Sel....:tlIwDown .erfnnne and chooseInsert > Timdill" > K.. yframe. AD08[FLASIi(\.4PROFESSIONAL(UISSIIOOMINA BOOK203 12set""t th" ),eBo",oorizontal line.andinthe Property ills(>fftor. expand the ColorElf",,(5t;on. 13O>oo,;eBrightness frornthel'"lI -do"'n and change the brightness " . 1"" to100".. .,-- -t...' "....M .. ........-_-- ' . . 1 -A bright.hori',on{. ll in" ",hene,"er 1he'HOUSbuno{1is 1>r BlankKerf",me. lhe sound of a came,ashuller"'ill play on!ya "iCWNclicks the bullon, 19Chck Scene 1 .l>m'e the Slage to exit symbol. edlilng mooe and return to the main Timetin".Yourfirstbullon symbolis complet e!Lookin),our 10 Sf:onal rerr'Wndet-s. Instance nami"9 followsthese .imfJIe 1111",,: 1Donot use spac"" or special Pl.OCIllatOon. Underscor"" are okay to ",e. ZDonot begin. name with. numb...-. 1End)'OOr buS('AClionScriptfor suchsimple 'ash:ls stopping a" animation. Youdon '[ 1\;,,-.,to be a scripling expert to uscActionScript.I n fact.forcommon I;1S".you ma)' be able 10 copy scriplIh.t other Flashusers h."t' shared.you'llbe able to accomplish much more inFlash-and feelmore confidentusing the application- if )'OUunderstandhow Al1ion$cript"'ork.. lhislesson isn'l designedto make )'OUan ActionScript expert.Inslead, itintro duces cOnnnOn"nd syntax, walksyouthrough a simple scri pt, a"dpro"ides an introduction 10 tl ...AClionScript lansu.lge. If used scripting languages before,document,'liolli"cludebIenamesan hei&htand width, xandy coorxhnates. and scale. Many properties can be changed, ,,-here .. ot her properties can onl)" be "read." me.ning the)' simply descnhe Ihe obie Actions). 1Inlh.. Scriplpane. enl.. rstopO : I1t0l>(): lhe .. "PI>'!""inthe Scriptpane ,,,,d a tiny lowercase ' ". app.,a" in lhe lirst k..yfrnme of the actions tarer to indicate itcontains 50IlIeActionScript, 1he mo,-ie ...-i11no,,"stop atframeI . .- . li)00I_ ADOBEFLASH(\.4PROFESSIONALClASSROOMINA 800K217 About Script Assist Some aaion. areSIKh '" ,top action . BlIt .... requi,,, pilfamel ...., and if )'o.be unf.miliar wilh ActionSuse_HoweveControl > TestI\!o\'ieand dick any of the buttons. !'..lehbutton on the top rOWmOWSthe (0 Test Mo,ie. 11> ..functionalit) of your inlenlCti,c mo\'ie remains thebutfUlure e)' '''001 SOthaiilem proceed with the motion I"'''''''. Click OK. _N .......................... "",'....... .. _'''Il10 '................... _00_ -,................... _. 1Inthe ('ropt'rt)- inspeKond "ooto.tho pt'('ificframeon Ihe Timelirw and begin playing fromthaIpoint. 1SdK' 1 the lirstfranw of lhe aClions la)'erand Opt'llI he Actions 2InyourAClionSe,ipl code. change a n gotoAndStop 0Comma nds 10 gotoAndPI ay 0(omI1H'nds, I.ea"e tlwparameler unchanged, got oAndStop("1 abe 11"); got oAndStop("1 abe12"); '10toAndStop( "I abe 13 ") ; got oAndS top(" 1 abe 14 ") ; got oAndStop("labe 1 5"); got oAndStop("1 abe16"); ,ho55ldbc ch,,,,ged to gotoAndPl ayC' 1 abe 11") ; should bc changed to gotoAndPl ay(" 1 abe 12 ") ; shaul,] be ch'''ged 10 gotoAndPl ayC" 1 abe 13") ; should be ch'''ged 10ay(" 1 a be 14 ") ; sho55ldbechanged to gotoAndPl ayC" 1abel 5 ") ; should bechanged to gotoAndPl ayC' 1 abe 16 ") ; AOOBEFLASIiCS-4PROHSSWNAln .... SS!lOOMINA231

....t.(ll( .... I_tl..._\_l(....... '_,fI' .... )' ...( Ft_loy( -I_U- ), , otftlJO_ SQIoO.- , .. -_. _.- , .. If }'OUt est)'our now (Control > Test'\\O\'ie),you'll "'" that eachbutton goes toits corrt'Sponding fr"me label and playsfromth" tpoint, butitk e ps playing. sllOwing alltheremaining anin,ations illthe Timel ; ne.1hene:oct step is totellFl ash when to stop, 2]2LESSON 6 Int ....ti .. NMetwnslayer. Youhaw sel Test,\ Imi ... ", Each button lakes you 10 adifferent kC)'frameandplaysa short animation. AI Iheend of Ihe anima lion. IhemO"i .. SlOps andwailSfor)"OU10 dick anolher bU11on. Not . :If you wanta quick at>d 10 duplicate ",,, key/r.me >nt.ini"!! the stop r;ommond. J>OIddown the ''It/OptiooL Not e:)'00 '"''''''ted 1>tJtton to ploy ito iK1imation only once, you mmt add. ,1"1' comma"" 3ttn. .. "" I't"'" clOp',AOOBEFLASHCS4PROFESStONAlCU.SSfIOOMINA BOOK235 Review Questions 1Ho'"and wllere do )'OUadd ActionScnpt cod.. ? 1How do youname an inSI.nce, and whyisilne S.we As.Name the file07_wo.killilcopy. na, anditinthe 07St31'tfolder. $al'ing acopy ensur", that the original start filewilll>e al'aibble if )-oU.....""I 10 start o"er, 240LESSON1Wo"",oqwith'>uAd.AdVi In'I>ortTo Libraq. 2Sel""ttheMonkey,"""fileintheLl'SSOn07/07Start/ Sounds folder,and did Open (Windo"'s) or ],"I>ortTo Librar)' (Mac OS). TI,e file "pl"'ars inyourLibnrry_The sour,,1 me isinciie;'tedby a unique icon, andthe pre"iew " ';ndow shows awa .... form-a ""ril'S of peaks and "aUeysthatrepresent th" ,"",und. 6,,,"-242tESSON7Wofi_, ........ '10.........10,"',,__ '_._11.... ' .... ... ..... _........... .. C ",'n"'" " ,''-_____"'", .... _--,-." ..... -I C_ ) 1--1 C'''' ") (- 1 , __ ---------II S0.00,;., File > Impon> I"'port To Library andthe othersound filesto importinto )"ourFlashpro'''''t.ImportElephant...-, Lion."ay. Afric"nbe.t. I11p3.and Afrolahnl> Timeline > Frame, or FS.to insertframesin "li the layers be!"'""n fram"" 1 and 9. 1I """,t enough frames SOthat the "ntire Timeiine ute"ds to frame SQ, .--.-.--.-,, ',-4Choo"" Control> T ""t ,\.]mie. l1>e sound lasts longer bemus it has Illore fromes to play \>unQ.1IdVoddiuIlSmode for that bunon symhol. 2"There are thr ......la}'''..,;in buUon symbol to help orp"miu the conten' forthe Up.O,'er, [)own. andHit ke)frames. 3Insert a new larer andrename It sounds. 4SelectI heDown {",me inyour sound, byer andinsert a A new keyframe appears inthe Down S'"k of your buUon, ...''',' "'" 254LESSON7_'ogSound. ... Ykloo 5Drag the I\I0nkey.wa, lilefromthe sounds folderinyour Library to the Stage. A w",'dorm forthe Monkey.w", fileappears in the Downkeyframe of the sounds. .-.-...T... ...".... .. 6Selfft theDown 1e)frame inthe sounds !a)er. 1InthePropert) inspector. choose Slartforthe Sync option. --- -- . . AStartsync oplion triggers Ihe sound whenever the playhead enters thai I,arlicular 8CI>oose Control> TestMO"ie.restthe firstbutton to hear themonke).and then dose Ihe preview window. 9Edilthe soun'tbutton2 and the soundbutton3 to add tl\{'Lion.wav andElephant.w", sounds to their Down fram .... Understanding Sound Sync Options Sound sync refers 10 way Ihe sound Ist riggeredand ptayeateelect",,! the filein the dl..p"y Iht and cl>:>o>ingEclil> RHeI Seieeck from. comple.ed file '" IIcan be """oded again, _ea, Sl blX'rt Settings.11, ..Export Settings dialogbox appears. Croppi ng Your Video If you Dill}'"'ant to silo,," aportion of your \'ideo, )'ou can crop it.ChooseEdit > ReSICtStatus toreset thef'""suins.mo' file SO)'OUon Hp.'riment with th" aop" ping settings. 1aick the Crop bUllon atthe upper-left co,,,er of the Export Sethngs dialog box. The Crol'l'"lg box apl"'ars owr "ideo "rev;ew window. 2Drag Ihe SIdes Inward 10 crop fromIllelOp.bottom, or right. The gray TestMo\'ie. Clkk Ihe MagellanicPellguills button. 1he video inlo )'our Flashftle.UseIhe conlrols to pia),. SlOp. and change Ihe ,'olume for lile mo\';e. Close Ihe pr"";",,, window. 270LESSON7Wo,' "-ant to lI5OOSe.Selt"Ctthei>ol'up.HvmeinLe-sson07107Sturt and click Op,m. 6SelectLoadexternal ,-i deo with playbackClick Next or Continue, -" ..... --l /UM""'KVIO>/Do"!;a tr ipod il possible. 2Remove the background i n Att file tof lash Vidl!(l IFLV) lormat dirooly Iwm Aft ... Effects. Se slJre 10 .elect Encode Alpha Channel. The alpha channel i. t he .eI...-:tion a,OUI'Idthe ,ubjecl. EncodIng the alpha channel eo""... thai lhe vide exports background. 276LESSON7 wilhSGund .... V> TestMo\';e to set the \';deo (,I .. th" u",. alpha channel., GOSt'the pre"iew window_ Embedding Flash Video Embt'o lab and .el th(- Fr.'n'(- Rale to12,,\ lak(- sure I hat 1heResiz(> Video checkboxisunchecked. ,. " 'lhe Flashf i l ~07_ .....orkingcop)'.flais""I al12framesp"r ","""ond.so ),ou.....ant ),our FlV 10 ;tIM>l}f :II12 f"Hnes pt"SIrnd.orestMovie 10...., Ihe embedd.-d "idt"Ofilepia)'from frame1 10frame 35, Using Embedded Video ItsUSEful to think of embedd.-d'ideo as" multifrome 5)"",1.>01. wr)'nluchsymbol ""ilh alK"St.-d animation.You can COIl'"ertan embedded ,-ideo 10"mO"ie dip 5)'mbol. "ndthen motionI .......,nil10inlnesl ing dfo:Pd . CS4.. ___ ..::::::__ _ Getting Started \' ou'li use components toan interacth-" display of minerals. Whenthe ' -;ewerthe image of a ,niner.!.text aboutilYou'll start b)' viewj"I! the finaldocument. 1Double-dick the 08End.swf flleinthe l esson08I08End fold .. , . 2Oick anin",g ..inthe grid on the left.The lUI on the righlch""ges_ Introductory texl appears althe top of the screen . .... -._-_ ..... _.. ' . --_ .... _._.'--- ..... _.__ ..__ ... You'llere.>leth,.,.. components: Onefor the introductory text. OlleforIIw grid, and one forthe mineral text.You'lluse ActionScript 10change the text dIsplay whenthe viewer clicks an image, l aoS(' the 08E.nd.swfflle. 288LESSONSU,C" 4Double-click the OSSlart.!b fi le inthelssonOS/OSSlartfold,rto openilinFbsh, 1"" Flashdocument contains the b.lckground image. SChoo>.eFile > SaveAs.Name tlw file08_ workinp.copy.tl a and 5;>...,itinthe OSStartfolder. S""ill& a working copy ensures that the original slartfilewillbe avail ableif youwantto start over. 6Open the 08nd.fbr,leso youcanreferto itwhen YOIIere"te ActionScripl. About Components Components are prebuiltmm';e clip s)'mbol. with defInedl>arameters that rou can use to adduser interface elements. SllCh as buttons. ch"",k boxes. or seron bars. to you, document. YonCO"modif)' 111"l>a,ameters 10 chang.. :l component's "1'1'oxusi"Il" TextArea component fro,nthe Corupon.. "ts I,"uel. TIlisis" simpleliSerinterface element thaI docsn'l r CO"'l>o"ent< to 01"''' the Components panel. No :WhIch com""""",l>.,e i>1ed in theComponenUdepend. on'he -.ion of ""'IioScfipt wecifled in Documen. Setling._A.dtxumenluseonly one...-..ion of ""'''onScript. Tt., book "'", AclionScfipt 1.0290LESSON8Uslf>gComp.....," 4SeI TestMovie.lhe text appears, and if you clickinthe text area, ""n edit il . Add delete text. and change some of the existing textto see what happens. 294LESSON! Comp ......" 111" T erlArea component automatica1l y adds a scro1lhar if thetext exceeds the size of Ihe component that you define on the Slage. 10Gose Ihe p'''''ie''' window. Modifying a Component's Parameters 'Ihe introductory lext shouldnolheeditable forthis ''''''ple project.\"ou'[[ change uSing the InSpolclo, tot h"t t hetextisnol edilable. 1Sdect the TulAre. components on the Stage. 2Choose- Window > ComponentInsPfftor if the ComponentIolSPfftor is not "lre.d) 0l"'"n. ]G,ck the editahle parameter andselect fal50Cso that Ihe le,t can't be changed. - ---- -.0 ,""II ----- -- --, 'Ie ADOBEFLASIiCS4PROFESSIONAL(t.J.SSl!OOMINA BOOK295 4Choose Control> TestMovie,The texlisno longer edilable, sClose the pre,-iew window. Using Components to Create Interactivity AClionScriplin conjunclion wilhIhe pre made componenls lei)'OUcreale mOre complex user i "terface elements. You'lIlIS@eline youjust typed in slep Jandpaste it14limes 10 create lines for ""ch ofl he olh"r minen.I . 6SubSli l Ihe appropriate . lname forIhe lab,,]"nd SOurcelileinline: Gmnite.Basalt, Scoria,Rh)'olite.Shale.Brecda, Sandston", Conglomerate, Limestone, Slate.Marble, Quarlzile, Gneiss, Schist. W]..,,,youtest your mm'ie, all14 of Ihe thumbnailimages shouldbe displayed inI hecomponent. [a,h I te .. 0command 'ligIeline, _"CMf""." -I lIM ""''''..... .- .. ... " - ... ... ... ... ... 304tESSON !lI" m;ght M ... mi ....... f,..;Z1/the "'=000. panet. IYhen the te.t renow.. ti .... ef"idir>ggComp ......" VIM Co mporwnl> I!I! f l VP .."",,,, flVP"ybodP"irlinIl tJD8>dson09fold(', onto it . :, jII!II.I! USleo, ",,1 ___); " " " " ............1' "" .... ( ......"',-..._0)".,. ( .''''''100:.... _); -'-"'._'00(; .,._00(1); _"-"'._'0)'cie>, lola s):.. ...., do no' '''''''9''i.,. str TeslMO\'ie, AsIhe mot iontweenprocee"enas.1is10ad ... 1 into anolherFlashmO\'ie. 324LESSON9LOdioq>lid(on"oOl"9n.,h (ontoo. Review Questions 1Ho"" do yOtllood externalflash content? 1What arethe advantages of load,ng externalFlash content? 1How do)"Otlcontrol the Timeline of a "W";e di" iustancd 4Whatis a mask and how do you create one? Review Answers 1Youuse ActionScript to 10.1dexternalFlashcontent. You create two obj.,.,t" aLooder and aURLRcq"esl_l1,eURLRequ('5tobjoct sp ..Ie 0< M. prcjtCf\.bOl ity, Of "\Ii! Ira."... fr"'" the ."''''''tien., __ fil es. AdobeCS4 InBook , m " Getting Started Inthis lesson, lOU ']Ipublish an animation thathas already been cOlllplet..-d. "lhe project is ananimated titlejklge for a cartoon aboutan 1,I,en crealure,You'llpub lish the mm'ie foraWeb site. capture splo,)'OOardforproi [)e(,,,,1t(HTML) to export aSWF fileand an HTIII). Iilere Testo\Iovie. Flash exports a SWF and displays )"ourmo\";"in anew window. 20\00'" View > BandwidthProfile . -_no._ ...... ,,_ 11"'.'_ ...."... ",,.,,. - .,.. ~ " , - , ~ - .,..,. "... -3 ]0LESSON10P'ublihed file bytYP'r>g a Neoam@in ,roebo"",- You tbuttons forthe Aud,o Strea", andAud,o henl 10incre.se Ihe quality of the audio compression. _......... "J' ...... "..... ___ ... "u ...... ... 336LESSON10 fl.,h Il- Publish Settings if the Publish Settings dialog boxis not already """" 2 the HT.\ IL tab inthe Publish Settings dialog box. )Seleh,...,.,;., with ""IIooSc'i!>I l han to "-"y 0f1t he Playl