Hi,
I try to render spark components and also starling using flash 11, but see only black screen . Is anyone resolve or have same problem ?
Flex MXML and flash 11 - starling
(4 posts) (2 voices)-
Posted 1 year ago #
-
I couldn't add Spark component in starling nativeOverlay, could you show me your code? And did you enabled "gpu" param in your project ###-config.xml?
Posted 1 year ago # -
I also have a problem to render Spark components and starling. That is because starling render above spark component. At example this is my test source code:
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" creationComplete="init()" minHeight="600" alpha="0.5"> <fx:Script> <![CDATA[ import starling.core.Starling; private var mStarling:Starling; public function init():void { addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded ( e:Event ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; mStarling = new Starling(Game, stage); mStarling.start(); } ]]> </fx:Script> <s:Button name="Test" label="CoverTile" /> </s:Application>
As you see I set alpha to 0.5 If it set to 0 only starling class is visible if it is 1 only button 'CoverTile' is visible.
To run example you need to make some things:
1) In Flex sdk folder to create new folder with name "11.0" . This is for:
[Windows XP and 32-bit Vista/7] C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\player\11.0
[Windows 64-bit Vista/7] C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\player\11.0
[OS X Default] /Applications/Adobe Flash Builder 4.5/sdks/4.5.1/frameworks/libs/player/11.0
Place "playerglobal.swc" for flash 11 there.
2) In "Flex Compiler" panel set options:
-swf-version=13 -target-player=11
3) Use playerglobal.swc for flash 11
4) Set params.wmode = "direct"; ( this is for web application flex project)Posted 1 year ago # -
Resolved. Use backgroundAlpha="0" instead alpha="0.5"
Posted 1 year ago #
Reply
You must log in to post.