We Recommend

Circuit Design with VHDL Circuit Design with VHDL
This textbook teaches VHDL using system examples combined with programmable logic and supported by laboratory exercises. While other textbooks concentrate only on language features, Circuit Design with VHDL offers a fully integrated presentation of VHDL and design concepts by including a large number of complete design examples, illustrative circuit diagrams, a review of fundamental design concepts, fully explained solutions, and simulation results.


Posted By

chrisaiv on 02/03/08


Tagged

as2


Versions (?)


AS2: Simple Preloader


Published in: ActionScript 


Let's say you want to place a Preloader in a frame before the actual Flash app or in a previous Scene, this is a really simple, ghetto way of doing it.

  1. var total:Number;
  2. var loaded:Number;
  3.  
  4. this.onEnterFrame = function()
  5. {
  6. total = _root.getBytesTotal();
  7. loaded = _root.getBytesLoaded();
  8. if(loaded >= total){
  9. delete(onEnterFrame);
  10. gotoAndStop(nextFrame());
  11. }
  12. };
  13. stop();

Report this snippet 

You need to login to post a comment.