First of all, this is not specifically for homework. It's a project I've been working on for the past few months and I've kinda hit a road block. The short version: I've got a Flash file (which is a DJ program) whose main functionality is to play mp3 files, load the files a user uploads into a web page I made and let the user have the ability to choose which song they would like.
I literally have this almost completed except for this final piece: playing what the user uploads. More details of how I got here: I've got a PHP page that creates (or updates if you wish to call it that) an XML file. I'm not sure which way I should approach it (most tutorials online show AS2 but I've already made my project in AS3 and I've seen it's easier...yet I'm not able to figure this out).
This might sound really simple, but I have spent multiple hours on it to find no result. Here is the situation. MY xml structure looks like this:[code]But I am not able to refer to the corresponding parent <R> so that I can traverse it to retrieve corresponding <SEZ N="name" V="dummy name"/>
I have 2 classes Main.as and RedPawn.as (yes, in the same folder).I am wanting to check if a child exists on a movie clip in Main.as through RedPawn.as.This is within a for loop since I am checking 24 possible values for _dest until I find a match.This simplified code example would be in the RedPawn class:
Code: _dest = 'example_mc'; // example_mc is pulled from an array if ( MovieClip(root)._dest.numChildren < 2 ) { // do stuff; }
I'm currently working on a tower defense game and am in kind of an odd situation. I've programmed it in such a way that a large class hierarchy is in place. It's like this StartScreen class ---> BaseLevel class ---> GUI class ---> TowerPlacer class(towers are stored in an array in this class) ----> etc.My problem is that i need to access an array in BaseLevel from my GUI class, is there any fancy trick for doing this? or have i screwed myself over.
I am experiencing problems when trying to traverse XMl returned from the youtube data api.I can trace the XML but cannot access any of the nodes, not sure where I'm going wrong, I have tried various methods including parsing JSON format from youtube but to no avail. I thought it maybe the namespaces so I replaced these using a script to replace them as attributes. A snippet of returned XML is below: [Code] .....
I've been searching around forever trying to find a way to make traversing nested display lists more of a 1-line possibility.In AS2 you could grab a clip just by _container.clip1.nestedclip2.nestedclip3 and it was blatently simple.In AS3, is there any way to do that?So far my only methods are keeping a class level reference to important parts of the UI or doing a painful series of getChildByName chains until I drill down to it:[code]The casting makes the getChildByName method possible.
convert pdf file into byte array.and also i tried in Google also but no results yet.can u prefer how to convert pdf file into byte array and retrieve byte array into pdf file in flex application.
I have an array collection of strings and integers (which I have displayed in a data grid) and I am wondering if it is possible to export the array collection into an html table? or even a text file for the user to download
I found some pages that had an export to .xls files but I want to stray away from that for now.
I have a file I am saving out in php that is just a txt file that has an array in it like this:
array ( 0 => array ( 'key' => 0,
[Code].....
Then I am trying to bring it back into flash as an array. I have tried things like "as array" but that doesn't work. converting this "string" from a txt file into an array in flash?
i need to split a large text file into an array at line breaks so one array element = one line.i have tried the using "" in both match() and in RegExp but it doesnt work.i had the g and m flags on. tried the $ sign too.
After much searching, I just haven't quite found an example that will let me make the leap from hard coding to dynamically loading the data (in large part, because of the name space declaration as part of the array element).
I want to read filetext (.txt) and put it in to array. here is my sample text from my file.
22 33 11 22 45 56
How can I read file and put it in to array like a[0] = 22 a[1] = 33 a[4]=11 ... or I should use 2 dimension array ? Is flash AS3.0 has 2 dimension array ?
I'm trying to pass an array from flash to my main class in AS3. This is an array that contains a string of positions (x,y)...to add it to main array that will be a SO..
Code: savePoints_btn.addEventListener(MouseEvent.CLICK, saveBezierF01); function saveBezierF01(e:MouseEvent) {
After spending a whole week on this,which most likely will turn out to be very simple, I have an xml file (with over 1300 cNodes) that is set up like this:
What I am trying to do is to create an array (arr =[]) that hold only the cNodes chosen in the "saveText" .. in other words the cNodes assigned the value var = 1 in the SO file.
Is this easier done as a temporary array or as second SO file.
Kglad from adobe forum said this but it doesn't work,the pop() method removes the last item in an array and returns that item. so, if you need that reference in your next-to-last line of code, use:
import flash.events.MouseEvent; import fl.display.ProLoader; var proLoaders:Array = new Array();
I am trying to create an array in flash using a .txt file. I cannot figure out how to get an array to recognize the numbers in the text file. For example...I create an array by writing...allImgsArry=new Array (). Usually I would add my array contents in the parenthesis, but i need to add the contents from my text file into the parenthesis instead. This is because the end user wants to be able to rearange the array contents by only using the text file.
how to load an array from a .txt file into my flash presentation. The point is that people need to be able to edit a list of products without needing the .FLA movie (or they will mess it up).
I am trying to create an array in flash using a .txt file. I cannot figure out how to get an array to recognize the numbers in the text file. For example...I create an array by writing...allImgsArry=new Array (). Usually I would add my array contents in the parenthesis, but i need to add the contents from my text file into the parenthesis instead. This is because the end user wants to be able to rearange the array contents by only using the text file.
pulling both a variable and an array from a text file (.txt). In my case I have the following:A flash file (.fla)A text file (named MyTxtFile.txt)Now, I just need to be able to pull an array from the txt file. Is it possible to do this? On the main timeline of my flash file I have the following:
Code:
MyArray= new Array("Pizza", "Cheese", "Fish"); _root.NumberofItems= 3;
My goal is to have the "MyArray" array in the text file so that I can edit the values from the txt file.Then I have a button on the main timeline ("Item_txt" is just a dynamic textbox in the flash file):
I want to be able to update this file often, so I thought it would be handy to just "store" an array and a variable in a text file. Let's say in MyTxtFile.txt I had the array "MyArray" and the variable "NumberofItems". I could just update the information in the txt file and it would update the Flash file.
Edit: Would it be possible to store a string in a text file, then have that string put into a blank array? For example: If I had "cheese", "stars", "playdoh" in a text file and then I pulled the string into flash using the LoadVars class could I have the code in my time line set up like this:
Code:
_root.variable1 = ""; var ARRAY:LoadVars = new LoadVars(); ARRAY.onData = function(thetext:String) {
Gotta problem with a multidimensional array. It works when included in the actionscript but not when included in an external .as file accessed through #include the actionscript (in the actual flash doc of course)
Code:
#include "as/datafiles.as"
Code:
var elms = new Array(); for (var i = 0; i<=14; i++) { elms.push(new Array()); }
[code]....
brings up 'undefined' when the code is placed in an external ("as/datafiles.as") actionscript file, but works OK in the actionscript.
I have loaded XML into flash and everything is great. I have an Associative Array that makes a dynamic menu and everything is great.
What I would like to do is combine the two and have my loaded XML fill up the Array and the dynamic menu.
Here is the XML portion:
Actionscript Code: //Importsimport flash.net.URLLoader;import flash.net.URLRequest;import flash.events.Event;//Create XMl variablevar teamsXML:XML;//Create URL Loadervar xmlLoader:URLLoader = new URLLoader();//Tell the URLLoader named XMlLoader to listen for the xml //file to finish loading, then run the function
I have an appliacation which displays the data from a txt file which contains data and which is being reffered to as an array. Here is the parameter data:
I am working on making an app to display xml data, which currently is using data from parameter file where the data has been stored in array format.[code]...