SWF Bug List?
Does anyone know of a way to test a SWF file to tell if it is corrupted? Is there a bug list anywhere on the net? I've got a couple of wierd problems in some different movies, and the oddest is a GOTO action in Scene 1, telling it to go to another Scene and stop on frame 1. Simple, right? But after I publish it and run it the darn thing seems to skip right over the scene I'm telling it to GOTOANDSTOP, ending up in the next scene. And it is not consistent - subsequent publishing creates other, stranger actions at times. For instance, it will go somewhere and stop - but not on any scene, presenting a blank page. But sometimes there is some text on the blank page from elsewhere in the movie . . . different stuff. The code is really clean, just gotos and stops. I tried frame labels instead of using frame numbers (it's always frame 1 anyway) and no difference.
Has anyone seen similar? Anyone found how to cure it?
The SoupNazi @ http://www.ChefOnTheEdge.com
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-26-2002, 05:32 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load Xml Data(list Of Names), Use List As Buttons In Flash Possible?
Hi, basically I have a quiz game that I made, the quiz is done but I want to keep track of how many times a person has failed the quiz. I have an XML file that has a list of names. I want to take those names, put them in a quiz game (at the beginning) as a "list" of some sort and let the user be able to choose their own name (which is of course already in the XML file). This name will be used to keep track of how many times they have tried the quiz.
I have successfully loaded the XML file (names) into an ARRAY in Flash but how can I output them to the screen AND let the user be able to choose those from the list? as a button? This will add the count after they clicked their name to +1 and then save it to somewhere(where is best?). I will attach the zipped files (there are 4, the fla,swf,2 XML files[quiz/names]). If anyone can help me ASAP it would be awesome.
Chnage The Font Of Selected Item Color In A List Mx:List
Hi,am Trying to change the font (bold and color) of a selcted item in List..But it is changing the complete list's font..
Here it is my code..
<mx:List id="businessFunctions" left="10" right="10" bottom="10" top="208"
dataProvider="{processList}"
itemClick="select();"
horizontalScrollPolicy="auto"
labelField="@name"/>
ActionScript COde:
private function select():void
{
businessFunctions.setStyle("textSelectedColor","#D 3E9F5");
businessFunctions.setStyle("fontWeight","bold");
var page:XML = businessFunctions.selectedItem.page[0];
var pageID:String = page.@id;
var processID:String = businessFunctions.selectedItem.@id;
server.submit(pageID, processID, RequestMessage.BEGIN);
}
Here i need toc hange the selected item color only..
Separate The List Items With The Separator And List Is Dynamic
Hi,
I am getting the list items dynamically ,and hv to draw a separator after the every group of list items.For this I have to embed a script function after every group.How can i do this Actionscrip 3.0 Any help?
Ex:
Group 1:
ABC
DEF
GHI
TODO-----Here we need to draw a line
Group 2:
123
456
789
TODO-----Here we need to draw a line
Group 3:
abc
def
ghi
Here I have da code:
for each(var group:XML in event.responseMessage.rawXML.group)
{
var pageSection:PageSection = new PageSection();
pageSection.text = group.@name;
pageContents.addChild(pageSection);
trace("***********Group Name: "+group.@name);
// once the section has been added, iterate through it's children and render each field.
// for each(var field:XML in server.currentPage..field)
for each(var field:XML in group.field)
{
var formElement:FormElement = AppCode.FieldRenderer.renderField(field, pageSection);
/* check for null, if for some reason we encounter an unknown control type
* the formElement will not be instantiated so we should skip over it.
*/
if(formElement != null)
{
/* formElement.field = field;
pageSection.addChild(formElement); */
formElement.setRuleDetails = this;
formElement.communicator = this.communicator;
if(event.responseMessage.pageType == PageType.UPDATE || event.responseMessage.pageType == PageType.ADD )
formElement.readOnly = false;
fieldList.push(formElement);
}
}
//Add Separator b/n groups
TODO...Here we need to call a function which draws a line.....}
Plz help me if u have any idea?
Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!
What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.
Can anyone assist please,
Thanks,
Stephen.
Converting Bulleted List To Numbered List
I'm trying to put out a list of questions for a test. I'm also using a stylesheet to format the way the text is displayed. This is the way the list should look like:
1. question#1 text.............................................. ......
2. question#2 text.............................................. ......
If more than one line of text per question, it continue on the next line indented. The text for each question needs to be looking like a block of text. The same way a bulleted list displays.
This format can be created by using the <ol>, <li> tags in HTML. But Flash doesn't recognize any style formats for the <li> tag. Only a bulleted list is printed out. How can I format that list into a numbered list? or if not how can I create the same output, keeping in mind that I have to use a stylesheet? Thanks.
Debug > List Objects + List Variables ...
I am testing my flash movie within the flash application. I go up to the toolbar while testing and select 'Debug > List Variables' and then 'Debug > List Objects'. This displays all the variables and all the objects in the trace window. Fairly straight forward!
What I want to do is access these variables and objects at runtime while viewing my flash movie within the browser. So I can make a text field in my movie and populate it with these variables and objects BUT how do I access these from the flash movie ? There must be a way to get the output from 'Debug > List Variables' and 'Debug > List Objects' at runtime and dump it all into a text field on screen.
Can anyone assist please,
Thanks,
Stephen.
(Flash MX Or 8) List/List Component Issues
Hello all.
I recently completed Kirupa's "Creating a Listbox" tutorial, (http://www.kirupa.com/developer/mx/listbox.htm) but have been having a difficult time modifying the event attributes of each list item. Basically, I want to click on an item and have an object on the stage move to a unique xy coordinate. I can get the object to move already (object._x = object._x +10, but unfortunately ALL items on the list execute this script command. I've tried fooling around with the code to get each item to do a unique movement but...well, clearly I haven't succeeded yet.
I'm a Flash nooby and help in the form of specifics would be greatly appreciated. If you can provided modified code from the tutorial to move an object to a unique positions that's even better.
Thanks.
David
List Component. Help. Looked Everywhere. Button And List.
Trying to use a list component and a button. When user selects something from list component and clicks button it takes them to new page, if user doesnt select something from list and hits button, (this is where my question lies) I want it to do nothing and setFocus to list component.
Here is how I am going about it now: New if statement (however it still transfers user if nothing is selected from list component) How can I get it to not transfer? I have tried rewritting this many ways, searched all over the nets, and Nada.
Code:
var arUrl:Array=["/browsecategory.aspx?cat=1","/browsecategory.aspx?cat=2","/browsecategory.aspx?cat=3","/browsecategory.aspx?cat=4"];
var provider:Array=[{label:"Option 1",data:0},{label:"Option 2",data:1},{label:"Option 3",data:2},{label:"Option 4",data:3} ];
mcList.dataProvider=provider;
var obj:Object={};
obj.click=function(eo:Object)
{
var count:Number=mcList.selectedItem.data;
getURL(arUrl[count],"_blank");
trace("count="+arUrl[count]);
}
but.mcSubmit.addEventListener("click",obj);/////here is where I am sending off
if(mcList.selectedIndex == undefined) {
setFocus.mcList;
}
So this thing works perfectly, however if user hasnt selected anything how can I get it to not transfer and setFocus?
I have tried setting if to check it for - 1 (since starts at 0) set to 0? Any ideas please help. Thanks in advance MT
'list' Event Of List Component
oops i mean 'change' event of list component
Hi guys/gals. Ive made an xml/list component driven mp3 player as can be viewed at http://www.flashmatics.co.uk/blog/sa...mp3player.html
When someone selects a new song from the list that songs starts to play. Everything is working fine.
I now want to add an extra bit of functionality i.e When one song finishes i want the next song to start playing. But this means I have to tell the list component that a change has occured as well (even though there has been no user interaction to cause this 'change'). How would I go about this. Here is a snippet of relevant code.
Code:
mySound.onSoundComplete = function():Void{
//from here i need to tell the component a change has occured and to move it
//to the next song in the menu
}
//create a listener for the list component
var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);
compListener.change = function(info:Object):Void{
//how do i get this to move to the next track?
}
Thanks for any help in advance. I dont actually need the whole code or anything but rather a point in the right direction..cheers
HELP Symbols List To Text List?
Is there a way to get a list of all the symbols in the library into a text file quickly and easily?
Thanks in advance!
-Ted
Loading XML List Into RMP List Component
I have several XML lists to load into a RMP List Component List Box.
I was told the code should be like:
myButton.onRelease=function(){
myList.load(String(search.text));
}
So I made a button and named the instance "myButton"
Add the list component called "myList"
The XML files are named test1.xml, test2.xml etc.
I tried variations of:
myButton.onRelease=function(){
myList.load(String(test1.xml));
}
Result....
Nota
I think I may need a Listener or I am not sure...
Can anybody please advise me what I am doing incorrectly?
List's "CellRenderer_upSkin" Displays In List Items (BUG?)
Hi Everyone,
I'm having a huge issue with with the CellRenderer_upSkin displaying on the a list component's items:
http://www.davestewart.co.uk/temp/combobox.gif
It's supposed to display a border round the entire list, but bizarrely, it's also used for each of the list elements... so effective end result is that the up state has a huge border.
I'm sure this shouldn't be happening. Has anyone else seen this behaviour?
This is my first production job using AS3, and I'm falling at the first hurdle which is very annoying.
Cheers for any help,
Dave
List Box To Control A List Box
hi guys and gals...here is my doubt...
// Sets the change handler for the Component named 'dropDown'.
listBox.setChangeHandler("SelectItem");
}
// This is the Change handler it tells the the movie what to do when someone clicks on an item.
function SelectItem(){
DataBox= listBox.getSelectedItem().data;
}
the above code is for the listbox change handler to display the code of an item whose clicked in the listbox.....heres what i want to do ....i want this item which is clicked to again query the msaccess database and return results from another table into a second listbox......
for eg...when blue is clikced in a listbox1..it should return types of blue in a second listbox2....pls help me to achieve this ......
thanx in advance
List Box
hello world
how can i make a list box or combo box in flash
thanx 4 reply.
Url-list
want my visitors to contribute links(http://) wich will be updated in a list on the same page. What is the best way to do this??
TO-DO-LIST...
I want to make a simple To-Do-List to put on my desktop,with entries and hopefully a search button (but that's not neccessary)....
How do I make this in Flash?? Is it even possible??
Can someone PLEASE HELP ME ????
Thanks so much.....
List Box Help
Hi
How can i do, that in a list box, the user selects a name and in a dinamic textfield, appears address, phone and email, ???
i need to have a 10 users list, hope you can help me
The List
i am working on a site for someone, and i have a drop down list box with all of his products in it. i also have a box to the left of that for how much the consumer wants to purchase, and a button to add the product. what i want to know is, what do i need to do to make it send the product and ammount specified to a list on the left, ie.. if the person selects item "grey car" and ammount 3, and then presses the add button, "grey car" and 3 will show up on the right. and then if they select "blue car" and 1 and then press the add button, "blue car" and 1 will show up on the right under "grey car" and 3. thanx in advance.
Shaggy
List Box And Php
Hiya
Does anyone know what the variables link the values in a listbox in flash mx.
I have created an email contact form using flash and php, now I want to put a list box in the form to enable users to select a recipiant of the email. Same this as the "to:" box but its a list.
I have the labels as the names and the data values as the email addresses, but what is the variable name of the list box???
Any ideas??
List Box Help
I have a listbox and i need to load a text file (that has variables in it) when someone clicks on a certain item in the list.
For example:
Its a store list
So...
Entry 0 = 100 Mile House
There are the following text fields
TextAddress
TextHours
TextStore
TextPhone
TextManager
And i have these declared in the text document for each store.
The text file is 100mile.txt
Im curious how to go about using the listbox as im new to flash (but getting better), I usually dont ask for help unless im completly stuck because i prefer to learn on my own heh.
Another problem
I want the text file to load multiple variables.
100mile.txt contains -
TextStore=Name
TextAddress=Addy
TextHours=STORE HOURS
MON TO FRI - 7:30am ~ 6:00pm
SAT - 8:00am ~ 5:00pm
SUN & HOL - 9:00am ~ 5:00pm
TextManager=Manager: manager
TextPhone=Parts: (555) 555-555
Fax: (555) 555-555
-
It will only read the first variable. Any way to tell it to read all of them?
Thanks in advance for any assistance anyone providex with my situation.
List Box
in list box components, how can i combine 2 variables in one column seperated by spaces?
ex:
_ = spaces;
name________adress
mike________123blahblah
thanks1
Help With List Box?
Hello,
I am using the list box compent, which I have working fine:
-------------------------------------------code-
loan_in_pool = "TEST|TEST1|TEST2"
loan_in_pool = loan_in_pool.split("|");
for (i=0; i<loan_in_pool.length; i++) {
in_pool_list.addItemAt(i, loan_in_pool[i],loan_in_pool[i]);
}
------------------------------------------------
BUT I need to attach a checkbox compent by each item in the listbox????? I have created an "check_box" compont on _root and tryed to use this code, which did not work:
in_pool_list.attachMovie("_root.check_box")
Pleas give me any ideas on how to do this.
Thanks!!!!
List Box
HI there...
I know that this must be basic --- When I use the List component
and added some labeles eg: Start movie 1, Start movie 2, Start Movie 3,,,,
How do I them apply the _root.pictures1. gogotoAndPlay("go");
_root.pictures2. gogotoAndPlay("go");
_root.pictures3. gogotoAndPlay("go");
Its quite simple but can someone help, didnt have luck finding
some tutors
Have a nice day:-)
Flemmming
Set URL From List Example
I downloaded the sample files for working with video from macromedia: http://www.macromedia.com/devnet/mx/...behaviors.html
Theres a sample where the movies play from a populated list component. There's 2 main parameters in the listbox: data and label.
What I'm trying to do is to populate this listbox component from an XML file, and I can do it, I can get the list to populate from my XML file using the XML connector component and binding it to the listbox component, but once I do this, the videos don't play.
The actionscript on the button to play the movies point to the selecteditem.data, where it looks like "data" is the "data" from the component parameter, but for some reason I think this data parameter isn't being populated when I bind the component to the XMLconnector.
Any suggestions on what I may be doing wrong? Thanks!
XML -> List
ok...heres my problem, i solved my last post on my own...i got all this information loaded from an xml file...lets say this is what my xml code is:
PHP Code:
<xml>
<video>
<clip>
<name>Clip 1</name>
<description>clip 1 description</description>
</clip>
</video>
<video>
<clip>
<name>Clip 2</name>
<description>clip 2 description</description>
</clip>
</video>
....
</xml>
well, i want to populate a list on the left side with just the names without using the list component...i want to be able to click on the item in the list and have the description show up on the right side...how can i do this? i already have the names and descriptions stored into arrays...lets say name:Array and description:Array respectively...my first approach was to print the names into a dynamic text box, but i dont know how to make the text a button then...please help me!!!
DVD List
Hi im new to flash and wondered what area i need to be aware to do the following task.
I have a dvd list of my films.
I wish to make that list searchable so anyone viewing it can see if i have a certain film on it.
Im not sure what this process is called.
Thanks for your time.
Xml Web List
Can anyone give me an idea how to write a text box that loads an xml file with links to web address's
the address's should be enter into the flash movie while it is running and not from inside the fla so it has to update the xml file
is this possible
Thanks
XML List
Dear people,
I'm working on a kind of news section for my website. The goal of it is that there are two sections: one with dates and one with a text area. When the user clicks on a date then in the text area the news appears.
Now, I found a really good help at flashkit (I have encluded it here). However I simply can't get It modified to what I want.
- How should I make it possible in this clip that instead of linking to another page the movie shows a description of the link in a text area?
It would really be a great help for me if someone could help me!
On forehand thanks,
Yours faithfully,
Yntze Heida
yntze website
.flv And List Box's
Ive got a list box (flash component) and a media playback component i
want a .flv to load into the media playback componet when a user selects
a name from the list.
Any one have any ideas?
List Help Please
thank you for reading this,
is there a way so the list component shows a list of names from a xml file, and then when a button is pushed it displys another list of names?
How Do You Get The List Box Value
Whats the sintax to grab the value from the list box component? I gave it the instance name Categorie This code traces [object Object].
I ahve 7 different selections.
Code:
on(press){
trace(_root.Categorie.selected)
}
XML List
Hi, Bit of a simple one here, just can't figure the syntax.
I currently have a listbox being populated from a simple xml file:
<staff>
<name>sharon</name>
<name>paul</name>
</staff>
This is being read into the listbox using the following code:
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
myList.addItem(nodes[i].firstChild.nodeValue,i);
}
}
myXML.load("http://localhost/~digitalpencil/staff.xml");
I now wish to include a link url so a picture displays when an item in the list is selected.
I have updated my xml to the following:
<staff>
<member name="sharon" img="images/sharon.jpg">
<member name="paul" img="images/paul.jpg">
</staff>
How would I update my actionscript to reflect this so an image would also load into a imageholder-clip called thumbMC?
Any advice is really appreciated, thanks.
List Box
Hi guys,
I have a list box and when an item is selected it to do a specific task.
//array code
myStatesArray = new Array();
myStatesArray.push({data:"AL", label:"Alabama"});
myStatesArray.push({data:"AK", label:"Alaska"});
myStatesArray.push({data:"AZ", label:"Arizona"});
myStates_list.dataProvider = myStatesArray;
//list code
function TheItem() {
var selected = eval(myStates_list.getSelectedItem().data);
}
if (selected == "AZ") {
boo._visible=true;
}
So far when i select the item "AZ" the boo(movie clip) does not appear.
Any help appreciated
Cheers
List Box
I want to create a list box that allows users to visit different links on the list:
ex)
on the list box I have
cars
boats
cycles
whenever the user chooses an item on the list I went to click on the item and go to a specific hmtl page or link from that list item. can someone tell me how i can do that. I have the newest koolmoves program and I need assistance.
Top 5 List
I am working on a web tool that guides users to appropriate links, based on their selections and criteria. I would like for the first frame of this Flash movie to be a "Top 5" list of the links that the tool guided users to. Essentially, everytime a user uses the tool and clicks on the link provided, that link would get a point. The "Top 5" list would display, in order, the links that have the most points.
I know how to do this using PHP and MySQL, but I'm a little hazy doing it with AS. I don't need the script written out for me (but feel free to, if you feel so inclined), but rather a few tips on what I should search for in the help files. What functions or properties would a "Top 5 List" like this have to use? I can use either a MySQL database or flat file (like a txt file) to store the "point" count, as security is not an issue with this project.
Any help, guidance, or simple hellos are much appreciated. Thanks!
Xml Url List (No List Box)
Hey guys basically I have a movie clip appending itself to the stage with a url button in that movie clip.
I want to be able to have those url buttons open urls that are defined in a xml nodes. However I cant seem to figuer out the for loop stucture to work with new url request. I can trace the different urls with:
Code:
trace(xmlData.pic.url[p]);
but how would I attach each of those urls to my buttons via
Code:
mythumbHolder.urlBTN.addEventListener(MouseEvent.MOUSE_DOWN, urlClick);
function urlClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("xml crap here??");
navigateToURL(request,"_blank");
}
Im defining p as such, var p:int = 0; and in the function adding p++. But cant for the life of me get the urls to work
Any help would be much appreciated. Many thanks in advance.
List Mc's
Is there any way to list all the movieclips on a given layer? Even dynamically attached ones?
List With CSS
Hello,
I have a List with many lines, it's possible to apply a different style to different Item? For example The first, 5th and 12th items are bold, but all the other are normal, I have to apply CSS? If Yes how can I do it? I have to introduce a TextField in the label place? How can I do it?
My List is created with this script:
myList.dataProvider = arraymyList;
arraymyList.addItem({ label: "label1", id: "id1"} ;
arraymyList.addItem({ label: "label2", id: "id2"} ;
Thanks
Wish List
Everyone knows what a wish list is right? You've been to Amazon.com . . . etc.
I am trying to build one like that using AS3 instead. If someone has seen a tutorial for a true AS3 shopping cart or wish list. Could you please post it here or email me directly? I am in need of one and I don't have time to make it myself but I need one for a project.
Please reply if you can help me. Thanks!
Rick
XML List
Hi
I've got an XML that looks some thing like that
Code:
<data>
<a>
<clip Xpos="49" Ypos="103" />
<clip Xpos="104" Ypos="103" />
</a>
<b>
<clip Xpos="0" Ypos="0" />
<clip Xpos="0" Ypos="53" />
</b>
<c>
<clip Xpos="156" Ypos="104.1" />
<clip Xpos="102" Ypos="104.1" />
</c>
I need to access the attributes of a sub node using a variable. making the choice of the sub node dynamic.
I tried to use a variable to acess a diferent subnode each time. The trace is empty. If I dont assign a variable and use a node name, the code works.
Code:
private var xml:XML;
private var il:XMLList;
private var Rss:Array;
for (var j:uint = 0; j < Rss.length; j++){
xml = new XML(e.target.data)
letter = Rss[j];
il = xml.letter.clip;
trace(il);
Any ideas? is my approach wrong?
Thanks for your time.
List Box
I'm creating a glossary with 3 parts, the first is a list of words and their definitions in a dynamic text field with a scroll bar. The second is just the list of words in a list box. The third is a series of a-z buttons. I can make the a-z buttons scroll the dynamic text field to whereever I want using "setScrollPosition".
I want to be able to click the list box and have the dynamic text field scroll to that word and definition. I've tried different functions and "if" loops but none of it seems to work. I've also applied a value to each entry in the list and have been able to get the definition box to move to that line value, but then its stuck on that variable number!
Can anyone help?
List
Hi all,
I've added a list on the stage.
I've created 4 names inside:
Me
my friends
my job
Info
I've called myList.
I 'd like to load an external movie in a blank page when i select te item.
How can i do?
many thanx
List Box Or Not?
Hi,
I have a list of links, like a table of content. After clicking on one the selected swf opens.I'm using XML and I thought the best way to present the table of content is a List box. Am I on the right path? And second, I did a little digging and in every case I saw there is no word wrap. Is it possible that in a List box?
THX for your help
AS Help For Top 5 List
I am working on a project that is a web tool that guides users to appropriate links, based on their selections and criteria. I would like for the first frame of this Flash movie to be a "Top 5" list of the links that the tool guided users to. Essentially, everytime a user uses the tool and clicks on the link provided, that link would get a point. The "Top 5" list would display, in order, the links that have the most points.
I know how to do this using PHP and MySQL, but I'm a little hazy doing it with AS. I don't need the script written out for me (but feel free to, if you feel so inclined), but rather a few tips on what I should search for in the help files. What functions or properties would a "Top 5 List" like this have to use? I can use either a MySQL database or flat file (like a txt file) to store the "point" count, as security is not an issue with this project.
Any help, guidance, or simple hellos are much appreciated. Thanks!
Bit -101 Big List.
well... i don't know if you know 'bout this but Bit-101 has aprox. 700 flash files ..........all its collection .....
http://www.bit-101.com/flafiles/
So ...enjoy !!!!
From List Box To List Box
Hello everyone,
I'm creating a sort of search/sort thing using XML and List Boxes. It's three list boxes, when a selection in the first is chosen, it populates the second box based on the choice, and then when a choice is made in the 2nd box it populates the third based on that choice. The choices are being pulled from an XML doc.
I'm so close to having it working. I can get the first to populate the 2nd but not the 2nd to 3rd. I know it's just something with the syntax, how I'm referencing the node I need and how I'm using the listener. It's all running together in my head at this point.
This is in Flash 8.
Here's my AS:
Code:
var RootNode:XMLNode;
var selectedCategory:String; // formerly selectedGallery
var selectedCompany:String;
var categoryPosition:Number; // formerly photoPosition
var companyPosition:Number;
var CategoryNode:XMLNode; // formerly GalleryNode
//var OptionNode:XMLNode; // formerly PhotoNode
var CompanyNode:XMLNode;
var searchXML:XML = new XML();
searchXML.ignoreWhite = true;
searchXML.onLoad=loadSearch;
searchXML.load("searchBoxes.xml");
stop();
var CBOListener:Object = new Object();
CBOListener.change = loadGallery;
search_lb.addEventListener("change", CBOListener);
var companyListener:Object = new Object();
companyListener.change = loadCompany;
selection_lb.addEventListener("change", companyListener);
// the below function calls the loadCombo function after successfully
// loading the XML file
function loadSearch(success:Boolean):Void{
if (success) {
RootNode = this.firstChild;
loadCombo();
}
else {
trace("Error in loading XML file");
}
if (success) {
RootNode = this.firstChild;
loadSecondC();
}
else {
trace ("Error loading second box");
}
}
function loadCombo():Void {
var galleryName:String;
search_lb.addItem("-- Search by--");
for (var i:Number=0; i< RootNode.childNodes.length; i++) {
galleryName = RootNode.childNodes[i].attributes.categoryName;
search_lb.addItem(galleryName);
}
}
function loadSecondC():Void {
var galleryName:String;
company_lb.addItem("-- Company--");
for (var i:Number=0; i< RootNode.firstChild.firstChild.childNodes.length; i++) {
galleryName = RootNode.firstChild.firstChild.childNodes[i].attributes.optionname;
company_lb.addItem(galleryName);
}
}
function loadGallery(evtObj:Object):Void {
var galleryName:String;
if (evt.Obj.target.selectedItem.label !="-- Search by--") {
selectedCategory = evtObj.target.selectedItem.label;
for (var i:Number=0; i< RootNode.childNodes.length; i++) {
galleryName = RootNode.childNodes[i].attributes.categoryName;
if (galleryName == selectedCategory) {
CategoryNode = RootNode.childNodes[i];
categoryPosition = 0;
loadPhoto(categoryPosition);
break;
}
}
}
}
function loadCompany(evtObj:Object):Void {
var galleryName:String;
if (evt.Obj.target.selectedItem.label !="-- Choose One--") {
selectedCompany = evtObj.target.selectedItem.label;
for (var i:Number=0; i< RootNode.childNodes.length; i++) {
galleryName = RootNode.firstChild.childNodes[i].attributes.optionname;
if (galleryName == selectedCompany) {
CompanyNode = RootNode.firstChild.childNodes[i];
companyPosition = 0;
loadCompanyName(companyPosition);
break;
}
}
}
}
function loadPhoto(nodePos:Number):Void {
var galleryName:String;
selection_lb.addItem("-- Choose One--");
for (var i:Number=0; i< CategoryNode.childNodes.length; i++) {
galleryName = CategoryNode.childNodes[i].attributes.optionname;
selection_lb.addItem(galleryName);
}
}
function loadCompanyName(nodePos:Number):Void {
var galleryName:String;
company_lb.addItem("-- Choose Company--");
for (var i:Number=0; i< CompanyNode.firstChild.childNodes.length; i++) {
galleryName = CompanyNode.firstChild.childNodes[i].attributes.optionname;
company_lb.addItem(galleryName);
}
}
And a snippet of my XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<searchList>
<category categoryName="Name">
<firstOption optionname="A - D">
<secondOption optionname="Abba">
</secondOption>
<secondOption optionname="Brown">
</secondOption>
<secondOption optionname="Darcy">
</secondOption>
</firstOption>
<firstOption optionname="E - J">
<secondOption optionname="Evans">
</secondOption>
<secondOption optionname="Green">
</secondOption>
<secondOption optionname="Jackson">
</secondOption>
</firstOption>
So when the category "Name" is clicked in the first box, the choices "A-D, E - F" and so on show up in the second. Then when "A-D" is clicked the names Abba, Brown and Darcy should show up in the third. This is where it breaks.
Any suggestions or tips would be greatly appreciated!
List
Looked through tutorials and couldnt find anything on using lists from components library. Any one got any information on where i can find a tutorial on using lists and a simple button on click takes user to specified page? Any guidance is appreciated.
Thanks,
MT
List
hi everyone,
I want to make something. I just don't know what to call it (or how to search for it, sice i don't know how to call it). It's like a list of words (alphabetical order) and an input textfield. When you put a character in the textbox, the list will select the first list-item with that character. When you put in a second character it will go to the first entry with the first 2 characters, and so on. Can someone push me in the right direction?
thanks
List Box
I am new to flash and I have been trying to create a list box that when you choose from the list a specific text appears in a text box.
I have spent hours trying to code this and some more browsing the internet to find some hints nothing succesful..
Anyone has an idea how I could start or where I can find a good help..
thanks in advance.
|