Copy link to clipboard
Copied
I making a web site with 4.5 . I would like to know how to add a image as a background insted of a color background
Here is a bare bones sample to see if this helps you understand better,
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <s:layout> <s:BasicLayout /> </s:layout> <s:Image id="bgImage" width="100%" height="100%" source="@Embed('path/to/image.jpg')"
...Copy link to clipboard
Copied
Just use an image tag in your application like so, you might want to adjust scaleMode depending on your background image.
<s:Image id="bgImage" width="100%" height="100%" source="@Embed('path/to/image.jpg')" scaleMode="stretch"/>
Copy link to clipboard
Copied
I new to the program where do I put the code ?
Copy link to clipboard
Copied
Here is a bare bones sample to see if this helps you understand better,
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <s:layout> <s:BasicLayout /> </s:layout> <s:Image id="bgImage" width="100%" height="100%" source="@Embed('path/to/image.jpg')" scaleMode="stretch"/> <!-- Continue Adding elements to your site below this --> </s:Application>
Copy link to clipboard
Copied
thank you that did it
Copy link to clipboard
Copied
How do I make the image fixed