Skip to main content
Participating Frequently
November 29, 2010
Question

setting wallpaper

  • November 29, 2010
  • 2 replies
  • 1258 views

Hey everyone,

is there a way to change the phone's wallpaper from an AIR for Android app?

Thanks!

This topic has been closed for replies.

2 replies

Participating Frequently
March 15, 2012

I've found the answer!

I simple create the background in flash then convert it to a flex container, then add it to the project.

Search the net for creating flex containers in flash, there are a number of videos about it on Adobe TV too.

Astraport2012
Known Participant
March 16, 2012

Could you explain in detail how to do it? Thank you.

Participating Frequently
March 16, 2012

Certainly can!  Here goes.  If you have CS3 or CS4 of Flash Professional (you can only do this with the pro version), download the Flex Component Kit for CS3 and CS4, unfortunately I don't have the download address but if you search for it on the Adobe site, you'll find it.  For CS5 users, it is already built in, no download required.

First, create a new Actionscript 3 fla. and create an empty MovieClip. Calling it something appropriate, such as BackgroundContainer.  Make sure you tick Export for Actionscript and that the class name begins with a capital letter. Then click OK!

Next, select the MovieClip in the library and go to the Commands menu and select Convert to Flex Container.  This will change your MovieClip so that it has a black icon, adds a Flex Component Base component and a Flex Content Holder to your library.

Next, import the graphic you want on the background.  I've imported a small 24 by 24 graphic and repeated it so that it fills the size of the background you require.

Next, create a new layer in the background MovieClip, and drag the FlexContentHolder component to it, then resize to fit your background.

And finally, make sure that in the Publish settings, the SWC is ticked, then click publish!  That's the background component complete.

To use the component, you can do it one of two ways:

1) In Flash Builder, open the project properties and select Flash Build Path and click the add SWC button.  Browse to were you created the SWC and click Open and then OK!  You should then see it appear in the Custom section of the Components panel.

2) Open Windows Explorer (or the Mac equivalent if you have a Mac), find the SWC and drag it over to the libs package in Flash Builder, again it will appear in the Custom section of the Components panel.

Then in design mode, just drag it on to the screen and make it fit to your background of the Flex app.

A WARNING here: I have never successfully been able to place more than one Component in a container like this.  I've had to put the components outside the container because it just errored on me!  But putting them outside the container is fine as long as you are in BasicLayout mode!

I hope this helps. And before I go here is the link to a video showing you how to create components using a very similar method to this.

http://tv.adobe.com/watch/under-the-hood-with-adobe/create-custom-flex-components-with-flash-cs3/

Participating Frequently
January 2, 2012

I'd like to know that one too!  Isn't there anyone out there that knows if it is possible?

Thanks