Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-18-2011, 09:58 AM   #1
umesh8965
Registered User
 
Join Date: Dec 2010
Posts: 47
Default Background Image in mx:VBox

hi friends
please see following code, i just want to display image in Vbox, what i'm missing on that?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="">
<mx:Style>
mx|VBox {
backgroundImage: Embed("a.png");
backgroundSize: "100%";
}
</mx:Style>
<mx:VBox height="200" width="200" />
</mx:Application>

thnx for adv
umesh8965 is offline   Reply With Quote
Old 08-18-2011, 10:01 AM   #2
Syllogism
capt. Obvious
 
Syllogism's Avatar
 
Join Date: Aug 2006
Location: South Africa
Posts: 826
Default

could it be you are using the incorrect syntax for the embed commend? isn't it like this:

[Embed(source="a.png")]
__________________
S y l l o g i s m, Cptn Obvious

"I think you'll find my argument is flawless [Citation][Citation][Citation]"
Syllogism is offline   Reply With Quote
Old 08-18-2011, 10:02 AM   #3
Syllogism
capt. Obvious
 
Syllogism's Avatar
 
Join Date: Aug 2006
Location: South Africa
Posts: 826
Default

could it be you are using the incorrect syntax for the embed commend? isn't it like this:

[Embed(source="a.png")]
__________________
S y l l o g i s m, Cptn Obvious

"I think you'll find my argument is flawless [Citation][Citation][Citation]"
Syllogism is offline   Reply With Quote
Old 08-18-2011, 10:08 AM   #4
umesh8965
Registered User
 
Join Date: Dec 2010
Posts: 47
Default

thnx ur replay

actually it's complie but givs me a warning

Warning: The style 'backgroundImage' is only
supported by type 'mx.containers.VBox' with the theme(s) 'halo'.
umesh8965 is offline   Reply With Quote
Old 08-18-2011, 10:17 AM   #5
Syllogism
capt. Obvious
 
Syllogism's Avatar
 
Join Date: Aug 2006
Location: South Africa
Posts: 826
Default

is this a flex 3 project? is that why you are using the mx component? you could use a spark component rather? like Hgroup
__________________
S y l l o g i s m, Cptn Obvious

"I think you'll find my argument is flawless [Citation][Citation][Citation]"
Syllogism is offline   Reply With Quote
Old 08-18-2011, 10:26 AM   #6
umesh8965
Registered User
 
Join Date: Dec 2010
Posts: 47
Default

i'm using sdk4.0 and only helo controls of flex, i see no of examle which is work with mx:Vbox.

wht's prob in my code
umesh8965 is offline   Reply With Quote
Old 08-18-2011, 11:33 AM   #7
Syllogism
capt. Obvious
 
Syllogism's Avatar
 
Join Date: Aug 2006
Location: South Africa
Posts: 826
Default

try this:
<mx:VBox id="vBox"
backgroundImage="@Embed('image.png')"
width="250"
height="250">
</mx:VBox>
__________________
S y l l o g i s m, Cptn Obvious

"I think you'll find my argument is flawless [Citation][Citation][Citation]"
Syllogism is offline   Reply With Quote
Old 08-18-2011, 12:14 PM   #8
umesh8965
Registered User
 
Join Date: Dec 2010
Posts: 47
Default

hi Syllogism

i change code.. but error is coming

error: The style 'backgroundImage' is only
supported by type 'mx.containers.VBox' with the theme(s) 'halo'.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="">
<mx:VBox id="vBox"
backgroundImage="@Embed('fx.png')"
width="250"
height="250">
</mx:VBox>
</mx:Application>
umesh8965 is offline   Reply With Quote
Old 08-18-2011, 12:15 PM   #9
Syllogism
capt. Obvious
 
Syllogism's Avatar
 
Join Date: Aug 2006
Location: South Africa
Posts: 826
Default

did you remove the styling attributes?
__________________
S y l l o g i s m, Cptn Obvious

"I think you'll find my argument is flawless [Citation][Citation][Citation]"
Syllogism is offline   Reply With Quote
Old 08-18-2011, 12:23 PM   #10
umesh8965
Registered User
 
Join Date: Dec 2010
Posts: 47
Default

yes!
umesh8965 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:04 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.