Flex :: Set Background Image In 4.5?
Jul 10, 2011I have written a custom skin in Flex 4.5, which shows a custom image. I want this to my background image, so how can I set this skin to the application container?
View 3 RepliesI have written a custom skin in Flex 4.5, which shows a custom image. I want this to my background image, so how can I set this skin to the application container?
View 3 RepliesI am developing a website in flex. And in that, i am trying to set the background image of my application. like this: parentApplication.setStyle("backgroundImage", data.image_src);
From a different location.
My issue is that, the images that i have are small and hence they are being stretched when used as background images. I want to avoid that from happening. How can i do it?
I'm using Flash Builder 4 to create an application. I need to set an background image for the app. I've pulled through the data from XML. I am using an <mx:Image> for the background-image. But I need elements to then be added inside it. How do I achieve this? I considered using Layers, but dont know how you achieve this.
View 3 RepliesI want to give the users the ability to set the background color or choose image to make it background (Tile, Center and Strentch). I tried couple of things with no luck such as trying to chaing a Skin object and assign it.and tried something like:
FlexGlobals.topLevelApplication.setStyle("backgroundColor",uint(chosenColor));
I have tried setting the background image this way, but it doesn't work. how to set the background image of a rich text control in flex as easy as possible?
.rte{
...
backgroundImage: "assets/globe.jpg";
}
[Code].....
I want to load an image into the background of my Flex app. However, I am wondering about a few things, and have a few contraints.I want it to be much like the way it's done with CSS. See this example of fullscreen background images with CSS.It is very important that there is no white-space (background colour) showing behind the image, and that the image is not stretched. This would mean some of the image would be cut off. This is absolutly fine. Actually, the first five points in the bulleted list on the linked page above are all exactly what I am after.I am relitivly new to the Flex framework, but have a strong AS3 background. So I can do this easily with actionscript using a mask, stage.width/height, the stages RESIZE event, and a little bit of Math. But I am wondering what would be the "Flex" way of doing this?I don't want to narrow the answers, but would I create my own component, that extends canvas, that I put behind all my other content? Or to I set some property of the application?
View 5 RepliesI was wrote the following code to set the background image in one vBox.
vBox.setStyle("backgroundImage", "PreviewBackground.png");
vBox.setStyle("backgroundAttachment", "fixed");
Where the height and width of vBox was 250 x 350 and the height and width of background image was 400 x 400.The problem is that the background image doesn't show the full image. The image has cropped. How can i show the full image as a background image?
I have assigned a logo image of my software to HBox as follows [code]...
Now I need to change the backgroundImage to some other image on a event.
CustomAppSkin Class
<?xml version="1.0" encoding="utf-8"?>
<s:Skin name="CustomApplicationSkin"
xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
The project I'm working on requires older libraries that extend mx components (such as TitleWindow and TabNavigator), I can't use what I know about Spark skinning directly. However, since the project is being programmed using the default Spark theme (with my modifications on top) rather than the Halo theme, I apparently don't have access to the styles I need (namely backgroundImage and contentBackgroundImage which apparently require Halo to be active). Simply setting Halo to be the theme will break other things, not the least of which my own theme.
Plans are in the works to replace the older libraries or at least patch them better to Flex 4, but as of right now, I need a way to style/skin these components without modifying them directly. It would be ridiculous to be unable to add a background image to a TitleWindow's content area! I've searched the internet high and low all day and tried countless variations of styles, skins, selectors, and combinations thereof with no luck. How to add a background image to the content of a mx TitleWindow while using the Flex 4.1 sdk?!
In a component 'Group' I drag multiple pictures at one time I need to clean this component, but contains a component BitmapImage and I will not be erased:
<s:Group id="droppedImages" width="100%" height="100%">
<s:BitmapImage id="bg" source="@Embed('lineal2.jpg')" width="1024" height="577" verticalCenter="0"/>
[code].....
I would like to change the bacground image for the preloading bar in Flex, the one which appears before loading your application. This article describes the way in which you can change the background-color, but is there a way to add a background image (and keep the loading bar on top of that)?
View 3 RepliesAfter upgrading a project from Flex4 Beta1 to Beta2, I've found that the background-image style is no longer supported on Halo components.Eg:
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundImage="@Embed(source='myImage.png')" />
Note that jira issue SDK-23050 points out the following :ackgroundImage is not supported for Spark skins.But this is not using a Spark skin, just a standard Halo component.
I have created a tile list with custom item renderer and in terms of functionality it works as it should. I reduced the width and height of the item renderer to 95% which then shows the tile lists background in the remaining 5% of that item. The problem is that only when I hover over the item, the background is covered up and I cant get a gap to appear between items. Is it possible to change the height and width of the hover over?
<mx:Canvas id="Card2" label="Card2" width="100%" height="100%" backgroundColor="#FFFFFF">
<mx:TileList id="tlCard2" x="10" y="10" dataProvider="{acCard2}" width="580" height="340" dropEnabled="true" borderThickness="0" maxColumns="4" maxRows="4" rowHeight="85" columnWidth="145" borderColor="#000000" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="solid" dragMoveEnabled="true" dragEnabled="true" backgroundImage="{imgGuide}" themeColor="#BCBCBC">
[Code] .....
I have an Image object that gets resized to the containers size when the image loads.The images that it will load are dynamic in size so after resize I end up with a sliver of the image object's white background showing.How can I make the Image object not have a white background and be transparent.Parts of the PNG's have transparent parts but show up as white due to the white background of the object is it loaded into.
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" headerHeight="20" >
<mx:Script>
<![CDATA[
[code].....
I want to display an image instead of Color in item Selection and Hovering(mouse over) in Flex DataGrid. how i can do it ?
View 2 RepliesWe are currently building a new web site and have run into some issues with our programmer. I am trying to do some research to see if we can find a way for my issue to be solved so that I can let my programmer know.[code]...
View 1 RepliesI have a tile list that loads images from a folder within the app.
When i load images with a transparent background it gives the image a white background is there any way to get the image to be transparent? [coded]...
I want to embed some video into my HTML page. As background I want to use big picture. And above it I want to insert loop video with (i.e.) walking man.So, can I embed video (without flash and any player controls) in page?Can I decode video with transparent background? Is there any codecs which support transparent background (alpha-channel)?
View 1 RepliesI am relatively new to Flash CS3 and i have been learning Action-script 3 over the past week. I have come quite a long way and i have made a site in flash but i just have a question.I have been using an image as my background and i am happy with the way flash automatically scales all the objects in my file but the background image does not scale. Is there a way to do this? I have found out things online which show me how to add auto-resizing to the background but this knocks off the flash auto scaling/resizing for everything else.
View 4 RepliesI have an image and i want to remove white color from image.That removing color is same like its background color. If anybody have any idea of this problem please answer?And my application in Flex 3 so please send me action script code of this problem.
View 2 Replieswas wondering if anyone could assist me with some actionscript. I am working on a project similar to this (thehideout.org.uk/refuge/) and making the background image move around as if it the scene is a POV.
View 1 RepliesIv got a background image 3 times the length of my stage.. what im trying to do is create a scroller so when you press a right button or a left button, it scrolls to the left third or the right third of the image.
[Code]...
I am using this following code to display images using xml.Everything is working fine for me but i have to add background image or border to the displayed image using function BitmapFileMaterial.
using BitmapData or Bitmap Class but same functionality.
[Code]....
I am making a new flash website and i stack on the as3 part.My site have a menu like all the site do.Now on the site load there is a background picture.When you press one of the menu buttons, the background image will change to this button specified image.But all that in an animation of fade in and out.My problem that i have everything but i cant know which image was before it changes to the buttons specified one. It maybe require as3 which i dont know.I cant upload here my work. its personal.But i ask you the professionals, please make a short fla file which will have the code and animations i need.(if you cant understand me)Please, make a fla file, which contains random 3 images.At the start it will have main background and a menu on it(just text-for fast and short work)The menu is 3 text ine(main,about,contact)now, make that when you press about(for example) it will change the main image(background) to the image of the about page.
View 2 RepliesAs the title already states i have a (big) problem importing a PNG in a Flex 4 application.Created a PNG file in Photoshop with transparent background. Loaded in Flex application using this code:[code]So when the complete event fires the data has been loaded and it is possible to assign the data loaded to the image component named Thumbnail:[code]Unitls now everything works as expected!But when i try to send the Thumbnail component's data to a WCF service i receive a photo with white background:[code]
View 2 RepliesI am changing image through flex every time i change it saved into server directory with same name(which i am referring to show). So when i refresh my page my browser didn't send new request to server since it's already in request.so didn't getting new image.Tip:- when i clear browser history it will come with new image
View 2 RepliesI'm told that the following chunk of script will center the stage on resize, but not knowing much of anything about actionscript,
myListener = new Object(); myListener .onResize = function () { ... } Stage.addListener( myListener ); // later ... Stage.removeListener( myListener );
Set a .swf as a background image. I want it to still move.
View 3 RepliesI want to convert a .avi into a flash movie and import it into Dreamweaver as a background image so that it will expand in all different resolutions 1. what do I need to consider when building this in Flash (using MX 04)?2. What should my html look like in order to call this file as a background swf (and poss css file)?
View 7 Replies