Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:33:03+00:00 2026-06-03T02:33:03+00:00

How to add a background image? I just tied to code like: .bg{ backgroundImage:Embed(source=../../assets/Interaction-Screen_BG_pump.png);

  • 0

How to add a background image?
I just tied to code like:

.bg{
backgroundImage:Embed(source="../../assets/Interaction-Screen_BG_pump.png");
}

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        actionBarVisible="true" enterFrame="view1_enterFrameHandler(event)"
        initialize="view1_initializeHandler(event)" menuKeyPressed="onMenu(event)"
        overlayControls="false" tabBarVisible="true" title="Interact"
                styleName="bg"
>

But it not work.

And also,how to create a image button?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:33:05+00:00Added an answer on June 3, 2026 at 2:33 am

    To add a background image to a Flex Mobile View or app, first create your skin class (let’s call it “ViewBackgroundSkin.mxml”):

    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark">
    
    <fx:Metadata>
        [HostComponent("spark.components.View")]
    </fx:Metadata>
    
    <s:states>
        <s:State name="disabled" />
        <s:State name="normal" />
    </s:states>
    
    <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0"  >
        <s:fill>
            <s:BitmapFill source="@Embed('assets/images/BackgroundImage.png')"/>
        </s:fill>
    </s:Rect>
    
    <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0" />
    

    If you want the image to tile the background, set fillMode to repeat on the BitmapFill:

        <s:BitmapFill source="@Embed('assets/images/BackgroundImage.png')" fillMode="repeat" />
    

    In your css file(let’s call it MyStyle.css) reference your skin class:

    s|View
    {   
        skinClass: ClassReference("ViewBackgroundSkin");
    } 
    

    In your View, set the Style source to your css file:

    <fx:Style source="MyStyle.css"/> 
    

    or add the Style to your Application file to set the background for the whole app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add a background image to a view. The image is
I have a button that uses a stretchable PNG as the background image, like
Here's my css link for images: background-image:url(images/background.gif); I just want to add some: ../
I tried putting a background image onto my view screen, unsuccessfully I might add.
How do I add background image on this code? i tried everything but the
I want to add background image to uinavigationcontroller. Please help me.
On a customer website, I have to add a background image for only a
Is there a way for me to add a separate background image for a
I want to add an image to be a background of the header, the
I need to add submenu to Appearance menu at WordPress like Background, Header, etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.