{"id":13744771,"url":"https://github.com/mcalegaris/gameapi-as3","last_synced_at":"2025-05-09T03:33:18.763Z","repository":{"id":217212207,"uuid":"2660882","full_name":"mcalegaris/gameapi-as3","owner":"mcalegaris","description":"Official Playtomic API for ActionScript 3 games","archived":false,"fork":false,"pushed_at":"2011-09-27T03:14:07.000Z","size":2563,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T16:41:30.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://playtomic.com/api/as3","language":"ActionScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcalegaris.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-10-27T20:02:27.000Z","updated_at":"2013-04-29T15:53:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"b057a724-ad96-4d81-a4cf-6a5af0a651dd","html_url":"https://github.com/mcalegaris/gameapi-as3","commit_stats":null,"previous_names":["mcalegaris/gameapi-as3"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcalegaris%2Fgameapi-as3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcalegaris%2Fgameapi-as3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcalegaris%2Fgameapi-as3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcalegaris%2Fgameapi-as3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcalegaris","download_url":"https://codeload.github.com/mcalegaris/gameapi-as3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253183288,"owners_count":21867395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:15.654Z","updated_at":"2025-05-09T03:33:18.396Z","avatar_url":"https://github.com/mcalegaris.png","language":"ActionScript","readme":"Playtomic ActionScript 3 API\r\n-------------------------------------------------------------------------\r\nThis file is part of the official Playtomic API for Flash games using\r\nActionScript 3.  Playtomic is a real time analytics platform for casual \r\ngames  and services that go in casual games.  If you haven't used it \r\nbefore check it out:\r\n\r\nhttp://playtomic.com/\r\n\r\nCreated by ben at the above domain on 2/25/11.\r\nCopyright 2011 Playtomic LLC. All rights reserved.\r\n\r\nDocumentation is available at:\r\n\r\nhttp://playtomic.com/api/as3\r\nPLEASE NOTE:\r\nYou may modify this SDK if you wish but be kind to our servers.  Be\r\ncareful about modifying the analytics stuff as it may give you \r\nborked reports.\r\n\r\nIf you make any awesome improvements feel free to let us know!\r\n\r\n-------------------------------------------------------------------------\r\nTHIS SOFTWARE IS PROVIDED BY PLAYTOMIC, LLC \"AS IS\" AND ANY\r\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\r\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n\r\n-------------------------------------------------------------------------\r\nGENERAL NOTES\r\n-------------------------------------------------------------------------\r\nDon't use crazy characters in your metric, level, leaderboard table etc \r\nnames.  A very good idea is to use the same naming conventions for variables:\r\n\r\n    - alphanumeric\r\n    - keep them short (50 chars is the max)\r\n\r\nPlay time, country and source information is handled automatically, you do not \r\nneed to do anything to collect that data.\r\n\r\n\r\nBegin by logging a view which initializes the API, and then log any metrics you \r\nwant.  Play time, repeat visitors etc are handled automatically.\r\n\r\n\r\n-------------------------------------------------------------------------\r\nLogging a view\r\n-------------------------------------------------------------------------\r\nCall this at the very start of your game loading:\r\n\r\n\tPlaytomic.Log.View(swfid, guid, defaulturl)\r\n\t\r\n\t\tswfid = from your API page in Playtomic\r\n\t\tguid = from your API page in Playtomic\r\n\t\tdefaulturl = path to the swf, should be root.loaderInfo.loaderUrl;\r\n\r\nThis registers that the player has viewed your game and initializes the\r\nAPI.  You can track when the player actually starts playing (eg play button)\r\nby calling this 0 or more times in your game:\r\n\r\n\tPlaytomic.Log.Play();\r\n\r\n\r\n-------------------------------------------------------------------------\r\nCUSTOM METRICS\r\n-------------------------------------------------------------------------\r\n\r\nCustom metrics can track any general events you want to follow, like \r\ntracking who views your credits screen or anything else.\r\n\r\nCall this to log any custom data you want to track.\r\n\r\n\tPlaytomic.Log.CustomMetric(name, group, unique)\r\n\t\r\n\t\tname = your metric name, eg \"ViewedCredits\"\r\n\t\tgroup = optional, specify the group name for sorting in reports\r\n\t\tunique = optional, only count unique occurrences \r\n\r\n\r\n-------------------------------------------------------------------------\r\nLEVEL METRICS\r\n-------------------------------------------------------------------------\r\n\r\nLevel metrics can identify problems players are having with your difficulty \r\nor anything else by logging information like how many people begin vs. finish\r\neach level.  They can help you identify major problems in your player retention.\r\n\r\nThese methods log the 3 types of level metrics - counters, ranged-value \r\nand average-value metrics.\r\n\r\n- Counter metrics count how many times an event occurs across levels\r\n- Ranged-value metrics track multiple values across a single event across levels\r\n- Average-value metrics track the average of something across levels\r\n\r\nPlaytomic.Log.LevelCounterMetric(name, level, unique)\r\n\r\n\tname = your metric name\r\n\tlevel = either a level number (int \u003e 0) or a level name\r\n\tunique = optional, only count unique-per-view occurrences\r\n\r\nPlaytomic.Log.LevelRangedMetric(name, level, value, unique)\r\n\r\n\tname = your metric name\r\n\tlevel = either a level number (int \u003e 0) or a level name\r\n\tvalue = the value you want to track\r\n\tunique = optional, only count unique-per-view occurrences \r\n\r\n\r\nPlaytomic.Log.LevelAverageMetric(name, level, value, unique)\r\n\tname = your metric name\r\n\tlevel = either a level number (int \u003e 0) or a level name\r\n\tvalue = the value you want to track\r\n\tunique = optional, only count unique-per-view occurrences \r\n\r\n\r\n-------------------------------------------------------------------------\r\nLINK TRACKING\r\n-------------------------------------------------------------------------\r\n\r\nLink tracking can give you information on how many people click the links \r\nin your games, including (Flash only) identifying sites that block links.\r\n\r\nPlaytomic.Link.Open(url, name, group)\r\n\r\n\turl = \"http://playtomic.com/\"\r\n\tname = link name\r\n\tgroup = specify the group name for this link (eg \"sponsorlinks\")\r\n\r\nWhen you track links it automatically tracks the source and country for deep \r\nanalysis in the dashboard, and it automatically tracks domain totals so if \r\nyou have multiple links to the same site you can see each links effectiveness \r\nas well as the total uniques, clicks and fails for that domain.\r\n\r\nThe link tracking API does not alter the URL at all, players still go directly \r\nto the destination!\r\n\r\n-------------------------------------------------------------------------\r\nLEADERBOARDS, LEVEL SHARING, DATA AND GEOIP\r\n-------------------------------------------------------------------------\r\nThis stuff gets a little more complicated.  Please check the documentation at\r\nhttp://playtomic.com/api/as3\r\n","funding_links":[],"categories":["API"],"sub_categories":["Other API"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcalegaris%2Fgameapi-as3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcalegaris%2Fgameapi-as3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcalegaris%2Fgameapi-as3/lists"}