Skip to content

Flash: Jak zrobić preloader'a?

Featured Replies

Witam.

 

Pytanie jak w tytule. Czy mógłby ktoś mi podać procedurę na zrobienie najprostszego preloadera (rozwijający się pasek + zmieniające się cyferki, od 0 do 100)?

 

Będę bardzo wdzięczny za pomoc?

  • Replies 1
  • Views 1.5k
  • Created
  • Last Reply

loaderInfo.addEventListener(ProgressEvent.PROGRESS, gdyZaladuje);

// dla nazwy pliku i nazwie "index"

 

function gdyZaladuje(index:ProgressEvent):void

{

text_txt.text = "ZAŁADOWANO: " + String(int((index.bytesLoaded / index.bytesTotal)*100)) + "%";

kwadracik_mc.width = (index.bytesLoaded / index.bytesTotal)*100;

}

 

Stworzyć tylko do tego dynamiczne pole tekstowe, jakiś kwadracik_mc i będzie działać :)

 

PS. ActionScript 3.0

Edited by AT7

Create an account or sign in to comment

Important Information

We are using cookies. Read about our Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.