ActionScript 3.0 :: Passing Function As Data In A ComboBox?
Nov 14, 2009
I want a comboBox that will allow the user to select what colour palette they want the application to have.I am using a comboBox to do this and want to have a function with arguments as the data in the comboBox item.I've managed to do it and pass arguments but these are running when the comboBox is set up. I only want the function to run when the user presses the submit button. How can I prevent the function from running on set up?Here is my code:
I want a comboBox that will allow the user to select what colour palette they want the application to have.I am using a comboBox to do this and want to have a function with arguments as the data in the comboBox item.I've managed to do it and pass arguments but these are running when the comboBox is set up.I only want the function to run when the user presses the submit button. How can I prevent the function from running on set up?Here is my code:
I want a comboBox that will allow the user to select what colour palette they want the application to have. I am using a comboBox to do this and want to have a function with arguments as the data in the comboBox item. I've managed to do it and pass arguments but these are running when the comboBox is set up. I only want the function to run when the user presses the submit button. How can I prevent the function from running on set up? Here is my code:
Plus, my movie is taking ages to submit, even though there is nothing on the stage. There are components in the library though. Would this cause it to take about 5 seconds to export to swf?
in a for loop i am passing 60 movieclips to the stage at runtime.now after that I trigger a function that fires every second.But inside that timer function, i can not trace what items are in my array in other words, every second i want to trigger a movieclip inside the array.(this will later destroy a random ipad or iphone processor :p)
heres my code:
Code: var circle_array:Array; var seconds_counter:uint = 0; var myTimer:Timer = new Timer(1000);
I'm trying to take a variable from a php page and send it to flash to then use in a link.I'm having problems just selecting ONE variable from the print function, the code will help explain:
It collects all the data fine but it does not print it out correctly, it prints out all the variables in the php in one link. For example: If i click the facebook icon, i will be taken to http:[url].... This also happens with the other icons (Youtube and Twitter).
Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script. I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter. It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
Or is there another way I can pass the tablename variable to the php file before I call any functions?
We have implemented a Flash photo slideshow on our site and it works just fine for most of our users. Whenever the xml.load(success) returns false I have the Flash email me a debug report. For the life of me I can not find a common thread between all of these people having problems with the Flash. I don't think it's a cross-domain issue because it works for most people, and I have the crossdomain.xml files where they should be.
I need to pass a variable to a function inside a function. However this parameter (i) seems not to be passed (to function ...onRollOver). This is required to attach a textfield to a movieclip (reading the adress and showing it as a tooltip).
ActionScript Code: for (i=0; i<array_BE_ElecCities.length; i++) { var attachElecCity = mc_map.mc_places.attachMovie("Plant",
I'm doing an order form, where the user can input his contact information and then choose a product in a dropdown menu.Untill now, I just gave the dynamic text fields a variable and used this code:
on (release) { form.loadVariables(order.php, POST); }
It is populated with Countries in the labels and email addresses in the data.I want the data (email adresses) to go to the php file, not the labels. In the php file it would use the addresses to mail the form to.I can trace the data, but cannot get it into the php file.
AS code: country_txt.addItem({label:"CHOOSE YOUR COUNTRY"}); country_txt.addItem({data:"ega-maui@hawaiiantel.net", label:"Headquarters/International"});
if it's possible to make text wrap in the combobox component, and if so, how? I've searched this and other forums/sites but have had no luck with an answer either way. I'd like to combobox to stay a set width and therefore wrap text lines that are longer than the width. Currently it's just cutting off the text.
I am trying to populate a datagrid based on a value selected from a combobox. The data comes from a xml file, which looks something like this,[code]The user can list data in the datagrid based on either "media" and "region." For example, the user should be able to choose "Europe" from the combobox and list "only" media having "Europe" in the region tags. In this case, if the user chooses "Europe" from the Combobox only one listing (rammstein) will be seen in the Datagrid.However, it doesn't work. I get a blank datagrid. Loading data into the datagrid is not the problem, because if I just use a straight For loop with no conditions I fill the datagrid no problem. The problem comes up when I try to control what data get listed in the datagrid based on selected value in the combobox.[code]
I have combobox in frame 2. how can I receive the selected "string"data when I go in frame 3? I thing it can't do that. Must I store data in class and I read then when I go in frame 3.
I have combobox in frame 2. how can I receive the selected "string"data when I go in frame 3? I thing it can't do that. Must I store data in class and I read then when I go in frame 3.
I had a comboBox and loading the datadynamically from the server. i need to display the first value in comboBox as a selected value and based on the value data should be populated on the grid.
My Combobox is not alway updating when I update the ArrayCollection.[code]...
the first time it updates the combobox fine and sometimes it works the 2nd, 3rd, etc time is might update the combo box. After it stops updating the combobox, it never does until I restart the app. I have verified that the ArrayCollection is updated via the debug data, it is just the combobox is not updating the display.
But the ComboBoxes are being created dynamically with AS3, everything is working except I cant bind the second ComboBox dataProvider to be the XMLList in the first ComboBox's selectedItem.
I'm doing an order form, where the user can input his contact information and then choose a product in a dropdown menu.Untill now, I just gave the dynamic text fields a variable and used this code:[code]But now that I added a combobox, it has no "varible field" - how do I send the selected parameter in the combobox to the php-file as well?
I want to use the combobox function that MX has, but how do script it? The one that I've got from the help site is quite vague(I guess that is why I spent more time in flashkit and kirupa more than Macromedia site, even the help-forum is not that user friendly{personal commnets}), that is
function onChange(component){ if (componet._name=="check1"){ listBox1_mc.setEnabled(componet.getValue());{ else_if (componet._name=="check2"){ listBox2_mc.setEnabled(componet.getValue());} }
I would understand that this could be a lenghty subject, maybe somebody could guide me to a place that I could get a tutorial?
In Flex 3, I've created a ComboBox within an MXML component similar to the following:
<mx:ComboBox id="comboBox" dataProvider="{_choices}" /> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; // etc... public function get choices():ArrayCollection { return _choices; } [Code] .....
In the parent MXML application, I'm modifying the contents of the choices property: myComponentId.choices.removeAll(); myComponentId.choices.addItem({data: "NY", label: "New York"}); myComponentId.choices.addItem({data: "CA", label: "California"}); // etc...
The binding is working in that the ComboBox is automatically picking up the new contents added at runtime, however it is not adjusting its width. The initial width of the ComboBox is wide enough only to show the initial item "All" declared in the component. However, I want and would have expected the ComboBox to re-size automatically during binding to be able to show "California", but it isn't. How can I get the ComboBox to update its width after I have added new wider labels to its dataProvider?
Here am getting array of groups(groupName,GroupID each row ) from a RemoteObject and displaying in a ComboBox. I am selecting the groups with selectedIndex as 0,1,2,3, but I want my groupIDs of correspoding groupnames,which am bringing to client side.
How can I get actual the groupId of the selected group?
I am developing a panel in Photoshop with Flex and Extendscript. I am pretty close to getting this to work, but with my Flex skills I am having a little issue with the Array I am pulling in from the jsx file. The array is displayed fine in the alert box, but somewhere between my split and creating new collection something is wrong.
Here is my Flex
protected function loadData():void { var grabFolderNames:SyncRequestResult = CSXSInterface.instance.evalScript("labNames"); var list:String = grabFolderNames.data;
How do I load data from a mysql table to a combobox using php and AS ?
I do know how to retrieve the data from my table needed but how is this inserted the combobox ?
Assume you have combobox1 and combobox2. When I, in combobox1 select: 'cars' I would now like the script to search my table for cars in the column 'stuff' and then insert the result in combobox2.
I have a combo box defined inside a function and want to access it from a function that is called on the OnChange event of the combo box.combo1.addEventListener(Event.CHANGE, chkAnswer);How do I access combo1 from function chkAnswer? In other words, what is the equivalent of this.value in as3?
I've got a comboBox with defined data and label fields. On Event.CHANGE I capture the data field. I need the comboBox to default back to the user selection if they should navigate to another screen and then come back. Normally I've got an array of labels that I can use to just lookup the index: comboBox.selectedIndex = labelArray.indexOf(user selection); In this case I don't have labelArray. What I really want to do is something like this (only with real AS, not fake):
comboBox.selectedData = storedDataString or, if the data array is accessible: comboBox.selectedIndex = comboBox.data.indexOf(user selection); Is there an easy way to do this, or should I just suck it up and add yet another global label array?
I have a comboBox which I try to populate via PHP/MySql.
the AS: var result_lv:LoadVars = new LoadVars();result_lv.load("http://MyWebSite.com/flashData.php?ID=3"); result_lv.onLoad = function(success:Boolean) {
i am having a problem with the combobox component.i have a mysql database with a student and a class table.i want to make a registration form for the student. i have the combobox here where he picks his class (populated from the class table). The class_id is a foreign key to the student table and it's invisible in the combobox. i want when the students registers from his selection on the combobox to write in the database the corresponding class_id.