Flex :: Make Strikethrough Text Programmatically In It?
Oct 19, 2011Make strikethrough text programmatically in it? I know I can do this in MXML[code]....
View 1 RepliesMake strikethrough text programmatically in it? I know I can do this in MXML[code]....
View 1 RepliesI have two datagrids which should do everything synchronic except the data entry. I already managed to make them scroll synchronic by using the scroll event. My question is now how to select a item of a datagrid only programmatically, and how to get the mouseover effect and underlining the corresponding row with a bright blue color?
View 1 RepliesI can change the color of the label in Flex Builder, I can even BIND the color to a variable and that works, but I can't find the Color PROPERTY in order to change or reference it programatically! What is the ActionScript 3.0 code to change the font or color of a piece of text in a Flex RIA - or is caring in what color your text appears too bizzarre a request for a RIA? I wrote whole applications after just minutes of "learning" flex, how come it's taken me three days and I still can't change the color of my stupid label?
View 1 RepliesIs there an easy way in AS3 to strike-through a Sprite object. Since I want to do this on an array of squares, I was wondering if its possible to do this by simply setting a property. This would be much easier than drawing multiple lines.
View 2 RepliesIs there a way to programmatically set flash to make sure it is the most updated copy of the swf? Let me see if can be clearer as I really don't know how to ask. Say I am building a movie and I just changed it, I open my browser and see the old version. I have to clear my cache to get the updated version. Is there a way of making flash "clear its cache" so to speak? I tried googling "SWF updated ActionScript" or variations of that, but calamity ensued.
View 2 RepliesI'm working with a UILoader, and I will have it display images; but the images have to be in the library to cut down on overall content size. So I have to somehow refer to images in the library by code to display in the UILoader. How can I do that?
View 3 RepliesI'm working with a UILoader, and I will have it display images; but the images have to be in the library to cut down on overall content size. So I have to somehow refer to images in the library by code. How can I do that? Would the following code work?
var photoURLReq:URLRequest = new URLRequest(photo1:Photo1InLibrary);loader_mc.load(photoURLReq);
or
var photo1:Photo1InLibrary = new Photo1InLibrary();loader_mc.load(photo1);
I have a spark skinnable component which contains a datagroup with images. The datagroup is scrolled by hovering the mouse over it. Everything works fine except one thing: after I change the datagroup provider, I need to scroll down automatically. The problem is the images are not loaded immediately after I set the provider so (contentHeight - height) does not yet represent the actual maximum scrolling position. Is there an easy way of telling the datagroup to scroll down as its content loads? Because the workaround seems to be not so straightforward. This is the code for scrolling(thumbnailStrip is my datagroup):
[Code]...
I'm using a dateField component (with editable = true) as an itemEditor in a dataGrid. Interestingly, when editing the textInput part of the dateField it doesn't seem to react to an ESC keydown as I would expect, i.e. reload old dateField value and give up focus. This seems to be standard for most other components, but not for as most other components do.
How would you go about implementing such behavior? I can listen to keydown == escape on the TextInput portion, but just realized that I don't know how to tell dateField to give up focus and politely close - in fact I'm not even sure that's the right strategy (maybe I should work at the DataGrid level?
to programmatically reduce text inputed via xml to its bitmap primative ?
View 3 RepliesI need to load several images as Bitmap or BitmapData objects. The images are hosted outside the Flex project, and they're referenced by an external configuration file, so I can't embed them. Because the images won't be displayed directly to the user (they're being added to a PDF that is generated for download), creating a grouping of Image objects, attaching them to the application, and waiting for their LoadComplete handler to fire seems inefficient.
What is the best way to load these images into an application? Programatically load images in it?
I have I datagrid, on which I want to select multiple rows on a other user interaction than the one intended by the Programm. I'm wondering, whether I can programmatically select some rows depending only on code?
View 1 Replieshow can I assign the stroke to my LineSeries, programmatically in Actionscript ?<mx:LineSeries stroke="{new Stroke(0xCC33CC, 2)}"/>How is it in Actionscript? LineSeries.stroke doesn't exist
View 2 RepliesI'm trying to figure out how to in as3 (not mxml) add views to a view stack.For example I have a view component like so[code]I've being trying to add it to a viewstack in the following way.[code]I'm aware I have to assign ID's but for now I just want to get the view in there
View 2 RepliesI would like to know the correct way to close an AIR application programmatically. In my Spark WindowedApplication I have:this.addEventListener( Event.CLOSING, shutdownApp );and of course an implementation of the shutdownApp method (which basically tidies up temporary files).his works fine for the top-right close button of the window. However I also have functionality which needs to shutdown the application. Within the code I have called:NativeApplication.nativeApplication.exit();However this doesn't trigger the Event.CLOSING method, and so my temporary files are not cleared up. Should I not be calling nativeApplication.exit ? If so, what should I call instead? I'd rather not have to call my shutdownApp method before the NativeApplication.exit() as this doesn't feel quite so elegant.
View 2 RepliesI have this code but I am trying to convert this to actionscript so I render this programaticaly but I failed. how do i write this on AS?
<mx:DataGrid allowMultipleSelection="true" id="dg_disk" dataProvider="{people}" height="100%" width="100%" selectedIndex="0" x="50" y="50">
<mx:columns>
<mx:DataGridColumn dataField="name"
[Code]...
I have various components that are skinned through a programmatic skin. The skin class references a singleton class that holds various colors to be applied to different aspects of the component. The singleton class has default colors set to variations of black/grey etc. I'm loading in custom colors from an XML file that are then loaded into the singleton. I'm applying the custom skin through a css stylesheet that is included in the main Application mxml.
The problem is that when the swf initially loads, the components that are drawn on screen are black and don't reflect the changes in color loaded from the XML file. I have some dropdown windows that show on button clicks and those dropdowns do reflect the correct colors from the XML file. Therefore, the system is working correctly, but the initial drawing of components obviously happens before the XML is loaded and applied to the singleton.
My question is, is there a way to apply a skin to an element programmatically by calling the constructor?
I have this in my css file:
.PanControlsBackground {
borderSkin:ClassReference('skins.buttons.PanControlsBackground');
}
[Code]....
or something to that effect? This way, I can remove the loading of the skins in the css file and control when they are instantiated to ensure that the correct colors are applied before displaying the various components.
I need to programmatically add a set of controls with some amount of pixels between them. I can't seem to find how to do this in the Flex docs.
View 4 RepliesIn Flex you can stream microphone audio to an FMS/Red5 server using NetStream.attachAudio, which requires a Microphone object. Is it possible to stream audio through the NetStream from somewhere other than a Microphone? For example, from a file/embedded resource?
The reason I'm asking is that I'd like to be able to run automated tests that don't require using an actual microphone.
I have a question I came up with 3 days ago about how to do the blue underlining of a datagrid row programmatically. I thought to have found the solution, with just adding the column and row Indexes to the datagrids editedItemPosition Property.It turned out, that this is just practical if you want to be able to edit the grids row right away. But what if I just want to underline it with the blue color?Additionally how to detect that a list based Item got this kind of selection? es there a event to detect that? whats the name of this kind of selection?
View 1 RepliesHow to remove validation programmatically from flex componentThis is my method
public static function validateRequired(txt:TextInput, errorMessage:String="This field is required"):Boolean
{
[code]....
I created an application as part of an ASP.NET site. I would like to receive error notifications in my inbox whenever something goes wrong with that flash application.As I do not have control over our mail server (which has a different domain name), I cannot establish a cross domain policy allowing me to send error emails to my inbox.Instead, thought I'd send a request to an ASP.NET handler that sends an email on behalf of the flash app.Now the problem: the error report should include a screenshot of the flash application at the time the error occurred. The FileReference class however only allows file uploads with user interaction (browse dialog) and cannot be used programmatically to send the screenshot to my ASP.NET handler. The plain old POST back only allows files up to ~200K.
View 1 RepliesConsider the following mx:TextArea <mx:TextArea id="textArea"/>
periodically being updated with new lines of text using ..
textArea.text += newLineBeingAdded + "
";
how do I make sure the textarea is scrolled down to the bottom so that the last line added is visible to the user?
How to programmatically enlarge a flex 3 button's hitArea. Is there some function that I can override? There is no function in the button class called hitArea. What I have done is, I have created a programmaticskin for a button. The form of the skin consists out four arrows. In between the arrows there is nothing (meaning transparent). Because of the way the skin is shaped, it's difficult to click on the button. The skin has alter the buttons hitArea. What I'm looking for is a way to enlarge the hitArea and alter the hitArea shape in to an square. (the hit area must ofcourse still be invisible).
View 4 RepliesI have a chart with 2 line series in it.So, "Jan" (x-axis point) will have 2 Y-axis pointsThe problem :Is there anyway to force flex to show tooltip on both series simultaneously?
View 1 RepliesI'd like to be able to tell my ADG to set a specific row to be highlighted and update the adg rendering to match such new value. Note: highlight != selected.
I thought perhaps setting highlightUID would do the trick, but I can't seem to get the ADG rendering to update.
I am experimenting with e4x. I could programmatically add an attribute to an Xml by doing something like this :
[Code]...
now i have added a name attribute to it programmatically because even though the xml had no attribute called name, after the statement above, it automatically has one now. My difficulty now is how do i , as well, remove the name attribute i have inserted programmatically again?
I would like to programatically fire an event on a spark checkbox. I have a tab bar which has tabs enabled according to various checkboxes. I am loading data into these tabs. Sometimes tabs 1 and 2 will be enabled. Other times tabs 2 and 3. Other times tab 4 by itself (and all the other combinations). I have tried to enable the VBox (in action script) which is in my view stack but it seems to freeze the application. The VBox enables correctly upon user input on the check box. If I set the checkbox to be selected it does not fire the event and so does not enable the tab.
Is it possible to manually fire an event in Flex. I have tried to see if I can take the checkbox and get the event and fire it. Unfortunately I can only see addEventListener, hasEventLister and removeEventListener. There is no way of getting the events that are already on the checkbox
I need some actionscript code to simulate the dragging and dropping of a Sprite, I was wondering if it is possible to do so? if it is how?
For example to simulate a click on a Sprite I can achieve with the following line of code.
sprite.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
I have a UI component that, for various reasons, I have to construct programatically. The component is a table of radio buttons grouped by column.Right now, I'm constructing the column groups like so:
private function createGroupsForItemList(items: XMLList): void {
for each (var item: XML in items) {
var rbGroup: RadioButtonGroup = new RadioButtonGroup();
groups[item.@level.toString()] = rbGroup;
}
}
I'm trying to associate the RadioButton instances with the column groups like so:
private function createValueControl(item: XML): UIComponent {
var control: RadioButton = new RadioButton();
control.label = "";
[code]...
I can see in the debugger that the control has an association to the group:
control.group == groups[item.@level.toString()]
However, I can see equally that the group does not know anything about the control:
group.radioButtons.length == 0
I imagine that this is because the setter for group in RadioButton is a dumb setter; all it does is copy to the variable, which doesn't do the magic that groupName does. However, I can't seem to find the value I should use to set the RadioButton.groupName property correctly.So, in short, I'm stumped on how to get these bits to talk to each other. How do I do this?
-- EDIT -- It turns out that I can have the groups created and associated simply by setting the groupName property, but I can't get at the group to set up a selection listener; the group is NULL immediately after the setting process, which means that the second line below throws the Flex equivalent of an NPE:
control.groupName = groupNameForLevel(item);
control.group.addEventListener(Event.SELECT, updateSelection);