ActionScript 3.0 :: No Update For Model - BusinessArray Not Being Populated
Jun 4, 2009
The class below is the Model in an MVC triad. It works fine when the businessUnits array is populated manually (see commented block in the constructor). However, when data is downloaded from a MySQL database using a php script, businessArray is NOT being populated and an error (see attached screenshot) is thrown. I know it is to do with 'listening/waiting' for the download to complete before populating the businessUnits array.
In my Flex Project using Cairngorm, I have a model that stores a bindable ArrayCollection displayed by a DataGrid. My problem occurs when the model is updated by the responder (from a Java service, after an "update" event), because the focus located in a cell of the DataGrid is lost (the scroll position il also lost). So, I retrieve the position before the update, with DataGridEvent.ITEM_FOCUS_IN event :
I tried making a multidimensional Vector that was populated by other Vectors that are populated by Strings.
ActionScript Code: var myVect:Vector = new Vector.<Vector>; for (i = 0; i < 10; i++) { myVect[i] = new Vector.<String>; }
This is giving me a Type Coercion error, even though the Vectors all have the correct object types in them. Is the error because I'm putting a Vector full of Strings into another Vector?Also, I'm working with large amounts of data, so using Arrays aren't an option because I need all the performance I can get.
As it is said here: [URL] "If you do a Google search today for "MVVM and Flex", the first post is by somebody who claims that MVVM is not a good fit for Flex. I couldn't disagree more. Out of the box, the Flex framework makes it much easier to implement a Presentation Model than similar MVVM implementations in Silverlight. That is not to say that there aren't good third-party libraries that make it easier in Silverlight, but without any help, it is easier to do in Flex." So MVVM as LOGICAL CONCEPT can be implemented in both but the way it is implemented in Silverlight requires more Plumbing than Flex.
What prevents Silverlight MVVM to be implemented like Flex ? Doesn't Silverlight have same capability in event system to do the same? If yes why does Silverlight do things more complicated what's the advantages then ? Is it about using Class Interfaces which are more strongly typed? What are the disadvantages also ? For example as for implementing MULTIPLE VIEWS for 1 View-Model does Flex implementation make it also more obvious?
I am deploying Updates via SCUP and SCCM to hundreds of Computers. Fortunately Adobe provides an SCCM Update Catalog for both Adobe Flash ActiveX and Adobe Flash Plugin. But now my Problem: After publishing the Update via SCCM, the client is not supposed to be interfered with the Update Progress (which is working) I figured the Updater works like this: First SCCM checks if a Update needs to be deployed, if this is the case, The Flash Updater begins. First the old Flash Version is beeing uninstalled. But now: if the Client has a Browser Window (IE, or Firefox) open, the Updater is not able to install the new Flash Version and quits with an Error. This leaves the Client PC without any Flash (because its being uninstalled before) How can I prevent Flash being uninstalled due to the Update progress not working while a Browser window is open?
I've got a movieclip, which has got a dynamic text element.The movieclip uses a package for its codeThe package if obviously derived from the MovieClip classI've got a timer, that updates the dynamic text field every second.When debugging the code, I see that the timer works well. Its updates the value of the dynamic text field.
When trying to do indexOf on a "static" array, it works, doing the same thing on an array populated with xml, i always get the result = -1Static Way
var myarray:Array = new Array("Pub Pepsi","Shadow E-Bike","Icon Air Craft","Test","La page 4","La page 5","La page 6","La page 7"); var myresult:* = myarray.indexOf("Icon Air Craft");
I am building an application that uses a series of combo boxes that are populated by XML.The XML nodes that populate the combo box have three attributes name, file and id. Name is the label that displays in the CB. File is not important now. ID is a value that I would like to set a variable to upon the user selecting a certain item. This is my question.I need to set a variable to the value that is determined by the ID attribute in the XML node upon a user selecting an item in the combo box. For example. user chooses France from the CB, the variable "id" is set to say 5 which is the value of the ID attribute in the xml node where France is the "name" attribute.
First, I would like to format the text... bold, font size, etc...Second, I would like to concatenate the first and last name to appear on the same line without space in between caused by two text fields. I tried the following, but it didn't work.
I am working on a new rotator for an RSS feed. One of the fields I am displaying in the rotator is an article description. After the description, I would like to add a hyperlink that links to the page referenced. The link path, as well as all the data displayed, exists in the XML RSS file. I would like to append the link to the end of the article description and to display it in the form of the word "More".
Currently I am pulling in the description fine. I would now like to add the link, but I'm not sure how to append it. I don't know if I should create a button and try to put that on the end of the XML data, or is there a way to just create a text variable with a value of "More" and assign it a URL request.
I have a Web site here: [URL] If you click on 'Portfolio', there are two columns which read from text files, CSS files, and an XML file to populate the page. Yesterday, when I looked at this page, the 'Links' column was populated, but the 'Tutorials' column was not; today, neither column is populated. Last week, the 'Tutorials' colum was populated, but not the 'Links' column.
On my stage i have a scroll pane (instance name scrollPane).I have a container which i populate with dynamically created clips (instance name faveContainer). The clips are in this case, just thumbnails pulled from a folder.I want to push that container into the scroll pane once its built up.Heres where i am currently....Im guessing that scrollPane isnt picking up the faveContainer off the stage, but out of the library, but while that might be the case, i don't know what to do about it.I saw kirupa example, and attempted to copy its behaviour, but, well, cant!
Code: var garmentFaves = new Array("3","4","1","5","3","2","1","6","3","4","1","6","3","4"); //var garmentFaves = _root.favesArray;
I have an input box where a user enters in a temperature in Celsius and a dynamic text box where the converted Fahrenheit value appears. All is working well, but I want to keep the user's entered Celsius number constant in the input box and not disappear; that way they can't forget the original number they entered to get the conversion.
There are three methods: loadvars, xml and flash remoting. I have a great tutorial from Lee Brimlow but he only passes one column into a listbox. I want various columns passed into a datagrid.
I'm not too sure how to amend the php code <?PHP $link = mysql_connect("Localhost","user","password"); mysql_select_db("cambridgekidsdb"); $query = 'SELECT * FROM trivia_user'; $results = mysql_query($query); [Code] ..... I'm almost there and this will be fundamental to my website as I can create important stats on hundreds of children.
Trying to do a scroll effect of some images I am loading in from an xml file. Problem is I need to limit the amount of scroll based on the width of the images - the number of images is controlled by the client and can vary. The problem is the actionscript does not seem to be able to detect the width of the combined images - heres the scroll code...
I'm trying to achieve the drag and drop effect featured on this site: [URL]I've included the Fla containing my code.the problem with it is whenever I'm removing the last element of the list to the stage, and return it to the list, it always end up adding a new element.
I have a combobox that needs to be populated with friends from an XML file. Once I've selected a name from the dropdown list, I need several text fields to be populated with information contained in several nodes of the XML. I was successful in accomplishing this with a very simple XML, but once my XML became more complex, I could no longer access specific nodes.
Here is my XML: Code: <myfriends><friends> <friend name = "frank"> <outdoorsports> <camping> No </camping> <fishing> Sometimes </fishing> [Code] ....
I have text fields labeled : Goes Camping, Likes to Hunt, Hikers, Married, Plays xbox360, etc.... When I select "Frank" from the drop down I need all these individual text fields to populate with his info. I can post the code that I found on the web for the simplified XML file that works if necessary.
I am currently pulling in a series of RSS feeds into a series of TextAreas and am trying to style the fonts, both the Headings and the regular text. I am using
Code: var styles = new TextField.StyleSheet(); styles.setStyle("p",
I've been wondering how I could possibily do this for some time now. and all I tried or thought of went nowhere. I'd like to list all the variables an html embed tag passes on to the swf file called, whatever they are named and how many there is. <EMBED src="example.swf?var="varcontent",var2="var2content"> it's not life-threatening, but I hate using things that work when I have an idea for things that would work better x)
I have a question about loading new xml data into a already xml populated image gallery. So I have my gallery set up so it calls some xml when it first loads. What I would now like to do is load different sets of images via a different xml sheet via the click of a button.
So for example the loaded gallery already has all thumbs loaded and user can click on them to view the full size image. So next instead of the user having to close this gallery to allow a new gallery to open with a different set of pictures I would just like to have a button. This button will unload the existing thumbs from the gallery and load in new ones from a different xml file.
If anybody can help me with this it would be great as I am still on a steep learning curve with AS3.
we are implementing an AIR application in Flex.We populate dynamically a canvas and present it. The problem is that the data are build not before the the change of canvas. Is there a way to buffer the output and present it after the data has been populated?
loading new xml data into a already xml populated image gallery.
So I have my gallery set up so it calls some xml when it first loads. What I would now like to do is load different sets of images via a different xml sheet via the click of a button.
So for example the loaded gallery already has all thumbs loaded and user can click on them to view the full size image. So next instead of the user having to close this gallery to allow a new gallery to open with a different set of pictures I would just like to have a button. This button will unload the existing thumbs from the gallery and load in new ones from a different xml file.
ActionScript Code: var xmlPath:String = "pictures.xml"; var xml:XML;
I have a question about loading new xml data into a already xml populated image gallery.
So I have my gallery set up so it calls some xml when it first loads. What I would now like to do is load different sets of images via a different xml sheet via the click of a button.
So for example the loaded gallery already has all thumbs loaded and user can click on them to view the full size image. So next instead of the user having to close this gallery to allow a new gallery to open with a different set of pictures I would just like to have a button. This button will unload the existing thumbs from the gallery and load in new ones from a different xml file.
Code: Select allvar xmlPath:String = "pictures.xml"; var xml:XML; var loader = new URLLoader(); loader.load(new URLRequest(xmlPath));
i am trying to create a list of buttons populated from an xml file they populate but i DONT want them to align with x starting at 0.[code]i want to be able to start the first buttons _x at lets say 100 or something and then space them out 30 px apart.
ok, so what i've got running is a dynamically created movie clips populated with information from an XML page, everything is running exactly how i want it to, except i need to be able to output the phone number of the corresponding movie clip that is pressed. at the moment all i'm getting is undefined. it works if i specify the xml node, example 0, 1, 2, etc but i can't hard code that
I am trying to find an easy and robust way to override the default layout of DataGrid and populate its values in a left-right fashion. To illustrate:My data model is an array of: {a: xxx1..n, b: yyy1..n, c: zzz1..n}The default DataGrid component will lay this out as:
a b c xxx1 yyy1 zzz1 xxx2 yyy2 zzz2 xxxn yyyn zzzn etc.
With "a", "b", and "c" as the headers, and x, y, z being their values for each object in the dataProvider.Now I want to lay this out horizontally like so:
a xxx1 xxx2 xxxn b yyy1 yyy2 yyyn c zzz1 zzz2 zzzn
I've searched around for an answer but haven't hit on anything. Perhaps I'm just using the wrong keyword searches...Regardless, if anyone knows a solution to this, be it as mundane as a property setting I've somehow missed, or a 3rd party component, etc.
ps: Eventually, this must be entirely tab-enabled and cell-editable. If you have an esoteric solution involving a multi-field itemRenderer, please keep this in mind. I mention this because I have attempted such a solution and have failed to penetrate DataGrid's Unfailing Field of Tab Vitiation (ie DataGrid seems to override tab functionality inside its itemRenderer, forcibly setting focus to the next renderer/editor).
how to trace the elements in my code since my variables are populated dynamically. I have tried to use trace(cartOrder[0]); but when I do I just get the output [object movieclip]. I want it to give me the name of the handbag. My code is
var cartOrder:Array = []; Code: var cartOrder:Array = [];