ActionScript 1/2 :: Loading List Of Img?
Jul 11, 2009
i have wasted almost two days on that.im loading a list of img urls from xml file:
<image>
<item><![CDATA[http://www.thelatest.co.il/images/tags/court.png]]></item>
<item><![CDATA[http://www.stockvault.net/images/sv08/random/firepit.jpg]]></item>
<item><![CDATA[http://www.stockvault.net/images/sv08/random/cloudysun.jpg]]></item>
[code]....
now, the problem is that only imges in the array that located in 1,3,4 etc position are loaded,and the mc ignores the imges in 0,2,4 positions.
View 21 Replies
Similar Posts:
Sep 3, 2009
So I am trying to load a text file into flash, grab all of the files listed in it and then load them into flash. Not working. Heres my code.
ActionScript Code:
import flash.display.Sprite;
import flash.events.Event;
[Code].....
View 5 Replies
Jun 20, 2009
I'm making a flash app that play's movie clips on the main stage.
I have 4 buttons on the bottom for 4 different catagories of movie clips.
I plan to be able to update the catagories with 5 new movies per week (replacing 5 older movies).
My knowledge of actionscript is limited, so I have just imported each individual flv (which are hosted on a webserver) onto individual keyframes on a movie clip and just placed a simple gotoAndplay action script on buttons to play the movies.
My question is: Is it possible to have a file with the list of .flv url's on it and then each keyrame to look at the file and load a specific line.
i.e. keyframe 1 load line1 from movie list, keyframe2 load line2 from list etc etc.
This would save me alot of time, as at the moment I am going into each keyframe and changing the url of the flv when I update. If I could just change the url's on the text file, that would be great.
View 1 Replies
Sep 27, 2003
I have an array, how can I load it into a list box? Also, I have 6 arrays, I put them each into a different layer, Is that correct?
View 5 Replies
Dec 6, 2009
I originally built this in Flash 8, then moved the files over to CS4. I have a list component where I've loaded song files through xml and everything is working great. How to make it play one of the 8 files randomly when it starts playing, instead of it always starting with a specified track (currently track one obviously). So each time a visitor comes to the site it is a different song.
PHP Code:
this._lockroot = true;
//make textfields autosize
album_txt.autoSize = "left";
artist_txt.autoSize = "left";
title_txt.autoSize = "left";
//create sound object
[Code] .....
View 10 Replies
Dec 27, 2009
How do I manage that, while the movie starts, some parts of the Display List are "hold in the backhand" and get loaded when I decide that they should.Can I only do that via external SWF-Files? Further question: Is it possible to stream the files, by calculating the download speed and starting the movie when I want it to do, or is Flash doing that automatically
View 4 Replies
Jun 26, 2009
I'm loading an xml file that contains nothing more than a list of "valid" zip codes. Here's a sample of the xml:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<zipCodes>
<zip>82930</zip>
<zip>82931</zip>
<zip>83114</zip>
...and so on.
What I need to happen is when a user enters a zip code, I need to return a "yes" or "no" based on whether or not the zip code they entered is in the xml list. So far, it only works if the zip they enter happens to be the last one on the list. This tells me that it's either not searching the entire file, or that it perhaps needs to search in a loop somehow.
Here's the code that works the closest to what I need:
stop();
var xmlLoader:URLLoader = new URLLoader;
xmlLoader.addEventListener(Event.COMPLETE, showXML);
xmlLoader.load(new URLRequest("zipCodes.xml"));
var xmlData:XML;
function showXML(e:Event):void {
[Code] ....
View 6 Replies
Jun 27, 2003
I have a list of countries that are in an xml document. I was wondering if here was a way to randomly load ten of these and place them on the stage in random places. I want to get the effect of this intro: [URL]. (not the one with the black background)
View 8 Replies
Apr 4, 2009
I got a text file in the same directory as the flash file, and I am wondering what is the problem with it loading the url. the header is live on [URL] and it doesn't want to load the urls. what would be required to get it to do this? when ctrl + enter to test the movie, it loads the url in a new window. am pasting the code below:
Code:
// CLASS IMPORTS
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.filters.*;
[Code] ......
View 1 Replies
Apr 11, 2009
I'm trying to load xml data embeded in php into a listbox component. I have a piece of code that just loads the xml but does not display it in the list box
<code>
var yourXML:XML = new XML();
yourXML.ignoreWhite = true;
yourXML.onLoad = function(success:Boolean) {
[Code]....
View 8 Replies
Apr 11, 2012
i developed application in action script 3.0 with adobe flash cs4 professional. In this application, i loaded another external swf which is having flash list component, but while loading the swf in main swf it showing TypeError: Error #1009: Cannot access a property or method of a null object reference.at fl.containers::BaseScrollPane/drawBackground()at fl.controls::List/draw()at fl.core::UIComponent/callLaterDispatcher() please, kindly suggest me for this issue.
View 3 Replies
Dec 6, 2009
I'm having trouble figuring out the code to add to this to create a random loading song every time the page is refreshed.[code]...
View 0 Replies
Jan 28, 2010
Environment: Flex/As3/Cairgorm/composite component.I have two comboboxes and two datagrids such that the selection of combobox 1, inserts data into combobox two and the fist datagrid.The selection of combobox 2 inserts data into datagrid 2.I have setup the change event so that the user selection on each of the combo boxes do the right thing. The problem is that on the initial load of the comboboxes, the change event does not fire and subsequent synchronization data loading does not happen.Is there an event for getting the itemselected (1st item) after the combobox is initialized?
View 1 Replies
Aug 11, 2010
I'm using flex 4.1 to write an application. i read in the documents that has the rowCount property to set how many items to display. the does not have that property. how can I limit the list to display 3 items ?
View 3 Replies
Nov 9, 2010
I am working on an older Flash project created in CS3 ActionScript 2.0 How can I make the pointer cursor change to the hand when hover over a list item?_root.slidePanel.myList'myList' is the list. I have traced out the contents of the List MC and it has a child MC called 'content_mc'. I assumed this was the object containing all of my list items but the only members of this MC I can see (when tracing them out) are 'setRGB' and 'searchKey'.
View 1 Replies
May 26, 2011
Flex 3 List control had a itemRollOver event. Flex 4 List doesn't have it. Is there an equivalent or a workaround for this issue?
View 2 Replies
Jun 8, 2010
Creating a dynamic list and associating a picture with each list item. i need the list to be scrollable, and i want the list and it's associated picture to be displayed randomly when the application is re-launched. i.e it doesnt show the same list everytime.
I also what to be able to sort the displayed list items. e.g if the list items is about restaurants, i want users to be able to sort the displayed items by either; district, cusine type and gastro type.
View 0 Replies
May 10, 2007
I have a combobox and list component on the stage. The combobox has 3 selections. How do I get it so that each selection triggers the specific xml file to load into the list component? I can't get them to communicate to each other.
View 1 Replies
Dec 31, 2009
Here is a snip from within my code:
[Code]...
The 'recommendations' dataProvider is an ArrayCollection of String, which are generally sentences about as long as this one. By setting the variableRowHeight and wordWrap properties as shown, if a sentence is too long to fit on a single line, everything works fine- the row expands and the messages show on two lines, or occasionally three.
The space allocated for this panel within the entire canvas means if the total text size of 'recommendations' exceeds six lines, I need for the entire list scroll. This is also working just fine. The trouble is when using the mouse wheel to do the scrolling- Flex scrolls both the entire list and the single item where the mouse is hovering. Often this results in only the second half of a sentence being visible. Non-programmer friends I have asked to look at this noticed this, and tell me it as a problem. If a user does not notice the dual scrolling, and sees only a fragment of a sentence, it will be perceived as an error in the application.
[Code]....
View 1 Replies
Apr 23, 2011
I want to add a SimpleButton to a list item in a list component. I am getting the CellRenderer for the list item I want and using the addChild method to add the simple button. The button appears in the right spot on the list item but it doesn't function like a button. It's like the contents of the buttons first frame is added to the CellRenderer and nothing else.
View 1 Replies
Jul 6, 2011
When a user selects a category from the first drop down box then i want the 2nd drop down to be updated based on the selection of the first drop down. I have created multiple ArrayCollections whose names are set to the "data" values of the first drop down, for instance:
[Bindable]
public var countries:ArrayCollection = new ArrayCollection([
{label:"USA",data:"USA"},
[code].....
View 2 Replies
Aug 31, 2011
I am currently working on a project in Flex and I am having a hard time having a list's contents ALL be selected by default. Wondering how to do this.
<mx:List id="list" dataProvider="{dp}" allowMultipleSelection="true"/>
I'm just trying to have the list all selected.
View 2 Replies
Mar 23, 2012
Why I have to press 2 times the arrow key down to get a navigation through the list items in a list component of Flash?
Theres any workaround for this? I have a listener for keyboard event that checks if keyCode is equal to 40 if it is then I use 'stage.focus = list', but I have to press 2 times key arrow down to start navigating through list items.
View 1 Replies
Jun 28, 2010
I'm trying to animate a list as I delete the top row. All the examples I can find use itemsChangeEffect to bind to the effect, but this property exists only in MX lists, not spark lists.
Any idea how I can get the same effect done in Spark Lists?
I'm trying to remove the top most item in the list with a slight fade out effect before the rest of the items move up to replace the gap.
View 2 Replies
Sep 28, 2009
I am creating a map of the USA and when a user mouses over a particular state,I want to display a movie clip (which is just a text list of our dealers in that state). When the user mouses out I want the list to disappear.However, I want the user to be able to mouse over the list to scroll the list and whenever I try it, obviously the state loses focus and the MOUSE_OUT Event fires.How to I get around this?Here is the code I have currently:
Code:
PA.addEventListener(MouseEvent.MOUSE_OVER, showDealers);
PA.addEventListener(MouseEvent.MOUSE_OUT, hideDealers);[code]............
View 1 Replies
Nov 23, 2009
while i using drag & drop from listbox1 to listbox2 ,how can i get all the items of listbox2 in flex
View 1 Replies
May 13, 2011
The traditional way to assign an icon would be to use the icon field of the item renderer,which reads the value of "icon" property in your data, for example:
listData.addItem({label: "Logout", icon: "com.classpth.DefualtThemeLogoutIconClass"});
But i want the DefualtThemeLogoutIconClass to changed to another class: ightThemeLogoutIconClass when the theme is changed.The only way to do this would be to use a style declaration containing a classReference to the icon, and change its the value in each of the CSS files of the various themes.The question is, is there any way to assign this style to an icon in a List, something as easy as intuitive as list[0].getIcon().setStyle("styleName");
View 1 Replies
Apr 13, 2006
I have two Lists (components) on stage. The first one (mainList populates from an XML called topics.xml
[Code]...
on event handler change, I want to load the second list on the other list component, called subList..It's not loading.. I believe it's because when it reads the data from my topics list, it reads topic1.xml instead of "topic1.xml" ( reads without the quotes). If I unquote line v.list.load("subtopic.xml"), it works, but I need it to be loaded from the XML..
[Code]...
View 1 Replies
Jun 29, 2009
how to populate a list box component located within a seperate mc in my swf with an array... the array comes from a response from a webservice call. I am not currently on the computer with my source code available so lets just use the following....
listdata[i] = the array i want to populate the list box with..... (listdata1, listdata2, listdata3, listdata4, etc. etc.)
movieclip1 = the MC within my fla containing the list box component
mylist = the actual list component
... just not all that familiar with the format of actionscript when working with objects... using CS3 and as2 btw,
View 3 Replies
Mar 28, 2006
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 choiceThe 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
[code]....
View 2 Replies