Splash screen with FXG in Mobile applications with Flash Builder for PHP -
i want use .fxg asset on android application building using flash builder php.
it gives me error message saying assets.myresource class not exist.
ïnvalid class name {assets.myresource} specificied splashscreenimage attribute
ok, primary focus solution preloader attribute on mobile application. see preloader="customsplashscreen" below:
<?xml version="1.0" encoding="utf-8"?> <s:viewnavigatorapplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstview="views.fxgsplashhomeview" preloader="customsplashscreen" splashscreenminimumdisplaytime="3000" applicationdpi="160"> </s:viewnavigatorapplication>
the customsplashscreen extends , overrides spark.preloaders.splashscreen class, , getimageclass function.
package { import mx.core.dpiclassification; import mx.core.mx_internal; import spark.preloaders.splashscreen; use namespace mx_internal; public class customsplashscreen extends splashscreen { public function customsplashscreen() { super(); } override mx_internal function getimageclass(dpi:number, aspectratio:string):class { return class(splash); } } }
the splash in return class(splash), simple fxg file, so:
<?xml version="1.0" encoding="utf-8"?> <graphic xmlns="http://ns.adobe.com/fxg/2008" xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:fc="http://ns.adobe.com/flashcatalyst/2009" version="2.0"> <path y="1" data="m 0 10 l 40 10 l 35 0 l 9 15 l 35 30 l 40 20 l 0 20 z"> <fill> <solidcolor color="#0000ff" alpha="0.6"/> </fill> </path> </graphic>
that's there it. have fun!
-- allen
Comments
Post a Comment