开发者

Footer in Spark application

开发者 https://www.devze.com 2023-01-21 11:55 出处:网络
I\'d love to be able to setup a footer at the bottom of my spark application, which runs in a browser. I was reading through the documentation of Application and the awesome Adobe examples. Unfor开发者

I'd love to be able to setup a footer at the bottom of my spark application, which runs in a browser. I was reading through the documentation of Application and the awesome Adobe examples. Unfor开发者_如何学JAVAtunately I keep getting lost when the documentation talks about how to position the control bar area at the bottom via spark.skins.spark.ApplicationSkin - sadly I'm not sure what that means from a practical standpoint and am stuck. How exactly do I set this up? Do I need to create an application skin (doesn't seem to be an option for the MXML skins) and apply it to the skin? Or instantiate ApplicationSkin and do something with it (what, exactly)?

Sorry, I'm sure this offensively simple, but I can't find any obvious example anywhere...

f


The basic process is this:

1) In your main application file, create a skin part for the footer. this can be of whatever type you want.
2) Create an MXML skin based off the Application Skin. Be sure that the hostcomponent metadata points to your main application file.
2) Define the skin part in MXML. Use the same ID as the variable in your main application file. Position it at the bottom of your component using whatever process you prefer, either a layout or absolutely positioning or whatever. 3) In your main application, set the skin class. Either as an attribute on the MXML or in ActionScript. In MXML, something like this:

 <s:Application skinClass="com.skins.mynewAppSkinClassWithControlBar">

In AS3, something like this:

this.setStyle('skinClass', com.skins.mynewAppSkinClassWithControlBar);
0

精彩评论

暂无评论...
验证码 换一张
取 消