Flex :: Unable To Detect Assignments To Item?
Apr 1, 2010
<mx:Label text="{(item1 as INewsItem).displayName}"/>
For the above code in Flex, I get this warning :
Data binding will not be able to detect assignments to item1.Why? How to Fix it?
View 3 Replies
Similar Posts:
Dec 21, 2010
I am migrating an application from Flex 3 to Flex 4. In some cases there are popup windows of which the width and height is bound to the application width and height.
[Code]...
View 2 Replies
Dec 11, 2009
I have a custom ActionScript class:
package EntityClasses
{
import mx.collections.ArrayCollection;[code]....
And I want to bind these values to textBoxes, so that when user types information to the textBoxes it is populated in the class too. Is Flex 3 bidirectional so that marking the class with [Bindable] I can bind the values to a textbox for example?This is my mxml file in which I try to bind the class:
import mx.rpc.events.ResultEvent;
import EntityClasses.CompanyInfo;
[Bindable][code].....
The flex compiler shows me this kind of warnings: Data binding will not be able to detect assignments to "company".
View 4 Replies
May 20, 2011
In IE, the session work, but in Firefox, it always return empty value.
I have set $_SESSION['apple']='1' in index.php
When executing a Flex 4/flash app that will allow user to browse an image file using filereference for upload to the server (this app is image uploader), the file will then pass to second.php to validate whether it is an image.
In the second.php itself, I have a function that need to retrieve $_SESSION['apple'] value which was set in index.php, it always return empty string in Firefox and Chrome but work on IE9.
Has anyone came across the same problem with $_SESSION on Firefox and Chrome?
How do I make sure the second.php can retrieve $_SESSION?
View 4 Replies
Jul 25, 2009
I have made the following item renderer in mxml, but when I use it in a list for some reason I can not select it. Am I doing something wrong?
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalScrollPolicy="off">
<mx:Script>
[code]......
View 2 Replies
Dec 21, 2010
I have a spark List defined as:
<s:List id="symbolList" dataProvider="{symbolListCollection}" change="symbolNameChangeHandler(event)"></s:List>
With the change handler defined like this:
protected function symbolNameChangeHandler(event:IndexChangeEvent):void {
symbolList.validateProperties();
changeSymbolView(symbolList.selectedItem);
}
and symbolListCollection as an ArrayList filled with Strings.
At first, the change event works fine, and I get what I expect.
However, if I Ctrl-click on the selected item, to de-select it, i am unable to ever select an item again.
When I click on something to try to select it, the change event DOES fire, however, the ItemChangeEvent has both oldIndex and newIndex set to -1
View 1 Replies
Apr 1, 2012
I have the following code:
<fx:Script>
<![CDATA[
import shared.GlobalsManager;
[code].....
View 1 Replies
Jan 15, 2010
I'm having a spot of trouble with keycodes, for some reason my program is unable to detect when i press any key but the space bar, even when i run a trace on the last key pressed it dosn't bring up a code on any other key but the space bar, : in the output box, when i press the space bar i get this message:
Key Pressed: (character code: 32)
but if i press an arrow key i get this message:
Key Pressed:
it cant even find a code .here is my code: ;[code]....................
View 5 Replies
Jan 22, 2010
I can't get my head around this. I know there's a clever way to do this but none of my ideas seem to be the solution. I'd like to dispatch an event when there are no more items to be loaded. I'm working with Drupal and AMFPHP and loading some nodes. The number of nodes may vary from day to day so I need a way to know when the last one has loaded.
In the code below, I am building an array to use elsewhere in the application. Once all nodes have finished loading I'd like to know what the final length of portfolioItems is.
[Code]...
View 2 Replies
Mar 10, 2011
I've got an array of sprites which I'm animating by incrementing their rotationX property. What I want is for them all to disappear once the last item in the array has come full circle. The problem is that their rotation speeds are being generated by a randomized function, so I can't just go to the end of the array to find the last one. Each time it will be a different one.
So I have an array of Sprites:
for(var i:int=0; i<arrSprites.length; i++)
{
addChild(arrSprites[i]) ;
}
Then I have my event listener:
addEventListener(Event.ENTER_FRAME, loop);
And my handler:
private function loop(e:Event):void
{
for(var i:int=0; i<arrSprites.length; i++)
{
[Code]....
View 1 Replies
Feb 15, 2011
I have this datagrid:
<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>
[Code]....
What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).
View 1 Replies
Jun 10, 2011
I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.
When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.
Code:
public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;
[code]...
View 1 Replies
Mar 4, 2011
<mx:itemRenderer>
<mx:Component>
<mx:Canvas>
[code]......
View 2 Replies
Apr 26, 2011
I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,
if(itemIndex == 0)
this.currentState="selected";
this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,
<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">
My states are like this,
<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........
View 1 Replies
Nov 4, 2011
Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.
View 3 Replies
Oct 26, 2009
Is there any harm in registering an object with the same event and handler multiple times, without first removing the listener? It appears that Flash either overwrites the event subscription or ignores duplicates. What I'm trying to avoid is having to use if/else and boolean variables to make sure duplicate event subscriptions don't occur.
I've attached a sample fla... which I'm aware looks useless, though it illustrates my point. It loops through the timeline a few time and makes the addEventListener call a few times. Clicking on the button only calls the handler once, despite the multiple assignments. So it appears to be safe and Flash doesn't throw an error, I just wanted to know if there's some sort of garbage-collection-like issue
View 6 Replies
Jul 13, 2011
I searched this and other forums and could not seem to find an answer for this
i am attemting to define a variable and use that variable to assign array items to a text string[code]...
View 1 Replies
Jul 16, 2009
I posted this question yesterday, with no responses, hoping for better luck today for such a vague problem. Pretty much, I have animated mc buttons, that over the course of the website interaction (various transitions) move around the site area. Unfortunately, after doing their big transition once or twice, they are animating to previous frames actionscript... in other words, if my btnA is in a differenct position due to these transitions, when I click it, it animates "from it's previous position"... does that make sense? Is there anything I can do to be sure that all previous code is dropped for the current frame code? seems odd, but there must be a way to do this cleanly?
View 2 Replies
May 31, 2010
I need to make a flash website for one of my assignments, but whenever Im try and make something, none of my action script is compiled.Ive done up a test file that it 2 frames, with a stop(); function on the first frame, no other action script. I get no errors, however it just continues to loop through all the frames. Here's the .fla:
[URL]
Another interesting this is I can type gibberish into it and I dont get any compiler errors....its as if it doesnt even look at my actionscript. Even if i purposely put and error in, nothing at all...
It has to be something Im doing when working, as i can open up other files that Ive made in my class and publish them without this problem happening...I can even edit them a bit, but after a short while of editing (im not sure when) then suddenly this problem appears in them.
View 1 Replies
Sep 22, 2008
Probably a lack of knowledge on my part (no, definitely...), but how do I go about loading dynamic text fields from an array, using dynamic variable naming?
for(j=0; j<count; j++){
this["contacts_mc.nameText"+j+".text"] = inputArray[j][0];
}
"nameText0", "nameText1", etc are the instance names of dynamic text fields in the contacts_mc movie clip, which is on the root level of my timeline.I get no return at all when tracing the target dynamic text field as trace(contacts_mc.nameText1.text), for example. Dynamic naming examples I've come across don't seem to work here - perhaps a difference in how dynamic text fields are assigned?
View 2 Replies
Mar 11, 2011
I'm trying to get the menu width of a menu item in flex 4. I can get it but I have to show the menu first, then hide the menu, do a calculation, and show it again. Is there an easier way to get the item menu width without this hassle?
View 1 Replies
Jun 30, 2004
the situation | an instance of the DateChooser component reads an xml file which houses info for homework assignments and their due dates. if there is a due date, make sure that date is highlighted on the DateChooser component. from what i've been told, the xml file stores urls which will tell if there is s/thing due on a particular date. the xml file | very simple, has an <activity> element with a 'date' attribute, i.e.
[Code]...
my remaining questions | What needs to happen as soon as the xml file is loaded? i.e. do i call a function which parses the xml data and puts it into an array? then the DateChooser component iterates thru the array looking for boolean values noting if there is an activity or not and if so, on which day. if it finds one, it sets its highlight property to true for that particular day. i'm setting up the xml file correctly.
View 11 Replies
Dec 7, 2011
ow do you display HTML formatted text in a Spark custom item renderer (Actionscript)?
Sample Code:
The html content in item.post_content displays as plain text in the IconItemRenderer messageFunction snippet below (which is just the default generated code for Icon Item renderer):
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer iconField="iconField"
iconWidth="64" iconHeight="64" labelField="post_title" messageFunction="getPost">
[code]...
View 1 Replies
Feb 28, 2012
I have created a style in which i am defining a font family.When i apply this style to label it reflects the font were as there is no change when it is applied to a spark button.I Tried various way to Apply font style but it doesn't work.Other properties work fine except font family. Even i tried creating skin class and set the font family style of label in it. While previewing the skin i can see the changes but when i apply it to buttonApproach 1
@font-face{
src:url("HARNGTON.TTF");
fontFamily: MyF;
[code].......
View 2 Replies
Oct 17, 2010
Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.
View 1 Replies
Jan 26, 2010
If my ComboBox is editable how can I tell if a change event comes from a change to the TextInput or a change in the selectedIndex of the drop down?
Is there a way to check for this in the event object?
View 1 Replies
Sep 2, 2010
Is there any way to detect if AdvancedDataGrid itemClick event is actually caused by the user dragging? I'd like to take action on click, but ignore drag.
View 1 Replies
Jul 20, 2010
I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]
View 5 Replies
Jul 22, 2011
I have made a drop down menu with 7 items but as the invisible bottun around each item interferes with the item besid it, when i try to roll the mouse from one item to another, the invisible bottum dont work and the dropdown remains open.
View 1 Replies
Jul 13, 2009
I want to be able to select an item from my list component and fire a function directly related to selecting that item. list is called "tidlist" function is "selecttid(n)" the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select one (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.
View 1 Replies