1- package otherPlatforms.tablighan
1+ package otherPlatforms.tablighan
22 //otherPlatforms.tablighan.TablighanBanner
33{
44 import appManager.displayContentElemets.LightImage ;
@@ -69,6 +69,7 @@ package otherPlatforms.tablighan
6969 this . graphics . drawRect (0 ,0 ,Width/ this . scaleX ,Height/ this . scaleY );
7070 }
7171 bannerImage = new LightImage(0x000000 ,0 );
72+ bannerImage. addEventListener (Event . COMPLETE ,bannerReady);
7273 this . addChild (bannerImage);
7374
7475 BannerId = bannerId ;
@@ -77,6 +78,11 @@ package otherPlatforms.tablighan
7778 this . addEventListener (MouseEvent . CLICK ,openURL);
7879 this . buttonMode = true ;
7980 }
81+
82+ private function bannerReady (e :Event ):void
83+ {
84+ this . dispatchEvent (new Event (Event . COMPLETE ));
85+ }
8086
8187 protected function openURL (event :MouseEvent ):void
8288 {
@@ -86,6 +92,11 @@ package otherPlatforms.tablighan
8692 }
8793 }
8894
95+ public function reload ():void
96+ {
97+ loadService();
98+ }
99+
89100 private function loadService (e :* = null ):void
90101 {
91102 if (service_tablighanAPI)
@@ -111,7 +122,7 @@ package otherPlatforms.tablighan
111122 {
112123 if (service_tablighanAPI. data . length > 0 )
113124 {
114- bannerImage. setUp("http://tablighon.com /Uploads/" + service_tablighanAPI. data [ 0 ] . AdFileName,true ,this . width / this . scaleX ,this . height / this . scaleY ,0 ,0 ,false );
125+ bannerImage. setUp("http://tablighon.ir /Uploads/" + service_tablighanAPI. data [ 0 ] . AdFileName,true ,this . width / this . scaleX ,this . height / this . scaleY ,0 ,0 ,false );
115126 //bannerImage.setUp("http://tablighon.com/Uploads/ab643bb7-eb23-490c-b983-a66703e7207e.jpg?"+new Date().time,true,this.width/this.scaleX,this.height/this.scaleY,0,0,false);;
116127 }
117128 }
0 commit comments