|
61 | 61 | import flash.display.DisplayObjectContainer; |
62 | 62 | import com.mteamapp.BlackStageDebugger; |
63 | 63 | import nativeClasses.distriqtApplication.DistriqtApplication; |
| 64 | + import flash.net.URLLoader; |
64 | 65 |
|
65 | 66 | public class AppWithContent extends App |
66 | 67 | { |
|
87 | 88 |
|
88 | 89 | /**StageMask is using to cover the bottom of the page, when a keboard moves stage to up */ |
89 | 90 | private var stageMask:Sprite ; |
| 91 | + |
| 92 | + private var pageLoggerRequest:URLRequest,pageLoggerLoader:URLLoader; |
90 | 93 |
|
91 | 94 | /**This is the contentManager rectangle size. it will generate from the content w and h on the home xml tag*/ |
92 | 95 | public static function get contentRect():Rectangle |
|
459 | 462 | { |
460 | 463 | SaffronLogger.log("History changed"); |
461 | 464 | History.pushHistory((event as AppEventContent).linkData); |
| 465 | + |
| 466 | + |
| 467 | + } |
| 468 | + |
| 469 | + if(event2!=null) |
| 470 | + { |
| 471 | + logPageChange(event2.myID); |
462 | 472 | } |
463 | 473 |
|
464 | 474 | if((!DevicePrefrence.isItPC) && mouseClickCounter>0) |
|
469 | 479 |
|
470 | 480 | return duplicatePageController ; |
471 | 481 | } |
| 482 | + |
| 483 | + /**Save teh page ID to Analytic server */ |
| 484 | + private function logPageChange(pageId:String):void |
| 485 | + { |
| 486 | + if(pageLoggerRequest==null) |
| 487 | + { |
| 488 | + pageLoggerRequest = new URLRequest(Contents.config.version_controll_url); |
| 489 | + pageLoggerRequest.contentType = 'application/json'; |
| 490 | + pageLoggerRequest.method = URLRequestMethod.POST ; |
| 491 | + } |
| 492 | + pageLoggerRequest.data = JSON.stringify({AppId:DevicePrefrence.appID,PageName:pageId,Enter:true}) ; |
| 493 | + if(pageLoggerLoader==null) |
| 494 | + { |
| 495 | + pageLoggerLoader = new URLLoader(); |
| 496 | + } |
| 497 | + pageLoggerLoader.load(pageLoggerRequest); |
| 498 | + |
| 499 | + } |
472 | 500 |
|
473 | 501 | /**Contents are load now*/ |
474 | 502 | protected function startApp():void |
|
0 commit comments