-
Notifications
You must be signed in to change notification settings - Fork 2
ad3002/Adriver-Loader
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Adriver-Loader (as3) version 1.0 https://github.com/randuev/Adriver-Loader/ * supports: single adriver for site and network renders image/swf/flv content uses vkontakte api to retrieve demographics skip button callbacks for all events duration limit * how to use: // copy adriver and vkontakte directories into your project root // in your application, first add imports: import adriver.* import adriver.events.* // set up parameters: parameters = { // adriver parameters adriver: { // your site id in adriver // mandatory sid: YOUR_SITE_ID_IN_ADRIVER }, // what social network to query for user data. // currently only vkontakte is supported. // can be commented out if you don't want module to perform query or // want to supply information yourself // social_network: "vkontakte", // api id api_id: 5422, // vkontakte secret key of application, found in settings api_secret: "oKSLmbER5H", // when debugging vkontakte application locally, use test mode api_test_mode: 1, // type of advertisement // currently only "pregame" ad_type: "pregame", // skip button settings // actual button skip_button: sb, // label skip_button_label: "Skip", // how quickly it can be activated (in seconds) skip_button_timeout: 0, // advertisement duration limit in seconds // it auto-skips the ad when timer is reached max_duration: 0, // user information user: { // sex of user. 2 is male. 1 is female sex: 2, // birth date in "YYYY-MM-DD" format bdate: "1917-01-09", // unique user identificator uid: 1, // city name. lowercase city_name: "st.petersburg", // country name. lowercase country_name: "russia" }, // style parameters style: { width: stage.width, height: stage.height }, // debug function debug: debug }; // when you are ready to display advertisement, initialize adriverLoader var ad:adriverLoader = new adriverLoader(mc_with_ad, parameters); // you might want to catch adriver events (make sure these functions exist) ad.addEventListener(AdriverEvent.STARTED, onAdStarted); ad.addEventListener(AdriverEvent.FINISHED, onAdFinished); ad.addEventListener(AdriverEvent.FAILED, onAdFailed); ad.addEventListener(AdriverEvent.LOADED, onAdLoaded); ad.addEventListener(AdriverEvent.SKIPPED, onAdSkipped); ad.addEventListener(AdriverEvent.PROGRESS, onAdProgress); ad.addEventListener(AdriverEvent.LIMITED, onAdLimited); // load and display advertisement ad.loadAd(); * Please see site.as and site.fla for compelte sample application * Fork, fix and send pull requests, please
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published