Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 101
Registered: ‎03-18-2011
My Device: Playbook Simulator
My Carrier: AT&T

Modify transparency tag from app?

So I was just putting together my blackberry-tablet.xml file, when I came across an issue that, judging from my searches, a lot of other people have run into as well. Not setting the transparency tag makes the app background transparent.

 

My first thought was that I kind of liked it actually. I'm guessing there's no reason why this wouldn't be allowed, but I can recognize that some backgrounds may make certain elements in my app hard to see, so my question is if that setting could be modified by the app, or if it's something that's in the blackberry-tablet.xml only and can only be set at compile time.

Developer
Posts: 146
Registered: ‎03-27-2011
My Device: Blackberry Playbook
My Carrier: WiFi

Re: Modify transparency tag from app?

As far as I know it cannot be modified at run-time. This source backs me up on that claim:
http://livedocs.adobe.com/flex/3/html/help.html?content=File_formats_1.html

You should be able to determine whether transparency is enabled by checking stage.nativeWindow.transparent, but this setting is read-only.
----------------------------------------
If this post solved your problem, please click the 'Accept as Solution' button.
If you found this post useful, please provide a Kudo. Thanks.

Approved Apps: Celestial Slingshot
Developer
Posts: 101
Registered: ‎03-18-2011
My Device: Playbook Simulator
My Carrier: AT&T

Re: Modify transparency tag from app?

That's kind of what I figured. Maybe that's something that can be changed in a later version of the SDK if enough people are interested. I just thought it would be an interesting feature to let the users choose if they wanted. It just lets them use their background as the background of the app basically.

Developer
Posts: 146
Registered: ‎03-27-2011
My Device: Blackberry Playbook
My Carrier: WiFi

Re: Modify transparency tag from app?

Also, this setting should be in your -app.xml, not your blackberry-tablet.xml.


PS, I can't tell from your post if you know this, (disclaimer: I've never tried this) but you should be able to use transparency at compile time and just show/hide your own backgrounds in app as necessary, essentially making the transparency optional.

The only downside of using transparency when you don't need it is a bit more overhead to calculate the alpha and draw your app.
----------------------------------------
If this post solved your problem, please click the 'Accept as Solution' button.
If you found this post useful, please provide a Kudo. Thanks.

Approved Apps: Celestial Slingshot
Developer
Posts: 101
Registered: ‎03-18-2011
My Device: Playbook Simulator
My Carrier: AT&T

Re: Modify transparency tag from app?

It can be set in both files, and as far as I know, the blackberry-tablet.xml overrides whatever is in the -app.xml file, at least that's how I understood it.

 

I suppose you could use transparency and draw over it if the user didn't want it, but I don't like the idea of that overhead like you mention.

Developer
Posts: 146
Registered: ‎03-27-2011
My Device: Blackberry Playbook
My Carrier: WiFi

Re: Modify transparency tag from app?

The overhead shouldn't be significant for almost any app, I wouldn't worry about it unless you're doing something very intensive.
----------------------------------------
If this post solved your problem, please click the 'Accept as Solution' button.
If you found this post useful, please provide a Kudo. Thanks.

Approved Apps: Celestial Slingshot
Developer
Posts: 101
Registered: ‎03-18-2011
My Device: Playbook Simulator
My Carrier: AT&T

Re: Modify transparency tag from app?

Yeah, it just seemed a little messy that way, but it can definitely be a consideration down the road for a later version of the app. As a side note... just submitted my app!