Actionscript 3 :: Set The BackgroundImage In Mxml At Run Time?
Mar 18, 2011
public var log_img:Class;
[Embed(source="../images/logo.jpg")]
Which is used this way:
<monitor:MonitorDisplay backgroundImage="{ log_img }"/>
The above will Embed the image into the swf,but I want the image to be loaded from the current website,like
<img src="/images/logo.jpg" />
How to do this?
I tried this but doesn't work:
[source="http://domain.name/images/logo.jpg"]
View 2 Replies
Similar Posts:
May 24, 2011
I have a custom component that has an background image.ut when you generate this component by an ItemRenderer in a List, the background image is gone.hat am I doing wrong?Here is an image. The first element is not generated in a list and has a background image.he other three are part of a List and have no background image.Here is the code of the MXML of the List
<mx:VBox>
<solutionItems:displaySolutionItem /> <!-- This element shows the background image -->
<mx:List selectable="false"
[code].....
View 3 Replies
Mar 27, 2010
When i try to override the updateDisplayList to draw a backgroundImage for a tab navigator, the background does not fill till the end of the tab navigator. A space equal to the tab bar height does not get filled by the background. same is the case when I use an Image as backgroundImage. Any idea how to get this resolved?
View 2 Replies
Jun 11, 2009
Our application has over 15 different top-level mxml files to create individual controls that are used in our pages. We are using Ant to do our automated builds, and are calling the mxmlc task for each mxml file separately (See question 78230 similar example). Running the compiler separately for each mxml file, however, is already adding up to a considerable amount of time. Our build time is approaching 10 minutes, 5 minutes for compiling our flex apps, and 5 minutes for compiling hundreads of java classes, building jars, installer etc. Each flex compile run is reasonably quick (15-20 seconds), but they add up.
Is there a way to compile all of them with one call to mxmlc?
View 2 Replies
Jul 17, 2009
I have a flex MXML UI that is building a set of radio buttons using the Repeater component:
<mx:Repeater id="radios"
dataProvider="{_lists.(@id == _question.single.@response_list).group.listItem}">
<mx:RadioButton groupName="responses"
[Code].....
View 3 Replies
Oct 27, 2009
I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
[code].....
View 2 Replies
Sep 24, 2009
Does MXML get compiled down to as3 and then converted to flash bytecode? Also, is there a significant performance penalty to compiling mxml vs compiling as3?
View 3 Replies
Jun 4, 2011
I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent properties via MXML. For instance I might want to adjust the font color or style for the label and text input. toy component which aggregates both a label and a text input:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]....
View 1 Replies
May 28, 2011
I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 Replies
Oct 31, 2011
I am dynamically creating a canvas, and I need a background image within the canvas. The canvas is created as it accepts drag drop but the background image does not show up. The trigger for the canvas is: buttonNew.addEventListener("click",addCanvas); The canvas code is:
[Code]...
View 1 Replies
Feb 3, 2011
What I'd like to do: create an MXML component with some children, then extend it via MXML to create a new component with more children, without losing the original set.In other words
create a component bc.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
View 1 Replies
Jun 22, 2011
I'm trying to do this using only mxml, no <script> tags, although I don't necessarily need a solution that's only mxml. It was more of an educational exercise to see if I could do it all in mxml. I have a custom component that has a slider and textinput and their value/text properties are bound together. I'm surfacing a few properties of the slider in my component so that it can sort of be treated like a slider.
[Code]...
View 1 Replies
Sep 27, 2011
i have defined some functions in a component mxml file let us say addbutton() now i want to call this function in main mxml file.
View 2 Replies
Apr 23, 2010
main.mxml
[Bindable]
private var _dp:ArrayCollection = new ArrayCollection([
[code].....
View 1 Replies
Jun 19, 2011
I have 3 mxml components. In Component 1, I let the users fill in some data. In Component 3 I want to use the data, but I can't find a way to make it work.
View 1 Replies
Jul 7, 2010
suppose i have 3 buttons(for example say, productin, marketing, sales ) on my main.mxml..once i click on one button it should take me to abc.mxml page with production data, once again if i click on second button it should take me to the same abc.mxml but with marketing data. same as for 3rd button also, how can i achieve this ?
View 2 Replies
May 18, 2011
I've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
View 1 Replies
Mar 9, 2012
This is a project I'm working on for a simple demo tutorial application in Flex. I am using mxml pages. You can see to the left that I will have my main application and then other mxml files (In the Examples Package) as the examples that will be loaded into the main application mxml. How can I dynamically pull the value from the object in the list to load the child mxml file into the container that I have further down in the application?
View 1 Replies
May 16, 2011
I have a method in CustomPanel.mxml and I need to use id which is available in Main.mxml. Below is my sample code
Main.mxml
<local:CustomDivideBox id="div1">
Custompanel.mxml[code]....
View 2 Replies
Jul 25, 2011
I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example,
Application.mxml:
<Application>
<source="external.mxml"/>
[code].......
View 4 Replies
Aug 12, 2009
A Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.
eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )
View 3 Replies
May 6, 2010
I am looking to subclass RemoteObject. Instead of:
<mx:RemoteObject ... >
<mx:method ... />
<mx:method ... />
[code].....
View 1 Replies
Jul 21, 2011
My Application is in Flex 3.5. My Code is Here,How to take the id value of textare?[code]...
View 2 Replies
Apr 9, 2009
I have this clock code and would like to know what needs to be added or changed for it to reference the time off the server and not the local computer time (and preferably reference the server just once and not repeatedly). I already have a file on the server "time.php" that is providing the milliseconds. I know it should be fairly simple, but I just can't wrap my head around it.
[Code],,,
View 2 Replies
May 5, 2010
I use CS4.
Code:
package {
import flash.display.Sprite;
import flash.events.Event;[code]...........
Both of these are saved in files with the name same as the classes.
Both are saved a folder which also contains an fla file name hello.fla.So,when test the movie(hello.fla),after choosing the document class as WavyBall,I get these errors: 1046: Type was not found or was not a compile-time constant: Ball.
Source: var Ball:Ball;
1120: Access of undefined property stage.
Source:Ball.x=stage.stageWidth/2;
1120: Access of undefined property stage.
Source:Ball.y=stage.stageHeight/2;
5000: The class 'WavyBall' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.What is wrong?
View 3 Replies
Dec 11, 2009
I have a fairly complex animation movie clip within my main timeline in a Flash file. When you click a button, it plays the movie clip, then goes back out to the main timeline. The first time the movie clip runs, it plays choppy and slow, but if I play it two or more times, it plays correctly (smoothly). Is there some actionscript I need to preload the movie clip, or some other solution to the first-run slowness?
View 2 Replies
Aug 24, 2009
I'm testing Live streaming with FMSS. The stream is pushed to FMSS buy Adobe FMLE software. Streaming works fine until I reach 1300-1400 simultaneous connections.No matter what the encoding ratebit is (150kbps or 2000kbps) the stream is no longer play from time to time (5-8 seconds).
The CPU (2xIntel Quad) is loaded less than 20% and memory used is about 2 GB (there is plenty of memory installed 32G). The OS is RedHat 5.3 64bit platform. Network uplink maximum rate is 4Gbps.I disabled the Queue but the problem still persist.
View 1 Replies
Jul 29, 2010
I added in my application universal time, and I gave start and stop time. The process is going smoothly, but if I change my system (local) time, the entire time will be changed. Is there any solution to solve this problem?
[Code]...
View 6 Replies
Aug 27, 2010
I am working on a site that has a clock but it displays in military time, is there a way to change it to regular time. The following is the Action script:
[Code]...
View 8 Replies
Jul 6, 2009
I've loaded a video into the FLVPlayback component and I'm looking for a way to get the total time and the time played so far and output them to two text fields so the end result would look something like "00:12/00:50".
Right now I'm defining the video by the components inspector but I'm eventually hoping to define this bit by actionscript as well.
View 6 Replies