ÿþ/ /   C r e a t e   u s e r   e x t e n s i o n   n a m e s p a c e  
 E x t . n a m e s p a c e ( ' E x t . u x ' ) ;  
  
 / * *  
   *   @ c l a s s   E x t . u x . S w f U p l o a d P a n e l  
   *   @ e x t e n d s   E x t . g r i d . G r i d P a n e l  
  
   *   M a k e s   a   P a n e l   t o   p r o v i d e   t h e   a b i l i t y   t o   u p l o a d   m u l t i p l e   f i l e s   u s i n g   t h e   S w f U p l o a d   f l a s h   s c r i p t .  
   *  
   *   @ a u t h o r   S t e p h a n   W e n t z  
   *   @ a u t h o r   M i c h a e l   G i d d e n s   ( O r i g i n a l   a u t h o r )  
   *   @ w e b s i t e   h t t p : / / w w w . b r a i n b i t s . n e t  
   *   @ c r e a t e d   2 0 0 8 - 0 2 - 2 6  
   *   @ v e r s i o n   0 . 5  
   *    
   *   k n o w n _ i s s u e s    
   *             -   P r o g r e s s   b a r   u s e d   h a r d c o d e d   w i d t h .   N o t   s u r e   h o w   t o   m a k e   1 0 0 %   i n   b b a r  
   *             -   P a n e l   r e q u i r e s   w i d t h   /   h e i g h t   t o   b e   s e t .     N o t   s u r e   w h y   i t   w i l l   n o t   f i t  
   *             -   w h e n   p a n e l   i s   n e s t e d   s o m e t i m e s   t h e   c o l u m n   m o d e l   i s   n o t   a l w a y s   s h o w n   t o   f i t   u n t i l   a   f i l e   i s   a d d e d .   R e n d e r   o r d e r   i s s u e .  
   *              
   *   @ c o n s t r u c t o r  
   *   @ p a r a m   { O b j e c t }   c o n f i g   T h e   c o n f i g   o b j e c t  
   * /  
 E x t . u x . S w f U p l o a d P a n e l   =   E x t . e x t e n d ( E x t . g r i d . G r i d P a n e l ,   {  
          
         / * *  
           *   @ c f g   { O b j e c t }   s t r i n g s  
           *   A l l   s t r i n g s   u s e d   b y   E x t . u x . S w f U p l o a d P a n e l  
           * /    
         s t r i n g s :   {  
                 t e x t _ a d d :   ' L ä g g   t i l l   f i l ( e r ) ' ,  
                 t e x t _ u p l o a d :   ' L a d d a   u p p   f i l ( e r ) ' ,  
                 t e x t _ c a n c e l :   ' A v b r y t   u p p l a d d n i n g ' ,  
                 t e x t _ c l e a r :   ' R e n s a   k ö ' ,  
                 t e x t _ p r o g r e s s b a r :   ' P r o g r e s s   B a r ' ,  
                 t e x t _ r e m o v e :   ' T a   b o r t   f i l ' ,  
                 t e x t _ r e m o v e _ s u r e :   ' A r e   y o u   s u r e   y o u   w i s h   t o   r e m o v e   t h i s   f i l e   f r o m   q u e u e ? ' ,  
                 t e x t _ e r r o r :   ' E r r o r ' ,  
                 t e x t _ u p l o a d i n g :   ' L a d d a r   u p p   f i l :   { 0 }   ( { 1 }   a v   { 2 } ) ' ,  
                 h e a d e r _ f i l e n a m e :   ' F i l n a m n ' ,  
                 h e a d e r _ s i z e :   ' S t o r l e k ' ,  
                 h e a d e r _ s t a t u s :   ' S t a t u s ' ,  
                 s t a t u s :   {  
                         0 :   ' K ö a d ' ,  
                         1 :   ' L a d d a r   u p p . . . ' ,  
                         2 :   ' K l a r ' ,  
                         3 :   ' E r r o r ' ,  
                         4 :   ' A v b r u t e n '  
                 } ,  
                 e r r o r _ q u e u e _ e x c e e d e d :   ' T h e   s e l e c t e d   f i l e ( s )   e x c e e d ( s )   t h e   m a x i m u m   n u m b e r   o f   { 0 }   q u e u e d   f i l e s . ' ,  
                 e r r o r _ q u e u e _ s l o t s _ 0 :   ' T h e r e   i s   n o   s l o t   l e f t ' ,  
                 e r r o r _ q u e u e _ s l o t s _ 1 :   ' T h e r e   i s   o n l y   o n e   s l o t   l e f t ' ,  
                 e r r o r _ q u e u e _ s l o t s _ 2 :   ' T h e r e   a r e   o n l y   { 0 }   s l o t s   l e f t ' ,  
                 e r r o r _ s i z e _ e x c e e d e d :   ' T h e   s e l e c t e d   f i l e s   s i z e   e x c e e d s   t h e   a l l o w e d   l i m i t   o f   { 0 } . ' ,  
                 e r r o r _ z e r o _ b y t e _ f i l e :   ' Z e r o   b y t e   f i l e   s e l e c t e d . ' ,  
                 e r r o r _ i n v a l i d _ f i l e t y p e :   ' I n v a l i d   f i l e t y p e   s e l e c t e d . ' ,  
                 e r r o r _ f i l e _ n o t _ f o u n d :   ' F i l e   n o t   f o u n d   4 0 4 . ' ,  
                 e r r o r _ s e c u r i t y _ e r r o r :   ' S e c u r i t y   E r r o r .   N o t   a l l o w e d   t o   p o s t   t o   d i f f e r e n t   u r l . '  
         } ,  
          
         / * *  
           *   @ c f g   { B o o l e a n }   s i n g l e _ s e l e c t  
           *   T r u e   t o   a l l o w   m u l t i p l e   f i l e   s e l e c t i o n s ,   f a l s e   f o r   s i n g l e   f i l e   s e l e c t i o n .  
           *   P l e a s e   n o t e   t h a t   t h i s   d o e s n ' t   a f f e c t   t h e   n u m b e r   o f   a l l o w e d   f i l e s   i n   t h e   q u e u e .    
           *   U s e   t h e   { @ l i n k   # f i l e _ q u e u e _ l i m i t }   p a r a m e t e r   t o   c h a n g e   t h e   a l l o w e d   n u m b e r   o f   f i l e s   i n   t h e   q u e u e .    
           * /  
         s i n g l e _ s e l e c t :   f a l s e ,  
         / * *  
           *   @ c f g   { B o o l e a n }   c o n f i r m _ d e l e t e  
           *   S h o w   a   c o n f i r m a t i o n   b o x   o n   d e l e t i o n   o f   q u e u e d   f i l e s .  
           * /    
         c o n f i r m _ d e l e t e :   t r u e ,  
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ t y p e s  
           *   A l l o w e d   f i l e   t y p e s   f o r   t h e   F i l e   S e l e c t i o n   D i a l o g .   U s e   s e m i - c o l o n   a s   a   s e p e r a t o r   f o r   m u l t i p l e   f i l e - t y p e s .  
           * /    
         f i l e _ t y p e s :   " * . * " ,                                       / /   D e f a u l t   a l l o w   a l l   f i l e   t y p e s  
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ t y p e s  
           *   A   t e x t   d e s c r i p t i o n   t h a t   i s   d i s p l a y e d   t o   t h e   u s e r   i n   t h e   F i l e   B r o w s e r   d i a l o g .  
           * /    
         f i l e _ t y p e s _ d e s c r i p t i o n :   " A l l   F i l e s " ,   / /    
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ s i z e _ l i m i t  
           *   T h e   f i l e _ s i z e _ l i m i t   s e t t i n g   d e f i n e s   t h e   m a x i m u m   a l l o w e d   s i z e   o f   a   f i l e   t o   b e   u p l o a d e d .    
           *   T h i s   s e t t i n g   a c c e p t s   a   v a l u e   a n d   u n i t .   V a l i d   u n i t s   a r e   B ,   K B ,   M B   a n d   G B .   I f   t h e   u n i t   i s   o m i t t e d   d e f a u l t   i s   K B .    
           *   A   v a l u e   o f   0   ( z e r o )   i s   i n t e r p r e t t e d   a s   u n l i m i t e d .  
           * /    
         f i l e _ s i z e _ l i m i t :   " 1 0 4 8 5 7 6 " ,                     / /   D e f a u l t   s i z e   l i m i t   1 0 0 M B  
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ u p l o a d _ l i m i t  
           *   D e f i n e s   t h e   n u m b e r   o f   f i l e s   a l l o w e d   t o   b e   u p l o a d e d   b y   S W F U p l o a d .    
           *   T h i s   s e t t i n g   a l s o   s e t s   t h e   u p p e r   b o u n d   o f   t h e   { @ l i n k   # f i l e _ q u e u e _ l i m i t }   s e t t i n g .    
           *   T h e   v a l u e   o f   0   ( z e r o )   i s   i n t e r p r e t t e d   a s   u n l i m i t e d .  
           * /    
         f i l e _ u p l o a d _ l i m i t :   " 0 " ,                             / /   D e f a u l t   n o   u p l o a d   l i m i t  
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ q u e u e _ l i m i t  
           *   D e f i n e s   t h e   n u m b e r   o f   u n p r o c e s s e d   f i l e s   a l l o w e d   t o   b e   s i m u l t a n e o u s l y   q u e u e d .  
           *   T h e   v a l u e   o f   0   ( z e r o )   i s   i n t e r p r e t t e d   a s   u n l i m i t e d .  
           * /    
         f i l e _ q u e u e _ l i m i t :   " 0 " ,                               / /   D e f a u l t   n o   q u e u e   l i m i t  
         / * *  
           *   @ c f g   { S t r i n g }   f i l e _ p o s t _ n a m e  
           *   T h e   f i l e _ p o s t _ n a m e   a l l o w s   y o u   t o   s e t   t h e   v a l u e   n a m e   u s e d   t o   p o s t   t h e   f i l e .  
           * /    
         f i l e _ p o s t _ n a m e :   " F i l e d a t a " ,                     / /   D e f a u l t   n a m e  
         / * *  
           *   @ c f g   { S t r i n g }   f l a s h _ u r l  
           *   T h e   f u l l ,   a b s o l u t e ,   o r   r e l a t i v e   U R L   t o   t h e   F l a s h   C o n t r o l   s w f   f i l e .  
           * /    
         f l a s h _ u r l :   " s w f u p l o a d . s w f " ,               / /   D e f a u l t   u r l ,   r e l a t i v e   t o   t h e   p a g e   u r l  
         / * *  
           *   @ c f g   { B o o l e a n }   d e b u g  
           *   A   b o o l e a n   v a l u e   t h a t   d e f i n e s   w h e t h e r   t h e   d e b u g   e v e n t   h a n d l e r   s h o u l d   b e   f i r e d .  
           * /    
         d e b u g :   f a l s e ,  
          
         / /   s t a n d a r d   g r i d   p a r a m e t e r s  
         a u t o E x p a n d C o l u m n :   ' n a m e ' ,  
         e n a b l e C o l u m n R e s i z e :   f a l s e ,  
         e n a b l e C o l u m n M o v e :   f a l s e ,  
  
         / /   p r i v a t e  
         u p l o a d _ c a n c e l l e d :   f a l s e ,  
                  
         / /   p r i v a t e  
         i n i t C o m p o n e n t :   f u n c t i o n ( )   {  
                  
                 t h i s . a d d E v e n t s (  
                         / * *  
                           *   @ e v e n t   s w f U p l o a d L o a d e d  
                           *   F i r e s   a f t e r   t h e   F l a s h   o b j e c t   h a s   b e e n   l o a d e d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           * /  
                         ' s w f U p l o a d L o a d e d ' ,  
                         / * *  
                           *   @ e v e n t   s w f U p l o a d L o a d e d  
                           *   F i r e s   a f t e r   a   f i l e   h a s   b e e n   q e u e u d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           *   @ p a r a m   { O b j e c t }   f i l e   T h e   f i l e   o b j e c t   t h a t   p r o d u c e d   t h e   e r r o r  
                           * /  
                         ' f i l e Q u e u e d ' ,  
                         / * *  
                           *   @ e v e n t   s t a r t U p l o a d  
                           *   F i r e s   b e f o r e   t h e   u p l o a d   s t a r t s  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           * /  
                         ' s t a r t U p l o a d ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d E r r o r  
                           *   F i r e s   a f t e r   a n   u p l o a d   h a s   b e e n   s t o p p e d   o r   c a n c e l l e d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           *   @ p a r a m   { O b j e c t }   f i l e   T h e   f i l e   o b j e c t   t h a t   p r o d u c e d   t h e   e r r o r  
                           *   @ p a r a m   { S t r i n g }   c o d e   T h e   e r r o r   c o d e  
                           *   @ p a r a m   { S t r i n g }   m e s s a g e   S u p p l e m e n t a l   e r r o r   m e s s a g e  
                           * /  
                         ' f i l e U p l o a d E r r o r ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d S u c c e s s  
                           *   F i r e s   a f t e r   a n   u p l o a d   h a s   b e e n   s u c c e s s f u l l y   u p l o a d e d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           *   @ p a r a m   { O b j e c t }   f i l e   T h e   f i l e   o b j e c t   t h a t   h a s   b e e n   u p l o a d e d  
                           *   @ p a r a m   { O b j e c t }   d a t a   T h e   r e s p o n s e   d a t a   o f   t h e   u p l o a d   r e q u e s t  
                           * /  
                         ' f i l e U p l o a d S u c c e s s ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d C o m p l e t e  
                           *   F i r e s   a f t e r   t h e   u p l o a d   c y c l e   f o r   o n e   f i l e   f i n i s h e d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           *   @ p a r a m   { O b j e c t }   f i l e   T h e   f i l e   o b j e c t   t h a t   h a s   b e e n   u p l o a d e d  
                           * /  
                         ' f i l e U p l o a d C o m p l e t e ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d C o m p l e t e  
                           *   F i r e s   a f t e r   t h e   u p l o a d   c y c l e   f o r   a l l   f i l e s   i n   t h e   q u e u e   f i n i s h e d  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           * /  
                         ' a l l U p l o a d s C o m p l e t e ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d C o m p l e t e  
                           *   F i r e s   a f t e r   o n e   o r   m o r e   f i l e s   h a v e   b e e n   r e m o v e d   f r o m   t h e   q u e u e  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           * /  
                         ' r e m o v e F i l e s ' ,  
                         / * *  
                           *   @ e v e n t   f i l e U p l o a d C o m p l e t e  
                           *   F i r e s   a f t e r   a l l   f i l e s   h a v e   b e e n   r e m o v e d   f r o m   t h e   q u e u e  
                           *   @ p a r a m   { E x t . g r i d . G r i d P a n e l }   g r i d   T h i s   g r i d  
                           * /  
                         ' r e m o v e A l l F i l e s '  
                 ) ;  
                  
                 t h i s . r e c   =   E x t . d a t a . R e c o r d . c r e a t e ( [  
                           { n a m e :   ' n a m e ' } ,  
                           { n a m e :   ' s i z e ' } ,  
                           { n a m e :   ' i d ' } ,  
                           { n a m e :   ' t y p e ' } ,  
                           { n a m e :   ' c r e a t i o n d a t e ' ,   t y p e :   ' d a t e ' ,   d a t e F o r m a t :   ' m / d / Y ' } ,  
                           { n a m e :   ' s t a t u s ' }  
                 ] ) ;  
                  
                 t h i s . s t o r e   =   n e w   E x t . d a t a . S t o r e ( {  
                         r e a d e r :   n e w   E x t . d a t a . J s o n R e a d e r ( {  
                                     i d :   ' i d '  
                           } ,   t h i s . r e c )  
                 } ) ;  
                  
                 t h i s . c o l u m n s   =   [ {  
                         i d : ' n a m e ' ,    
                         h e a d e r :   t h i s . s t r i n g s . h e a d e r _ f i l e n a m e ,    
                         d a t a I n d e x :   ' n a m e '  
                 } , {  
                         i d : ' s i z e ' ,    
                         h e a d e r :   t h i s . s t r i n g s . h e a d e r _ s i z e ,    
                         w i d t h :   8 0 ,    
                         d a t a I n d e x :   ' s i z e ' ,    
                         r e n d e r e r :   t h i s . f o r m a t B y t e s  
                 } , {  
                         i d : ' s t a t u s ' ,    
                         h e a d e r :   t h i s . s t r i n g s . h e a d e r _ s t a t u s ,    
                         w i d t h :   8 0 ,    
                         d a t a I n d e x :   ' s t a t u s ' ,    
                         r e n d e r e r :   t h i s . f o r m a t S t a t u s . c r e a t e D e l e g a t e ( t h i s )  
                 } ] ;  
                  
                 t h i s . s m   =   n e w   E x t . g r i d . R o w S e l e c t i o n M o d e l ( {  
                         s i n g l e S e l e c t :   t h i s . s i n g l e _ s e l e c t  
                 } ) ;  
  
  
                 t h i s . p r o g r e s s _ b a r   =   n e w   E x t . P r o g r e s s B a r ( {  
                         t e x t :   t h i s . s t r i n g s . t e x t _ p r o g r e s s b a r  
 / /                         w i d t h :   t h i s . w i d t h   -   7  
                 } ) ;    
  
                 t h i s . t b a r   =   [ {  
                         t e x t :   t h i s . s t r i n g s . t e x t _ a d d ,  
                         i c o n C l s :   ' S w f U p l o a d P a n e l _ i c o n A d d ' ,  
                         x h a n d l e r :   f u n c t i o n ( )   {  
                                 i f   ( t h i s . s i n g l e _ s e l e c t )   {  
                                         t h i s . s u o . s e l e c t F i l e ( ) ;  
                                 }  
                                 e l s e   {  
                                         t h i s . s u o . s e l e c t F i l e s ( ) ;  
                                 }  
                         } ,  
                         x s c o p e :   t h i s  
                 } ,   ' - > ' ,   {  
                         t e x t :   t h i s . s t r i n g s . t e x t _ c a n c e l ,  
                         i c o n C l s :   ' S w f U p l o a d P a n e l _ i c o n C a n c e l ' ,  
                         h a n d l e r :   t h i s . s t o p U p l o a d ,  
                         s c o p e :   t h i s ,  
                         h i d d e n :   t r u e  
                 } ,   {  
                         t e x t :   t h i s . s t r i n g s . t e x t _ u p l o a d ,  
                         i c o n C l s :   ' S w f U p l o a d P a n e l _ i c o n U p l o a d ' ,  
                         h a n d l e r :   t h i s . s t a r t U p l o a d ,  
                         s c o p e :   t h i s ,  
                         h i d d e n :   t r u e  
                 } ,   {  
                         t e x t :   t h i s . s t r i n g s . t e x t _ c l e a r ,  
                         i c o n C l s :   ' S w f U p l o a d P a n e l _ i c o n C l e a r ' ,  
                         h a n d l e r :   t h i s . r e m o v e A l l F i l e s ,  
                         s c o p e :   t h i s ,  
                         h i d d e n :   f a l s e  
                 } ] ;  
                  
                 t h i s . b b a r   =   [  
                         t h i s . p r o g r e s s _ b a r  
                 ] ;  
                  
                 t h i s . a d d L i s t e n e r ( {  
                         k e y p r e s s :   {  
                                 f n :   f u n c t i o n ( e )   {  
                                         i f   ( t h i s . c o n f i r m _ d e l e t e )   {  
                                                 i f ( e . g e t K e y ( )   = =   e . D E L E T E )   {  
                                                         E x t . M e s s a g e B o x . c o n f i r m ( t h i s . s t r i n g s . t e x t _ r e m o v e , t h i s . s t r i n g s . t e x t _ r e m o v e _ s u r e ,   f u n c t i o n ( e )   {  
                                                                 i f   ( e   = =   ' y e s ' )   {  
                                                                         t h i s . r e m o v e F i l e s ( ) ;  
                                                                 }  
                                                         } ,   t h i s ) ;  
                                                 }        
                                         }   e l s e   {  
                                                 t h i s . r e m o v e F i l e s ( t h i s ) ;  
                                         }  
                                 } ,  
                                 s c o p e :   t h i s  
                         } ,  
                          
                         / /   P r e v e n t   t h e   d e f a u l t   r i g h t   c l i c k   t o   s h o w   u p   i n   t h e   g r i d .  
                         c o n t e x t m e n u :   f u n c t i o n ( e )   {  
                                 e . s t o p E v e n t ( ) ;  
                         } ,  
                          
                         r e n d e r :   {  
                                 f n :   f u n c t i o n ( ) {  
                                         t h i s . r e s i z e P r o g r e s s B a r ( ) ;  
                                          
                                         t h i s . a d d B t n   =   t h i s . g e t T o p T o o l b a r ( ) . i t e m s . i t e m s [ 0 ] ;  
 	 	 	 	 	 t h i s . c a n c e l B t n   =   t h i s . g e t T o p T o o l b a r ( ) . i t e m s . i t e m s [ 2 ] ;  
                                         t h i s . u p l o a d B t n   =   t h i s . g e t T o p T o o l b a r ( ) . i t e m s . i t e m s [ 3 ] ;  
                                         t h i s . c l e a r B t n   =   t h i s . g e t T o p T o o l b a r ( ) . i t e m s . i t e m s [ 4 ] ;  
                  
                                         t h i s . o n ( ' r e s i z e ' ,   t h i s . r e s i z e P r o g r e s s B a r ,   t h i s ) ;  
                                 } ,  
                                 s c o p e :   t h i s  
                         }  
                 } ) ;  
                  
  
                 t h i s . o n ( ' r e n d e r ' ,   f u n c t i o n ( )   {  
                         v a r   s u o I D   =   E x t . i d ( ) ;  
                         v a r   e m   =   t h i s . a d d B t n . e l . c h i l d ( ' e m ' ) ;  
                         e m . s e t S t y l e ( {  
                                 p o s i t i o n :   ' r e l a t i v e ' ,  
                                 d i s p l a y :   ' b l o c k '  
                         } ) ;  
                         e m . c r e a t e C h i l d ( {  
                                 t a g :   ' d i v ' ,  
                                 i d :   s u o I D  
                         } ) ;  
                         t h i s . s u o   =   n e w   S W F U p l o a d ( {  
                                 b u t t o n _ p l a c e h o l d e r _ i d :   s u o I D ,  
                                 b u t t o n _ w i d t h :   e m . g e t W i d t h ( ) ,  
                                 b u t t o n _ h e i g h t :   e m . g e t H e i g h t ( ) ,  
                                 b u t t o n _ c u r s o r :   S W F U p l o a d . C U R S O R . H A N D ,  
                                 b u t t o n _ w i n d o w _ m o d e :   S W F U p l o a d . W I N D O W _ M O D E . T R A N S P A R E N T ,  
                                  
                                 u p l o a d _ u r l :   t h i s . u p l o a d _ u r l ,  
                                 p o s t _ p a r a m s :   t h i s . p o s t _ p a r a m s ,  
                                 f i l e _ p o s t _ n a m e :   t h i s . f i l e _ p o s t _ n a m e ,      
                                 f i l e _ s i z e _ l i m i t :   t h i s . f i l e _ s i z e _ l i m i t ,  
                                 f i l e _ q u e u e _ l i m i t :   t h i s . f i l e _ q u e u e _ l i m i t ,  
                                 f i l e _ t y p e s :   t h i s . f i l e _ t y p e s ,  
                                 f i l e _ t y p e s _ d e s c r i p t i o n :   t h i s . f i l e _ t y p e s _ d e s c r i p t i o n ,  
                                 f i l e _ u p l o a d _ l i m i t :   t h i s . f i l e _ u p l o a d _ l i m i t ,  
                                 f l a s h _ u r l :   t h i s . f l a s h _ u r l ,        
                  
                                 / /   E v e n t   H a n d l e r   S e t t i n g s  
                                 s w f u p l o a d _ l o a d e d _ h a n d l e r :   t h i s . s w f U p l o a d L o a d e d . c r e a t e D e l e g a t e ( t h i s ) ,  
                  
                                 f i l e _ d i a l o g _ s t a r t _ h a n d l e r :   t h i s . f i l e D i a l o g S t a r t . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 f i l e _ q u e u e d _ h a n d l e r :   t h i s . f i l e Q u e u e . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 f i l e _ q u e u e _ e r r o r _ h a n d l e r :   t h i s . f i l e Q u e u e E r r o r . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 f i l e _ d i a l o g _ c o m p l e t e _ h a n d l e r :   t h i s . f i l e D i a l o g C o m p l e t e . c r e a t e D e l e g a t e ( t h i s ) ,  
                                  
                                 u p l o a d _ s t a r t _ h a n d l e r :   t h i s . u p l o a d S t a r t . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 u p l o a d _ p r o g r e s s _ h a n d l e r :   t h i s . u p l o a d P r o g r e s s . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 u p l o a d _ e r r o r _ h a n d l e r :   t h i s . u p l o a d E r r o r . c r e a t e D e l e g a t e ( t h i s ) ,    
                                 u p l o a d _ s u c c e s s _ h a n d l e r :   t h i s . u p l o a d S u c c e s s . c r e a t e D e l e g a t e ( t h i s ) ,  
                                 u p l o a d _ c o m p l e t e _ h a n d l e r :   t h i s . u p l o a d C o m p l e t e . c r e a t e D e l e g a t e ( t h i s ) ,  
                  
                                 d e b u g :   t h i s . d e b u g ,  
                                 d e b u g _ h a n d l e r :   t h i s . d e b u g H a n d l e r  
                         } ) ;  
                          
                         E x t . g e t ( t h i s . s u o . m o v i e N a m e ) . s e t S t y l e ( {  
                                 p o s i t i o n :   ' a b s o l u t e ' ,    
                                 t o p :   0 ,  
                                 l e f t :   0  
                         } ) ;  
                 } ,   t h i s ) ;  
                  
                 E x t . u x . S w f U p l o a d P a n e l . s u p e r c l a s s . i n i t C o m p o n e n t . c a l l ( t h i s ) ;  
         } ,  
  
         / /   p r i v a t e  
         r e s i z e P r o g r e s s B a r :   f u n c t i o n ( )   {  
                 t h i s . p r o g r e s s _ b a r . s e t W i d t h ( t h i s . g e t B o t t o m T o o l b a r ( ) . e l . g e t W i d t h ( )   -   5 ) ;  
                 E x t . f l y ( t h i s . p r o g r e s s _ b a r . e l . d o m . f i r s t C h i l d . f i r s t C h i l d ) . a p p l y S t y l e s ( " h e i g h t :   1 6 p x " ) ;  
         } ,  
          
         / * *  
           *   S W F U p l o a d   d e b u g   h a n d l e r  
           *   @ p a r a m   { O b j e c t }   l i n e  
           * /  
         d e b u g H a n d l e r :   f u n c t i o n ( l i n e )   {  
 / /                 c o n s o l e . l o g ( l i n e ) ;  
         } ,  
          
         / * *  
           *   F o r m a t s   f i l e   s t a t u s  
           *   @ p a r a m   { I n t e g e r }   s t a t u s  
           *   @ r e t u r n   { S t r i n g }  
           * /  
         f o r m a t S t a t u s :   f u n c t i o n ( s t a t u s )   {  
                 r e t u r n   t h i s . s t r i n g s . s t a t u s [ s t a t u s ] ;  
         } ,  
          
         / * *  
           *   F o r m a t s   r a w   b y t e s   i n t o   k B / m B / G B / T B  
           *   @ p a r a m   { I n t e g e r }   b y t e s  
           *   @ r e t u r n   { S t r i n g }  
           * /  
         f o r m a t B y t e s :   f u n c t i o n ( s i z e )   {  
                 i f   ( ! s i z e )   {  
                         s i z e   =   0 ;  
                 }  
                 v a r   s u f f i x   =   [ " B " ,   " K B " ,   " M B " ,   " G B " ] ;  
                 v a r   r e s u l t   =   s i z e ;  
                 s i z e   =   p a r s e I n t ( s i z e ,   1 0 ) ;  
                 r e s u l t   =   s i z e   +   "   "   +   s u f f i x [ 0 ] ;  
                 v a r   l o o p   =   0 ;  
                 w h i l e   ( s i z e   /   1 0 2 4   >   1 )   {  
                         s i z e   =   s i z e   /   1 0 2 4 ;  
                         l o o p + + ;  
                 }  
                 r e s u l t   =   M a t h . r o u n d ( s i z e )   +   "   "   +   s u f f i x [ l o o p ] ;  
  
                 r e t u r n   r e s u l t ;  
  
                 i f ( i s N a N ( b y t e s ) )   {  
                         r e t u r n   ( ' ' ) ;  
                 }  
  
                 v a r   u n i t ,   v a l ;  
  
                 i f ( b y t e s   <   9 9 9 )   {  
                         u n i t   =   ' B ' ;  
                         v a l   =   ( ! b y t e s   & &   t h i s . p r o g r e s s R e q u e s t C o u n t   > =   1 )   ?   ' ~ '   :   b y t e s ;  
                 }   e l s e   i f ( b y t e s   <   9 9 9 9 9 9 )   {  
                         u n i t   =   ' k B ' ;  
                         v a l   =   M a t h . r o u n d ( b y t e s / 1 0 0 0 ) ;  
                 }   e l s e   i f ( b y t e s   <   9 9 9 9 9 9 9 9 9 )   {  
                         u n i t   =   ' M B ' ;  
                         v a l   =   M a t h . r o u n d ( b y t e s / 1 0 0 0 0 0 )   /   1 0 ;  
                 }   e l s e   i f ( b y t e s   <   9 9 9 9 9 9 9 9 9 9 9 9 )   {  
                         u n i t   =   ' G B ' ;  
                         v a l   =   M a t h . r o u n d ( b y t e s / 1 0 0 0 0 0 0 0 0 )   /   1 0 ;  
                 }   e l s e   {  
                         u n i t   =   ' T B ' ;  
                         v a l   =   M a t h . r o u n d ( b y t e s / 1 0 0 0 0 0 0 0 0 0 0 0 )   /   1 0 ;  
                 }  
  
                 r e t u r n   ( v a l   +   '   '   +   u n i t ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   s w f U p l o a d L o a d e d   e v e n t  
           * /  
         s w f U p l o a d L o a d e d :   f u n c t i o n ( )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' S W F U P L O A D   L O A D E D ' ) ;  
                  
                 t h i s . f i r e E v e n t ( ' s w f U p l o a d L o a d e d ' ,   t h i s ) ;  
         } ,  
                  
         / * *  
           *   S W F U p l o a d   f i l e D i a l o g S t a r t   e v e n t  
           * /  
         f i l e D i a l o g S t a r t :   f u n c t i o n ( )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' F I L E   D I A L O G   S T A R T ' ) ;  
                  
                 t h i s . f i r e E v e n t ( ' f i l e D i a l o g S t a r t ' ,   t h i s ) ;  
         } ,  
          
         / * *  
           *   A d d   f i l e   t o   s t o r e   /   g r i d  
           *   S W F U p l o a d   f i l e Q u e u e   e v e n t  
           *   @ p a r a m   { O b j e c t }   f i l e  
           * /  
         f i l e Q u e u e :   f u n c t i o n ( f i l e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' F I L E   Q U E U E ' ) ;  
                  
                 f i l e . s t a t u s   =   0 ;  
                 r   =   n e w   t h i s . r e c ( f i l e ) ;  
                 r . i d   =   f i l e . i d ;  
                 t h i s . s t o r e . a d d ( r ) ;  
                  
                 t h i s . f i r e E v e n t ( ' f i l e Q u e u e d ' ,   t h i s ,   f i l e ) ;  
         } ,  
  
         / * *  
           *   E r r o r   w h e n   f i l e   q u e u e   e r r o r   o c c u r s  
           *   S W F U p l o a d   f i l e Q u e u e E r r o r   e v e n t  
           *   @ p a r a m   { O b j e c t }     f i l e  
           *   @ p a r a m   { I n t e g e r }   c o d e  
           *   @ p a r a m   { s t r i n g }     m e s s a g e  
           * /  
         f i l e Q u e u e E r r o r :   f u n c t i o n ( f i l e ,   c o d e ,   m e s s a g e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' F I L E   Q U E U E   E R R O R ' ) ;  
  
                 s w i t c h   ( c o d e )   {  
                         c a s e   - 1 0 0 :    
                                 v a r   s l o t s ;  
                                 s w i t c h ( m e s s a g e )   {  
                                         c a s e   ' 0 ' :  
                                                 s l o t s   =   t h i s . s t r i n g s . e r r o r _ q u e u e _ s l o t s _ 0 ;  
                                                 b r e a k ;  
                                         c a s e   ' 1 ' :  
                                                 s l o t s   =   t h i s . s t r i n g s . e r r o r _ q u e u e _ s l o t s _ 1 ;  
                                                 b r e a k ;  
                                         d e f a u l t :  
                                                 s l o t s   =   S t r i n g . f o r m a t ( t h i s . s t r i n g s . e r r o r _ q u e u e _ s l o t s _ 2 ,   m e s s a g e ) ;  
                                 }  
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   S t r i n g . f o r m a t ( t h i s . s t r i n g s . e r r o r _ q u e u e _ e x c e e d e d   +   '   '   +   s l o t s ,   t h i s . f i l e _ q u e u e _ l i m i t ) ) ;  
                                 b r e a k ;  
                                  
                         c a s e   - 1 1 0 :  
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   S t r i n g . f o r m a t ( t h i s . s t r i n g s . e r r o r _ s i z e _ e x c e e d e d ,   t h i s . f o r m a t B y t e s ( t h i s . f i l e _ s i z e _ l i m i t   *   1 0 2 4 ) ) ) ;  
                                 b r e a k ;  
  
                         c a s e   - 1 2 0 :  
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   t h i s . s t r i n g s . e r r o r _ z e r o _ b y t e _ f i l e ) ;  
                                 b r e a k ;  
  
                         c a s e   - 1 3 0 :  
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   t h i s . s t r i n g s . e r r o r _ i n v a l i d _ f i l e t y p e ) ;  
                                 b r e a k ;  
                 }  
                  
                 t h i s . f i r e E v e n t ( ' f i l e Q u e u e E r r o r ' ,   t h i s ,   f i l e ,   c o d e ,   e r r o r ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   f i l e D i a l o g C o m p l e t e   e v e n t  
           *   @ p a r a m   { I n t e g e r }   f i l e _ c o u n t  
           * /  
         f i l e D i a l o g C o m p l e t e :   f u n c t i o n ( f i l e _ c o u n t )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' F I L E   D I A L O G   C O M P L E T E ' ) ;  
                  
                 i f   ( f i l e _ c o u n t   >   0 )   {  
                         t h i s . u p l o a d B t n . s h o w ( ) ;  
                 }  
                  
                 t h i s . a d d B t n . s h o w ( ) ;  
 	 	 t h i s . c l e a r B t n . s h o w ( ) ;  
                  
                 t h i s . f i r e E v e n t ( ' f i l e D i a l o g C o m p l e t e ' ,   t h i s ,   f i l e _ c o u n t ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   u p l o a d S t a r t   e v e n t  
           *   @ p a r a m   { O b j e c t }   f i l e  
           * /  
         u p l o a d S t a r t :   f u n c t i o n ( f i l e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' U P L O A D   S T A R T ' ) ;  
                  
                 t h i s . f i r e E v e n t ( ' u p l o a d S t a r t ' ,   t h i s ,   f i l e ) ;  
                  
                 r e t u r n   t r u e ;  
         } ,  
          
         / * *  
           *   S W F U p l o a d   u p l o a d P r o g r e s s   e v e n t  
           *   @ p a r a m   { O b j e c t }     f i l e  
           *   @ p a r a m   { I n t e g e r }   b y t e s _ c o m p l e t e d  
           *   @ p a r a m   { I n t e g e r }   b y t e s _ t o t a l  
           * /  
         u p l o a d P r o g r e s s :   f u n c t i o n ( f i l e ,   b y t e s _ c o m p l e t e d ,   b y t e s _ t o t a l )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' U P L O A D   P R O G R E S S ' ) ;  
                  
                 t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . s e t ( ' s t a t u s ' ,   1 ) ;                
                 t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . c o m m i t ( ) ;  
                 t h i s . p r o g r e s s _ b a r . u p d a t e P r o g r e s s ( b y t e s _ c o m p l e t e d / b y t e s _ t o t a l ,   S t r i n g . f o r m a t ( t h i s . s t r i n g s . t e x t _ u p l o a d i n g ,   f i l e . n a m e ,   t h i s . f o r m a t B y t e s ( b y t e s _ c o m p l e t e d ) ,   t h i s . f o r m a t B y t e s ( b y t e s _ t o t a l ) ) ) ;  
                  
                 t h i s . f i r e E v e n t ( ' u p l o a d P r o g r e s s ' ,   t h i s ,   f i l e ,   b y t e s _ c o m p l e t e d ,   b y t e s _ t o t a l ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   u p l o a d E r r o r   e v e n t  
           *   S h o w   n o t i c e   w h e n   e r r o r   o c c u r s  
           *   @ p a r a m   { O b j e c t }   f i l e  
           *   @ p a r a m   { I n t e g e r }   e r r o r  
           *   @ p a r a m   { I n t e g e r }   c o d e  
           *   @ r e t u r n   { }  
           * /  
         u p l o a d E r r o r :   f u n c t i o n ( f i l e ,   e r r o r ,   c o d e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' U P L O A D   E R R O R ' ) ;  
  
                 s w i t c h   ( e r r o r )   {  
                         c a s e   - 2 0 0 :      
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   t h i s . s t r i n g s . e r r o r _ f i l e _ n o t _ f o u n d ) ;  
                                 b r e a k ;  
                                  
                         c a s e   - 2 3 0 :      
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   t h i s . s t r i n g s . e r r o r _ s e c u r i t y _ e r r o r ) ;  
                                 b r e a k ;  
                                  
                         c a s e   - 2 9 0 :  
                                 t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . s e t ( ' s t a t u s ' ,   4 ) ;  
                                 t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . c o m m i t ( ) ;  
                                 b r e a k ;  
                 }  
                  
                 t h i s . f i r e E v e n t ( ' f i l e U p l o a d E r r o r ' ,   t h i s ,   f i l e ,   e r r o r ,   c o d e ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   u p l o a d S u c c e s s   e v e n t  
           *   @ p a r a m   { O b j e c t }   f i l e  
           *   @ p a r a m   { O b j e c t }   r e s p o n s e  
           * /    
         u p l o a d S u c c e s s :   f u n c t i o n ( f i l e ,   r e s p o n s e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' U P L O A D   S U C C E S S ' ) ;  
                  
                 v a r   d a t a   =   E x t . d e c o d e ( r e s p o n s e ) ;    
                 i f   ( d a t a . s u c c e s s )   {  
                         t h i s . s t o r e . r e m o v e ( t h i s . s t o r e . g e t B y I d ( f i l e . i d ) ) ;  
                 }   e l s e   {  
                         t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . s e t ( ' s t a t u s ' ,   3 ) ;  
                         t h i s . s t o r e . g e t B y I d ( f i l e . i d ) . c o m m i t ( ) ;  
                         i f   ( d a t a . m s g )   {  
                                 E x t . M e s s a g e B o x . a l e r t ( t h i s . s t r i n g s . t e x t _ e r r o r ,   d a t a . m s g ) ;  
                         }  
                 }  
                  
                  
                 t h i s . f i r e E v e n t ( ' f i l e U p l o a d S u c c e s s ' ,   t h i s ,   f i l e ,   d a t a ) ;  
         } ,  
  
         / * *  
           *   S W F U p l o a d   u p l o a d C o m p l e t e   e v e n t  
           *   @ p a r a m   { O b j e c t }   f i l e  
           * /  
         u p l o a d C o m p l e t e :   f u n c t i o n ( f i l e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' U P L O A D   C O M P L E T E ' ) ;  
                  
                 t h i s . p r o g r e s s _ b a r . r e s e t ( ) ;  
                 t h i s . p r o g r e s s _ b a r . u p d a t e T e x t ( t h i s . s t r i n g s . t e x t _ p r o g r e s s b a r ) ;  
                  
                 i f ( t h i s . s u o . g e t S t a t s ( ) . f i l e s _ q u e u e d   & &   ! t h i s . u p l o a d _ c a n c e l l e d )   {  
                         t h i s . s u o . s t a r t U p l o a d ( ) ;  
                 }   e l s e   {  
                         t h i s . f i r e E v e n t ( ' f i l e U p l o a d C o m p l e t e ' ,   t h i s ,   f i l e ) ;  
                          
                         t h i s . a l l U p l o a d s C o m p l e t e ( ) ;  
                 }  
                  
         } ,  
          
         / * *  
           *   S W F U p l o a d   a l l U p l o a d s C o m p l e t e   m e t h o d  
           * /  
         a l l U p l o a d s C o m p l e t e :   f u n c t i o n ( )   {  
                 t h i s . c a n c e l B t n . h i d e ( ) ;  
 	 	 t h i s . a d d B t n . s h o w ( ) ;  
 	 	 t h i s . c l e a r B t n . s h o w ( ) ;  
                  
                 t h i s . f i r e E v e n t ( ' a l l U p l o a d s C o m p l e t e ' ,   t h i s ) ;  
         } ,  
          
         / * *  
           *   S W F U p l o a d   s e t P o s t P a r a m s   m e t h o d  
           *   @ p a r a m   { S t r i n g }   n a m e  
           *   @ p a r a m   { S t r i n g }   v a l u e  
           * /  
         a d d P o s t P a r a m :   f u n c t i o n ( n a m e ,   v a l u e )   {  
                 i f   ( t h i s . s u o )   {  
                         t h i s . s u o . s e t t i n g s . p o s t _ p a r a m s [ n a m e ]   =   v a l u e ;  
                         t h i s . s u o . s e t P o s t P a r a m s ( t h i s . s u o . s e t t i n g s . p o s t _ p a r a m s ) ;  
                 }   e l s e   {  
                         t h i s . p o s t _ p a r a m s [ n a m e ]   =   v a l u e ;  
                 }  
         } ,  
                  
         / * *  
           *   S t a r t   f i l e   u p l o a d  
           *   S W F U p l o a d   s t a r t U p l o a d   m e t h o d  
           * /  
         s t a r t U p l o a d :   f u n c t i o n ( )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' S T A R T   U P L O A D ' ) ;  
                  
                 t h i s . c a n c e l B t n . s h o w ( ) ;  
                 t h i s . u p l o a d B t n . h i d e ( ) ;  
                 t h i s . c l e a r B t n . h i d e ( ) ;  
 / / 	 	 t h i s . a d d B t n . h i d e ( ) ;  
                  
                 t h i s . u p l o a d _ c a n c e l l e d   =   f a l s e ;  
                  
 	 	 t h i s . f i r e E v e n t ( ' s t a r t U p l o a d ' ,   t h i s ) ;  
 	 	  
                 t h i s . s u o . s t a r t U p l o a d ( ) ;  
         } ,  
          
         / * *  
           *   S W F U p l o a d   s t o p U p l o a d   m e t h o d  
           *   @ p a r a m   { O b j e c t }   f i l e  
           * /  
         s t o p U p l o a d :   f u n c t i o n ( f i l e )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' S T O P   U P L O A D ' ) ;  
                  
                 t h i s . s u o . s t o p U p l o a d ( ) ;  
                  
                 t h i s . u p l o a d _ c a n c e l l e d   =   t r u e ;  
                  
                 t h i s . g e t S t o r e ( ) . e a c h ( f u n c t i o n ( )   {  
                         i f   ( t h i s . d a t a . s t a t u s   = =   1 )   {  
                                 t h i s . s e t ( ' s t a t u s ' ,   0 ) ;  
                                 t h i s . c o m m i t ( ) ;  
                         }  
                 } ) ;  
  
                 t h i s . c a n c e l B t n . h i d e ( ) ;  
                 i f   ( t h i s . s u o . g e t S t a t s ( ) . f i l e s _ q u e u e d   >   0 )   {  
                         t h i s . u p l o a d B t n . s h o w ( ) ;  
                 }  
                 t h i s . a d d B t n . s h o w ( ) ;  
 	 	 t h i s . c l e a r B t n . s h o w ( ) ;  
  
                 t h i s . p r o g r e s s _ b a r . r e s e t ( ) ;  
                 t h i s . p r o g r e s s _ b a r . u p d a t e T e x t ( t h i s . s t r i n g s . t e x t _ p r o g r e s s b a r ) ;  
  
         } ,  
          
         / * *  
           *   D e l e t e   o n e   o r   m u l t i p l e   r o w s  
           *   S W F U p l o a d   c a n c e l U p l o a d   m e t h o d  
           * /  
         r e m o v e F i l e s :   f u n c t i o n ( )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' R E M O V E   F I L E S ' ) ;  
                  
                 v a r   s e l R e c o r d s   =   t h i s . g e t S e l e c t i o n s ( ) ;  
                 f o r   ( v a r   i = 0 ;   i   <   s e l R e c o r d s . l e n g t h ;   i + + )   {  
                         i f   ( s e l R e c o r d s [ i ] . d a t a . s t a t u s   ! =   1 )   {  
                                 t h i s . s u o . c a n c e l U p l o a d ( s e l R e c o r d s [ i ] . i d ) ;  
                                 t h i s . s t o r e . r e m o v e ( s e l R e c o r d s [ i ] ) ;  
                         }  
                 }  
                  
                 i f   ( t h i s . s u o . g e t S t a t s ( ) . f i l e s _ q u e u e d   = = =   0 )   {  
                         t h i s . u p l o a d B t n . h i d e ( ) ;  
 / /                         t h i s . c l e a r B t n . h i d e ( ) ;  
                 }  
                  
                 t h i s . f i r e E v e n t ( ' r e m o v e F i l e s ' ,   t h i s ) ;  
         } ,  
          
         / * *  
           *   C l e a r   t h e   Q u e u e  
           *   S W F U p l o a d   c a n c e l U p l o a d   m e t h o d  
           * /  
         r e m o v e A l l F i l e s :   f u n c t i o n ( )   {  
                 i f ( t h i s . d e b u g )   c o n s o l e . i n f o ( ' R E M O V E   A L L ' ) ;  
                  
                 / /   m a r k   a l l   i n t e r n a l   f i l e s   a s   c a n c e l l e d  
                 v a r   f i l e s _ l e f t   =   t h i s . s u o . g e t S t a t s ( ) . f i l e s _ q u e u e d ;  
  
                 w h i l e   ( f i l e s _ l e f t   >   0 )   {  
                         t h i s . s u o . c a n c e l U p l o a d ( ) ;  
                         f i l e s _ l e f t   =   t h i s . s u o . g e t S t a t s ( ) . f i l e s _ q u e u e d ;  
                 }  
                  
                 t h i s . s t o r e . r e m o v e A l l ( ) ;  
                  
                 t h i s . c a n c e l B t n . h i d e ( ) ;  
                 t h i s . u p l o a d B t n . h i d e ( ) ;  
 / /                 t h i s . c l e a r B t n . h i d e ( ) ;  
                  
                 t h i s . f i r e E v e n t ( ' r e m o v e A l l F i l e s ' ,   t h i s ) ;  
         }        
          
 } ) ; 
