• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

background image in web app

New Here ,
Jul 24, 2011 Jul 24, 2011

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

Views

767

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jul 25, 2011 Jul 25, 2011

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')"                

...

Votes

Translate

Translate
Participant ,
Jul 25, 2011 Jul 25, 2011

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"/>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2011 Jul 25, 2011

Copy link to clipboard

Copied

I new to the program where do I put the code ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 25, 2011 Jul 25, 2011

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2011 Jul 25, 2011

Copy link to clipboard

Copied

thank you that did it

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

LATEST

How do I make the image fixed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines