ActionScript 2.0 :: SortOn() Multiple Fields With Different Options
Feb 12, 2005
I get the feeling this problem is anything but complex, but I can't seem to pull it off.
I have an array that contains search results and looks like this:
array[x].id :Number
array[x].sectionID :Number
array[x].occur :Number
array[x].title :String
etc...
I want to sort it by sectionID ASC and occur DESC (occurances). What I read in the documentation is that I can sort on multiple fields like so:
array.sortOn(["sectionID", "occur"], options);
But I need to specify different options for each fieldName while it seems the function only allows for one set of options.
View 8 Replies
Similar Posts:
Feb 12, 2005
I have an array that contains search results and looks like this:
array[x].id :Number
array[x].sectionID :Number
array[x].occur :Number
array[x].title :String
etc...
I want to sort it by sectionID ASC and occur DESC (occurances). What I read in the documentation is that I can sort on multiple fields like so:
array.sortOn(["sectionID", "occur"], options);
But I need to specify different options for each fieldName while it seems the function only allows for one set of options.
View 9 Replies
Jun 6, 2010
I have 3 menus, each with 4 different options (clickable buttons). Depending on what you selected in each of the three menus you get a specific resulting image.
View 1 Replies
Jun 20, 2009
I have navigation set up, where on rollover of each button 3 separate movieclips are affected. On release another movieclip is effected and a swf is loaded. Fine so far - here is the code (where the first mclip is where the buttons are located and the command goes to a frame in that mclip, the 2nd mclip is called 'copy' and the 3rd is called 'date')(the mclip effected on release is called 'overs'):-
[Code]....
View 1 Replies
Jun 20, 2009
I have navigation set up, where on rollover of each button 3 separate movieclips are affected. On release another movieclip is effected and a swf is loaded. Fine so far - here is the code (where the first mclip is where the buttons are located and the command goes to a frame in that mclip, the 2nd mclip is called copy and the 3rd is called date)(the mclip effected on release is called overs):-
[Code]...
The last time i put a problem on to this forum, i also spent a long time pasting my code and trying to describe my problem in detail, i then received an email from someone asking me what my problem was! Please only reply with questions based on what i've put here, if it doesn't make any sense to you then don't worry about it. If it does make sense to anyone out there tho, or if you have a better way of turning rollover states on and off, please dont' hestitate to get in touch with me.
View 13 Replies
Aug 29, 2011
Im building a program that queries a database for options and displays the options in a number of comboBoxes. The comboBoxes are dynamically built and loaded via code and added to the stage. I would like to build the comboBoxes into a single movie clip (maybe not the correct wording) so I can use options like tweening and such to make it look better. The code is below.
package classFiles
{
import flash.display.MovieClip;
[code]....
View 3 Replies
Oct 7, 2009
: Flash Media Interactive Server. Hi, Im curious if we can publish on multiple sites, I have 5 websites all password protected for members, and I want all 5 members areas to be able to view my live video as I publish it. So can I embed the flash player on all 5 sites and have it pick up the same live feed. Also was wondering if interactive server supports or has a chat box, so students can type questions as I am explaining things live. And One last question Can I stream my video from different computers or can I only use one ( the one I register it on ) I want other teachers to be able to use thier webcams from there homes and publish live videos as I do on my sites. ( At different times of course )
View 1 Replies
Jan 22, 2008
Is it possible to have a context menu on a multiple frame movie with all the options except next, prev and play..?I want to have zoom in/out but not next/prev..
View 3 Replies
Apr 8, 2011
What I have is two buttons that when clicked they add an input text field and a third button that puts a text field and gives you the total value of the two input fields after the user inputs some numbers, the problem is that the buttons adding the input fields can be clicked multiple times and of course adding a new input field each time they are clicked and as you can imagine when I try to add the values I only get the result of the last two fields added.
How can I tweak my code so it adds-up the total value of all input fields on the stage?
button1.addEventListener(MouseEvent.CLICK, addField);
button2.addEventListener(MouseEvent.CLICK, addField2);
button3.addEventListener(MouseEvent.CLICK, addTotal);
[Code]....
View 3 Replies
Feb 23, 2010
I am working on a program that has several text fields and I need to control them all very simply by using actionscript. I have an idea how to do it, I just don't know if it is possible. Here is the basic idea:
I have 20 sets of text fields with 3 text field each. The first set are named "firstNumber1", "secondNumber1", and "total1"; the second set are named "firstNumber2", "secondNumber2", and "total2"; and so on an so forth. What I want them to do is add the first number and second number to reach the total. Rather than writing this formula 20 times
PHP Code:
total1.text=firstNumber1.text+secondNumber1.text;
I would like to do them in the following manner:
PHP Code:
for(i=1;i<=20;i++){
"total"+i+".text"="firstNumber"+i+".text"+"secondNumber"+i+".text";
//if i=6, formula should be total6.text=firstNumber6.text+secondNumber6.text;
}
The problem I face is that Flash doesn't recognize what I am trying to do. I have tried several variations, but I haven't figured out how to write the command so that it will do them all with one group of code.
View 3 Replies
Nov 11, 2011
i have my black berry being able to add a custom pin i created and when i send a message its shows on the screen but want i need help with is when more thane one persons use it when they text it removes the previous text so i need help in know how to create 4 dynamic text fields so when they text it can transfer to the other three and remove after a period of time..
View 4 Replies
Apr 10, 2009
I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3. Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
View 3 Replies
Apr 8, 2011
What I have is two buttons that when clicked they add an input text field and a third button that puts a text field and gives you the total value of the two input fields after the user inputs some numbers, the problem is that the buttons adding the input fields can be clicked multiple times and of course adding a new input field each time they are clicked and as you can imagine when I try to add the values I only get the result of the last two fields added.
How can I tweak my code so it adds-up the total value of all input fields on the stage?
I didnt test my code it may have some errors, I just put it together to show the concept.
ActionScript Code:
button1.addEventListener(MouseEvent.CLICK, addField);
button2.addEventListener(MouseEvent.CLICK, addField2);
button3.addEventListener(MouseEvent.CLICK, addTotal);
[Code].....
View 9 Replies
Sep 25, 2004
I have an array that gets filled with values from a database and I want to sort things in Flash using the sortOn() function. I'm trying to create an array with a number of fields, like this example from the Help-files:
Code:
var my_array:Array = new Array();
my_array.push({password: "Bob", age:29});[code]....
I need a bit more fields and if I put all of these in one line, it gets kinda lengthy.I tried something like
Code:
var my_array:Array = new Array();
for (i=0; i<10; i++) {
my_array.push ( {prop1: "value_1_"+i} );[code]....
but this apparently doesn't work. Is there another way of doing this?
View 1 Replies
Sep 25, 2004
I have an array that gets filled with values from a database and I want to sort things in Flash using the sortOn() function. I'm trying to create an array with a number of fields, like this example from the Help-files:[code]
View 1 Replies
Jun 10, 2010
I try to create multiple text fields in a movieclip. However, the one created later always overwrite the one created immediately before it. Below is the code in the first and only frame in the application:
create2TextFields();
function create2TextFields()
{
this.createEmptyMovieClip("mc",this.getNextHighest Depth());
[Code]....
The code is writen in AS2 and Adobe Flash Professional CS5 and tested with Flash Player 10.
When I ran it in Flash Player 10, I only saw message2 displayed on the stage. When I stepped through the app in Adobe Flash Professional CS5, I found that as soon as message2 text field was created, message1 text field which was being displayed on the stage disppeared.
View 2 Replies
Jul 23, 2009
how I can load XML data into multiple dynamic text fields? I basically need 3 fields; name, score and qtr.
View 6 Replies
Jul 29, 2010
I am trying to take data from a single xml file and put the data into many text fields. I can get the first child to display but I get the following error for the rest of the children:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cell_membrane_1_fla::MainTimeline/xmlLoaded()
at flash.events::EventDispatcher/dispatchEventFunction()
[code]....
View 1 Replies
Sep 9, 2010
I am trying to check 3 scores at once. Is there a better way to code this... I want to check to see if they are all tied? If one score is greater than another? Seems like there should be a more cleaner way.
[Code]....
View 4 Replies
Aug 25, 2010
I've been trying to work on a web portal for updating a website I am creating. I originally duplicated a write-to-.txt php script and duplicated it for each of my pages, but for some reason it isn't working out very well as I assume they are fighting with each other. I am looking into creating what I assume is called an array, so that I can store 5 separate data pieces in one text file but I can't seem to find a tutorial that is close to this. the closest I can find is a guestbook tutorial but it is very out of date. I would like to be able to store multi-line text (so that paragraphs and breaks are preserved) from 5 different input boxes and then retrieve that data upon loading of the input boxes and in a different page which would be the actual content of the website.
View 2 Replies
Jun 9, 2011
I am attempting to clear text input fields on click and I can't seem to figure out what is going wrong with my coding.[code]...
But when I did, now every time I click the Name input field the Email input field clears as well and vice versa.
View 6 Replies
Nov 8, 2006
i am building a little widget that allows a user to type in keyword(s) into one input field and then a zip code into another
when the user clicks submit, it plugs them into the search url
i have it working for one input field, but i am not sure how to append the script for the second field...what would i need to change to the below script to add a second field into that query string?
Code:
btn.onRelease = function(){
getURL("http://www.google.com/search?q="+myInputField,"_blank");
}
View 4 Replies
Aug 11, 2008
I've got this project I'm working on where I need to populate dynamic text fields with data from an xml file.I just don't know the proper terms I should be Googling for a tutorial (ie: XML movie clip loops?)
View 1 Replies
Oct 18, 2008
I have a stage where users can select a text tool (button) and then click inside a canvas area. If they select the text tool and then click inside the canvas I would like an input field to appear where they can start typing a message.It needs to have the ability to add multiple text input fields to the stage/canvas.I am building the app in CS3 with AS2.
View 1 Replies
May 24, 2011
How to make a touchscreen flash keyboard with multiple fields? any tutorials with multiple inputbox fields which is a touchscreen flash keyboard?
View 1 Replies
Feb 22, 2010
Can we able to create multiple text fields using actionscript 2, without creating any movieclip on the stage.
[Code]...
View 5 Replies
May 17, 2010
I'm working in Flash Builder and Catalyst CS5 building a project that will aid technicians in finding policies and tools easily. One area that I want to focus on is the note taking section. I want the user to beable to input text and then have a "Copy Notes to Clipboard" button that will gather all the data from those input fields and store them in theclipboard. This way all the agent has to do is paste into the note section on their service ticket.The following is an example of the fields that it would require.Name:Phone Number:Issue:Symptoms:Troubleshooting Notes: also want the label for the text field to be included within the notes. So when someone pastes the notes it won't be just the contents, but will include the name of the text area as well. "Phone Number: 555-123-4567" instead of just "555-123-4567."
View 3 Replies
Aug 8, 2007
I have multiple text input fields (up to 40, depending on visibility)that tab backwards instead of forwards. Is there a simple solution to this mis-direction?
View 2 Replies
May 7, 2010
Site loads two flash files at the same time with multiple dynamic text fields that load .html files with external css style sheets. The site works almost perfectly when viewed offline, but when you upload it the text boxes sometimes load and sometimes do not. I'm a graphic designer so I really don't know actionscript 3.0 (or any version) very well... so I'm attaching the footer .fla file which by itself suffers from the same problem, and the other files are too big to upload so here is the link to the other .fla file used on the homepage
View 3 Replies
Oct 25, 2010
After a lot of experiments and reading many articles, Q&As, I still didn't find the answers to my problem, then I decided to ask my question at great stackoverflow forum:-)
The setup of my project is as follows:
- Create an AS3 project in Flash Builder 4 (Main.as3proj), and write source code in it;
- Create graphical assets in Flash CS5;
- Load the graphical assets in the AS3 project;
In the graphical assets (swfs), there are text fields, we would like to use Embedded fonts for the text fields. But we don't want to embed the fonts in all swfs, we want to create a swf as a font library (FontLib.swf), that embed all the fonts needed across all the graphical assets (swfs).
After loading or embedding the FontLib.swf to the main application (Main.swf), the embedded fonts is availabe: TextField.isFontCompatible(myFontName, myFont)
is true. And when I create a TextField with the embedded font at runtime, it works fine. But besides this, I want to use the embedded fonts for the TextFields in other graphical assets like what I described at the begging, but when I try to change the text for the dynamic text field in a movie clip, the text field will disappear. (Before changing the text, it can be displayed because Flash CS5 automatically embed the fonts for the characters already input in the fla/swf file).
I tried to clone the text field with the same properties of the text field in the movie clip and replaced the old one, as I said, this works as other text fields created at run time. But I have other problem with cloning and replacing the text fields in movie clip. I wonder if there is a way to instruct the flash player to use the externally loaded embedded fonts for the text fields in movie clip.
View 2 Replies