Cov txheej txheem:

Yuav Ua Li Cas Preloader hauv Flash: 5 Kauj Ruam
Yuav Ua Li Cas Preloader hauv Flash: 5 Kauj Ruam

Video: Yuav Ua Li Cas Preloader hauv Flash: 5 Kauj Ruam

Video: Yuav Ua Li Cas Preloader hauv Flash: 5 Kauj Ruam
Video: How to Install Windows 10 Full Details Hindi - Urdu - 100% Working 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Ua Preloader hauv Flash
Yuav Ua Li Cas Ua Preloader hauv Flash

Kuv txiav txim siab ua qhov no vim kuv tsis tuaj yeem ntseeg tias muaj pes tsawg tus neeg nug, "omgzorz kuv ua flash li cas! 1 !!! ib!" Nws yog tiag tiag thab. Yog lawm, cia peb pib ua. Cov khoom koj xav tau: Flash (Kuv siv CS3, tab sis koj tuaj yeem siv MX-CS4) Lub khoos phis tawj Ib qho kev sim ntawm flash/daim ntawv theej tag (uas koj tuaj yeem tau txais ntawm no) Pom tseeb, qhib Flash thiab ua Flash tshiab. Kuv siv Actionscript 2, BTW.

Kauj ruam 1: Ntxiv Txheej

Ntxiv Layers
Ntxiv Layers

Ua ntej, peb yuav tsum ntxiv 2 txheej rau lub sijhawm. Ib lub npe "Ua" nyob rau sab saum toj, thiab ib lub npe hu ua … "Ntawv" lossis "Bar" lossis "Khoom". Tom ntej no, peb yuav tsum tau ntxiv ib qho Keyframe rau txheej Ua, thiab ib tus ncej rau lwm txheej. Tom qab ntawd coj Cov Ntawv Cuab Yeej (T), thiab xaiv Dynamic Text los ntawm lub npov nco hauv lub npov khoom, nws tej zaum muaj "Cov Ntawv Zoo Li Qub" xaiv lawm. Tam sim no, kos lub duab plaub nrog Rectangle tool (R). Xyuas kom tseeb tias tsis yog dawb. Ua kom tiav cov duab plaub uas koj nyuam qhuav ua Movie Clip los ntawm txhaj rau nws ib zaug thiab nyem F8. Npe nws, thiab xyuas kom tseeb tias "Movie Clip" raug xaiv thiab Cov Ntawv Sau Npe nyob rau sab saud sab laug ua ntej koj nias OK. QHOV NO YOG TSEEM CEEB NTXIV Xaiv cov yeeb yaj kiab uas koj tau ua, thiab hauv lub thawv khoom, koj yuav pom lub npov ntawv uas hais tias "Lub npe tam sim". Ntaus hauv loadBar. Nias Enter. Then, xaiv Dynamic Text box uas koj tau ua yav dhau los, thiab nqis mus rau hauv Properties Box. Koj yuav tsum pom lub thawv ntawv lub npe piv txwv dua, nyem rau nws. Lub sijhawm no, ntaus hauv textBox. Nias Sau.

Kauj ruam 2: Coding Sijhawm

Sijhawm Coding!
Sijhawm Coding!

Tam sim no, mus rau "Ua" Txheej. Nyem rau thawj kab ntawv. Nias F9 thiab TYPE hauv (TSIS TXHOB luam tawm thiab muab tshuaj txhuam, koj tub nkeeg. Yog tias koj ua, koj yuav tsis paub qhov no tiag tiag, uas yog lub ntsiab lus.): Feem pua = Math.round (getBytesloaded ()/getBytesTotal ())*100; textBox.text = feem pua + "%"; loadBar._xscale = feem pua; Kuv yuav piav qhia kab ntawv kab ntawv no los ntawm line.percent = Math.round (getBytesloaded ()/getBytesTotal ())*100; Tsim qhov sib txawv uas faib cov feem pua ntawm cov nyem ntsaws twb tau los ntawm tag nrho qhov loj ntawm cov ntaub ntawv nyem, tom qab ntawd muab nws sib npaug 100 thiab muab nws puag ncig. textBox.text = feem pua + "%"; Qhia qhov feem pua sib txawv hauv lub npov Dynamic Text koj tau ua.loadBar._xscale = feem pua; Hloov x teev ntawm lub duab plaub raws li feem pua.

Kauj Ruam 3: Coding Ntau

Ntau Coding!
Ntau Coding!

Tam sim no, nyem qhov Keyframe thib ob ntawm txheej "Ua". Nias F9. HOM qhov no ntxiv. Tsis txhob theej thiab muab tshuaj txhuam, koj yuav tsis kawm nws. Nws tsis yog ntau npaum li ntawd. Tub nkeeg bum.if (feem pua == 100) {gotoAndPlay (3);} lwm yam {gotoAndPlay (1);} Piav: yog (feem pua == 100) {Qhov no hais tias yog (mob) qhov sib txawv feem pua yog 100 (flash ua tiav kev thauj khoom), tom qab ntawd … gotoAndPlay (3); Mus rau Ncej 3.} lwm qhov {Yog tias cov lus hais tsis yog qhov tseeb, tom qab ntawd … gotoAndPlay (1); Mus rau kab lus 1.} Kaw qhov yog nqe lus. Txoj cai no ua rau "voj" kom txog thaum lub nyem nyem puv. Yog tias qhov sib txawv feem pua tsis sib npaug rau 100, nws tseem rov qab mus rau ib tus lej kom txog thaum nws yog. Nws zoo nkauj heev tsuas yog txheeb xyuas yog tias lub flash tau ntsaws kom txog thaum nws yog.

Kauj Ruam 4: Ib Kauj Ruam Ntxiv …

Ib Kauj Ruam Ntxiv…
Ib Kauj Ruam Ntxiv…

Tam sim no, tsuas yog xaiv tus ncej 3 thiab nias F6. Ntxiv koj cov ntsiab lus, txawm tias nws yog kev ua yeeb yaj kiab, lub vev xaib, lossis duab. ZOO TSHAJ PLAWS! Koj tsuas yog ua tus preloader!: D

Kauj ruam 5: Ua tiav

Ua tiav!
Ua tiav!

Txaus siab rau koj lub preloader, tawm tswv yim txog qhov no zoo npaum li cas, lossis nws phem npaum li cas. Qhia kuv txhua yam teeb meem uas koj muaj txhua lub sijhawm. Tus nqi, thov.

Qee qhov tuts uas yuav los tom ntej yuav yog… huag, kuv tsis paub. ua kev ua si. ib lub website. tsis muaj leej twg paub… Ua tsaug rau kev saib!

Pom zoo: