{"id":13742814,"url":"https://github.com/joshtynjala/starling-preloader","last_synced_at":"2025-10-10T22:30:28.454Z","repository":{"id":4766621,"uuid":"5917502","full_name":"joshtynjala/starling-preloader","owner":"joshtynjala","description":"An example preloader for Starling Framework running in Adobe Flash Player in a web browser","archived":true,"fork":false,"pushed_at":"2014-12-10T18:41:22.000Z","size":154,"stargazers_count":24,"open_issues_count":0,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-04T07:33:27.936Z","etag":null,"topics":["actionscript","adobe-air","adobe-flash","adobe-flash-player","as3","feathers-ui","flash","starling","starling-framework"],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":true,"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/joshtynjala.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2012-09-22T22:27:51.000Z","updated_at":"2023-01-28T02:08:51.000Z","dependencies_parsed_at":"2022-08-30T09:12:00.407Z","dependency_job_id":null,"html_url":"https://github.com/joshtynjala/starling-preloader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshtynjala%2Fstarling-preloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshtynjala%2Fstarling-preloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshtynjala%2Fstarling-preloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshtynjala%2Fstarling-preloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshtynjala","download_url":"https://codeload.github.com/joshtynjala/starling-preloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236001160,"owners_count":19079268,"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":["actionscript","adobe-air","adobe-flash","adobe-flash-player","as3","feathers-ui","flash","starling","starling-framework"],"created_at":"2024-08-03T05:00:36.535Z","updated_at":"2025-10-10T22:30:23.181Z","avatar_url":"https://github.com/joshtynjala.png","language":"ActionScript","funding_links":[],"categories":["User Interface"],"sub_categories":["Starling"],"readme":"# Preloader for Starling\n\nSWFs running in a web browser should have preloaders. A preloader allows you to quickly display graphics and animation so that visitors to your webpage have something to look at while the rest of the SWF file loads.\n\nHow do you create a preloader for a Starling app? It's not really any different than creating a preloader for any other SWF. Here's a summary of how I do it. Be sure to look at the included source code for complete details.\n\n1. Extend `flash.display.MovieClip` when creating the startup class. Call `stop()` in the constructor.\n\n2. Use the following command line argument to compile your Starling root class on frame 2 instead of frame 1. It's the class that you will pass to the Starling constructor. It usually extends `starling.display.Sprite`.\n\n\t```\n\t-frame two,com.example.StarlingRoot\n\t```\n\n3. Wait for the SWF to be completely loaded. Listen for `Event.COMPLETE` on the `loaderInfo` object.\n\n4. In the `Event.COMPLETE` listener, call `gotoAndStop(2)` to switch to frame 2.\n\n5. Get a reference to the Starling root class by calling `getDefinitionByName()`. **Do not import this class.** If you import it, it will be compiled on frame 1 instead of frame 2, and then the preloader won't work.\n\n\t```as3\n\tvar RootType:Class = getDefinitionByName(\"com.example.StarlingRoot\") as Class;\n\t```\n\n6. Call `getDefinitionByName()` again to get a reference to `starling.core.Starling`. Again, do not import this class.\n\n7. Initialize Starling using the classes returned by `getDefinitionByName()`.\n\nPlease see the comments in the example code for more detailed explanations.\n\nThis project is not designed to create a preloader with Flash Professional. It is meant as an example for Flash Builder or any other development environment that uses the command line compiler.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshtynjala%2Fstarling-preloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshtynjala%2Fstarling-preloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshtynjala%2Fstarling-preloader/lists"}