header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
amutha
Points:0
Posts:0

12/6/2009 11:26:15 PM

Title: appication bg


hi i have done swf loader with xml data loaded dynamically... i want to do background image of application also changed as same xml data which is loaded in to swf loader.... can i set bg image for application regarding the changes of the swf data's?



1
Dandev
Points: 0
Posts:0
12/7/2009 1:47:09 AM



you can set the application background by using the property
backgroundImage="" backgroundColor=""

to set that dynamically use setStyle property

Application.application.setStyle("backgroundImage", "background.jpg");


2
amutha
Points: 0
Posts:0
12/7/2009 2:18:28 AM



no no i mean it can i change the application background image while changing the swf source? that mean swf source set as a application background image.. if its flower means application bg Image also flower...and if its animal means its also set as a animal can i do it?

3
Dandev
Points: 0
Posts:0
12/7/2009 3:40:49 AM



yes you can do that, add complete handler to swf loader component so that when you load a swf like flower it fires complete handler which loads swf file in application background:

<mx:SWFLoader x="112" y="113" source="flower.swf" complete="setBackgroundSWF('flower.swf')"/>

//call this function and pass swf source to load as background of your application

private function setBackgroundSWF(swfSource:String):void{
		
Application.application.setStyle("backgroundImage",swfSource);
}

4
amutha
Points: 0
Posts:0
12/7/2009 5:26:47 AM



ya, i done it...thanks...


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+12+5 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions