You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Justin Mclean <ju...@classsoftware.com> on 2017/02/14 07:46:21 UTC
[FlexJS] background images not showing
Hi,
Can anyone confirm this is a bug?
I’m getting the text showing but no image showing. I can see in the network panel that the image is being downloaded.
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic">
<js:valuesImpl>
<js:SimpleCSSValuesImpl/>
</js:valuesImpl>
<js:initialView>
<js:View>
<js:VContainer percentWidth="100" percentHeight="100">
<js:style>
<js:SimpleCSSStyles backgroundImage="./background.jpg" />
</js:style>
<js:Label text="Hello" />
</js:VContainer>
</js:View>
</js:initialView>
</js:Application>
Thanks,
Justin
Re: [FlexJS] background images not showing
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> Is this for SWF or JS?
For JS. Assume any FlexJS codeI post is for JS, if I was targeting AS I’d used the FlexSDK.
> For both platforms, you may need to set width/height on the View.
As I said the text shows just not the images, so there's some width/height there. Can the parent view be smaller than the container?
I changed view to this:
<js:View height="100" percentWidth="100">
And a small percent of the image show but just behind the text not at the specified 100% width which seems like a bug.
If I change to this:
<js:View height="100" percentWidth="100">
<js:VContainer percentHeight="100" percentWidth="100”>
It works as intended.
Thanks,
Justin
Re: [FlexJS] background images not showing
Posted by Alex Harui <ah...@adobe.com>.
On 2/13/17, 11:46 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>Can anyone confirm this is a bug?
>
> I’m getting the text showing but no image showing. I can see in the
>network panel that the image is being downloaded.
Is this for SWF or JS? I don't think there is SWF-side support for
backgroundImage. It would be great if a volunteer extended
SolidBackgroundBead and supported it.
For both platforms, you may need to set width/height on the View.
HTH,
-Alex