I'm having trouble accessing the turnQueue array which is being updated in the first function and accessed in the second, no idea what the rules are between functions for actionscript. Heres the code, I want the turnQueue to be growing as keys are pressed, and at the moment its not updating from the first function.
public function keyListener(e:KeyboardEvent):void {
trace("Key Entered");
if (e.keyCode > 36 && e.keyCode < 41) {
I've been having a few problems with accessing an array from a different function.
The array I want to use is from the makeFly function, which generates instances of the Fly MovieClip. I want to access the array from the paperSwing function, which should test for a collision between the mouse cursor and the fly movieclip, and then if true remove the instance. This is the part where I'm having a bit of trouble, I'm not sure of how to access the array "name[i]".
I am fairly new to actionscript, I've been having a few problems with accessing an array from a different function.
The array I want to use is from the makeFly function, which generates instances of the Fly MovieClip. I want to access the array from the paperSwing function, which should test for a collision between the mouse cursor and the fly movieclip, and then if true remove the instance. This is the part where I'm having a bit of trouble, I'm not sure of how to access the array "name[i]".[code]...
I'm having trouble accessing the turnQueue array which is being updated in the first function and accessed in the second, no idea what the rules are between functions for actionscript. Heres the code, I wanted the turnQueue to be growing as keys are pressed, and at the moment its not updating from the first function.
However I have an upcoming project that's going to have a big image gallery, that is likely to change often, so I can see XML would be very useful for speed of editing/adding etc.
I'm a complete XML noob then, and I'm just doing a little test with some text, and I can't seem to access the Array outside the xml.onLoad function.
Now in the above code, my dynamic text field named "desc" correctly displays "bloody hell, XML is a nause".
However, when the line in bold is placed outside the onLoad function, it returns undefined, and when traced, the description array returns nothing at all.
I need to access the array outside of this function.
I'm using an onLoad function (importing variables from a text file) and I'm creating arrays within a for loop in the onLoad function. I'm using something like this:
Code: this["dvdAry" + i] = this[indexAry[i]].split("##"); So say the first array is called dvdAry0 .
How can I access that Array from a function? Please note the function, the onLoad function and the arrays are all being created on the same timeline.I've tried tracing the array dvdAry0 from the function after the array is created in the onLoad function, but it comes up as undefined. Is the array created on the object that I'm using onLoad on?I'm using a loadVars Object called loadDVDsText.
I have this code to try to acess the values of the array in the arraycollection but it does not work it actually creates a value to the end of the arraycollection. can anyone tell me what im doing wrong i basically whant to modifys the individual arrays in the arraycollection and add Login_user.
how I can access array data inside of an mc from the main timeline.. I am hoping to get into an array called children, which is inside of an mc, which itself is inside of an array called mcs.
Here is what I am trying to get to: mcs[m].children[0];
I have a class Debug with a function called trace inside it which puts a TextField on the stage and outputs the text. Now I am trying to get the Debug.trace() function to do a "normal" debug trace as well from within side itself. of course this causes a recursive loop. I am trying to figure out how I can access the top level separately. I tried using namespaces such as AS3::trace but to no luck.
I know a solution is to rename my function to stop the conflict, but I would like that to be a last resort. It is being used in quite alot of places throughout my entire code so replacing it everywhere is going to be a ballache.
I'm going to post the full code of the two functions, disregard the "fluff" unrelated to the two functions as it is all working flawless, I've tested this HEAVILY and cannot understand why it keeps setting the entire array to undefined!
Code: // processReplace Function function processReplace(transferFiles) { var processArray:Array = transferFiles.slice();
[Code]....
Basically it's supposed to check to see if the file exists and return as true if it does and add it to a replace array, then the replace array is processed into a single string and put into a dialog box through the flash wrapper prompting them to "replace the files or not".
It makes the replace array just fine, it actually even has the right "count" in it but it's setting all the "filenames" to undefined because of the exists = processSearch function.
I even tried to make a new array and run the search just from that one and set the values from the old one and it's still failing.
Is it because of the "break" or can anyone figure it out? Iknow it's hard because you can't use the code
I need to access an array that's on the maintimeline from with in a movie clip im having issues with it.
The variable has all its info on the maintimeline but doesnt show up when i reference it in the movie clip So i tried referencing to the array var thumbURL:String =parent.thumbs ; and var thumbURL:String =root.thumbs ; but got an empty variable.
I've successfully access a web service in as3 and pulled the xml from it into a large array of objects
ie
Code: array object array
[Code].....
This has to be accessed at a later point by the UI in order to build itself. I can't figure out how to create a loop or method or whatever to access this array.
I need several ways of accessing it, so maybe I'm thinking of a method called accessSpecificItem(propertyName:String); <- to set up each UI item traceOutAllItems(arrayName:Array); <- for testing countNumberOfItems(arrayName:Array); <- for the UI to figure out how many items it needs to build
I am trying to play movie clips from an array. I can do this using randObj[1] but would like to use a variable randObj[i] to play the movie clips. I do not want to use root. I think something is wrong with the syntax i am using because randObj[i] comes back undefined when i trace it. Here is the code i am using
Code: i=0; var randObj:Array = new Array("obj1", "obj2", "obj3");
I need to access the elements of an array that is declared in the main swf(_level0). But I need to change it from another swf.How can I do it??So far I have this:
MAIN SWF:
var vector1:Array = [biblio_vid1, biblio_vid2, biblio_vid3, btn_1_4, biblio_vid4];
OTHER SWF:
var vector2:Array = _level0.vector1.slice(); trace(vector2); // undefined,undefined,undefined,undefined,undefined
I'm learning a lot by reading the questions and answers that are asked in the Forum. Now it is my turn to ask a question that is probably a rookie, but I have spend 3 days breaking my head to try to find a solution and have not found it yet.
I am trying that the program responds to each click of the player in a box that is white and turns red, with a random click in another box. Something similar to Tic Tac Toe.
My problem is that I can't make te program to access the boxes in the array by programming. When I try the program to access the box with p.ex.: "this.newBox.boxplus30.gotoAndStop (2);" I always get the error "object null or undefined". I have tried everything you can imagine to formulate that line of code, but without success.[code]...
I have 3 extenal flv files that can be loaded into the main movie when pressing a button.I am using seek and cuePoints to provide a DVD 'chapter-type' navigation.The cue points (in seconds) for each flv are stored as separate arrayshen I click to load a flv, I want to change the array that is being used to seek the playhead.I thought I could do that by using a 'current movie' variable and use an expression to access the relevant array. The essential code (for brevity) is like this:
// var flv1cuePoint:Array = new Array(10,30,50); var flv2cuePoint:Array = new Array(30,50,60);
I am creating a movie that loads data from xml files into an array. The values in the array are then accessed by a clip loaded into the main timeline.
I can trace the values in the array without an issue from the main timeline. When I store an array value to variable and trace that variable from the loaded clip I get a value back back. If I try to access the array directly from the loaded clip everything returns undefined.[code]...