Posted By

bradvanspriellgmailcom on 10/15/10


Tagged

variable


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

sexyflash


Variable declaration and use


 / Published in: ActionScript 3
 

example of a Variable declaration and use

  1. //Declare my variables;
  2. var photoCounter:Number = 1;
  3. var totalPhotos:Number = 11;
  4.  
  5. function nextPhoto(e:MouseEvent)
  6. {
  7. if (photoCounter != totalPhotos)
  8. {
  9. trace(photoCounter);
  10. Tweener.addTween(this["photo"+photoCounter], {alpha:0, time:.5, transition:"easeOutQuad", onComplete:fadeInNext});
  11. photoCounter = photoCounter + 1;
  12. }
  13. else
  14. {
  15. Tweener.addTween(this["photo"+photoCounter], {alpha:0, time:.5, transition:"easeOutQuad", onComplete:fadeInNext});
  16. photoCounter = 1;
  17. }
  18. }

Report this snippet  

You need to login to post a comment.