basically i have a custom function for the array class. and within it i can refer to the aarray by using "this" however in a trace statement i want to be able to get the name of the array.
Code:
// i think getDefinitionByName() might be of some kind of help.
var myArray:Array = [1,2,3,4,5]
Array.prototype.functionName = function(){
I am trying to access data from an array. The array is in the root and I am trying to get it's data into a submovie. In as2 it would have been:
mylabel.text = _root.myarray[1];
So, i have tried:
mylabel.text = root.myarray[1]; and mylabel.text = (this.root as Array).myarray[1];
and tons of other configurations.. I get the 1119 error no matter what i do. I am beginning to think I just can't get the info from the array in a sub movie..
I have an array variable called ball[#], which value starts at 0 and is incremented up to 8.
I also have a corresponding array variable called _ballPlaced which returns true or false if a ball is placed in a target zone.
What I would like to do is retrieve the array value variable from the ball[#] at any time.
For instance, the ball[#] variable can be clicked and dragged, so when it's selected it becomes the event.target. E.g. How can I put the array value of the ball[0] in the ball _ballPlaced array.[code]...
I have parsed an xml message into several arrays inside a function. I am able to see the data with a trace when it is placed inside the function, but I get a "parameter cannot be null" when the trace is outside the function.
function parseMC(assesInput:XML):void { for (i = 0; i<assesInput.*.length(); i++) { qArray[i] =(assesInput.multipleChoice[i].question.text());
In a Flex project, I have an array with objects in it. I want to save this array in a cell on a mysql table along with some other basic info like title, and an id. How to echo all the rows... I'm trying to echo the contents of an array that was serialized and placed in a single cell. This array has objects in it. So, I have this code here to serialize the array, and insert it along with the other info into my DB:
function submitLogDbObj($array,$id,$title) { $title=mysql_real_escape_string($title); return mysql_query("INSERT INTO logs (text,id,title) VALUES ('".serialize($array)."','$id','$title')"); }
Then for a test I'm trying to make a loop that will display the log in a way that looks like a conversation... An object in my array would look something like: [1] icon = "" msg = "this is a test" name = "Them: " systemMsg = 0 [Code] .....
my_Array = new Array(); my_Array.push("one", "two", "three", "four")
Here's the catch: another variable (for instance) called "three" is loaded. I want to look up "three" in my_Array and retrieve the index-number (should be 2 of course). How can I accomplish that?
Supposing that i've a lot of MC placed on stage, every MC is stored into an array. Clicking on one of it, can i retrive the position in which it's stored into the array?
I am currently trying to create a piece of code that will retrieve values from a 2D array and use them as x and y values to position instances of a MovieClip called mcMain. The code for the array will look something like this...
Code: var lvlMain:Array = new Array(); lvlMain.push(new Array()); var xAxis:Array = new Array([150,400,200,300,100]);
[Code]....
how to create a piece of code that would retrieve the x and y coordinates listed in the arrays and use them to create instances of mcMain. So going from the code above it would create the first instance at x=150 and y=100, second instance........fifth instance at x=100 and y=500.
I'm using the xml connector to retrieve the results then bound the items array to the dataprovider No problem to access the items but my question is how to access to var1 and var2 in actionscript. Could i bound it to a var?
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 this XML data that is coming in and am unable to find out why it will not match a image name with the requested name. It seems to when traced to be showing [object Loader]. I tried converting it to a string, but it will not accept the attribute as a string[code]...
I have seen more than a couple of sites using flash content and displaying it based on the URL string.
For example, accessing http://domain.com/ loads the site normally and the SWF object displays the home page and sets the URL to http://domain.com/#/home. Then accessing the About section sets the URL to http://domain.com/#/about
Also, if accessing http://domain.com/#/services directly (from the browser's address bar), loads the site and the SWF displays the Services section automatically.
I have an AxShockwaveFlash object in a Windows Forms application, and load a (AS3) movie into it with LoadMovie. The movie plays correctly, but I am having a problem getting a variable from flash.I have tried using GetVariable but it always returns an empty string. How can I get the value of a variable from flash?
an easy answer for 99% of you. I have a custom class 'Users()'. In PHP I have all the values being populated correctly. When I go to Flash Builder - and do the test function - All the data comes back properly. However, when I click a button and refer to the lastResult property of the CallResponder - it comes up NULL the first time, and then if the button is clicked a second time it will return the correct result. What step am I missing? I had the same problem with something simliar last night and am getting BEYOND frustrated - especially since I know it is some SMALL detail I'm overlooking.So just for clarification - lets say there is a button named button1So button1's click handler:1) Validates the text input properties2) Asks the server if that user and password match3) If they do - then I want it to grab all of that specific users info and put it into a User class. Again - when I test this function/method from within Flash Builder all the values come back as they should. It's just on the first button click they come back NULL...he second click they populate fine - I.E.-
well after I made all of the conditional statements I came to the conclussion and the annoyance that I cannot retrieve the statements value, I need help:[code]it does not return the value.. why?
I have a MovieClip and need to get the drawing information from the graphics property. Is there any way to retrieve an IGraphicsData vector from the graphics property? In fact is there any way at all of retrieving the drawing information?
1. Create a XML/PHP driven menu that uses PHP to generate a XML file with database results.
2. Use flash to retrieve the XML and dynamically add movie clip, menu buttons that have label values, IDs, and whether or not the menu item is published from XML, to the menu.
I found some code from a tutorial that took XML data and added a movie clip to the stage, added a label, and an ID; however, I could not get it to get a URL property to the button and initiate the navigateToURL to actually get the unique variable to come from the XML to each instance of the button. I have attached the ZIP file with the original tutorial AS file.
error I get when trying to execute static function createDeadShip in Deadship:
Quote:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at global$init()//references to the line public class DeadPlayerShip extends DeadShip
I am using the setStyle to set the text label on some buttons in flash. AS3.Set font to bold and color to red. myButton.setStyle ("textFormat", redBoldFormat);I do this on as part of a function when the button is clicked.Is there a way to retreive the textformat settings (like bold, etc) so I can un-set the format? I have 5 buttons, when one is clicked, it goes bold and red.When a different button is clicked, I would like the previously clicked button to go back to "not bold" and "not red" and so on,
I will try to state this simply. If required I can post my code. I have created a class that extends the MovieClip. It is basically a retangular shape, with a color and a label that can be set via the "properties" concept. The label.text property is public.
I create a "new" object of this item (more or less a button) depending on reading an xml file.
If the file has 3 names (titles like "Lesson 1", Lesson 2" etc). I create a new "button" for each name in the xml file.
so I can get 3 instances of the object on the stage. Which I get. I create each new object like this:
var link:linkBase; var menu:linkBase;
I use a for loop to read the xml data, and create the instances:
for ....
menu = new linkBase(); // i try to give it an instance name like the menu.name = xmlList[i].name // name = "Week1", "Week2", "Week3", etc
i push the menu object into an array like this: nav_button.push(menu), in the for loop.
I can draw the three objects on the stage. I have a stage listener that will trace the target name if I click on the instance. I get "null" if I click off the button. My problem is that I get the target name for only the second and third instances, and not the first. If I comment out the menu.name line, and click each instance on the stage, I get "instance9", instance12, instance15. So I know there are three objects there.
I can do something like this to get a name on the first instance: nav_button[0].name = xmlList.week, or hard code a string like "Week1".
But I want to be able to do this in a loop of some sort. I am trying to create a user friendly name for each instance, so I know what I am clicking on, and take action depending on the name "week1", "week2" etc.
what I am missing in terms of naming a instance on the stage?
Inside my loop, where i get my XML objects I added a code to draw and add the mask:
var myMask:MovieClip = new MovieClip(); // settings for width height x y color fill etc etc. myMask.name = "NAME-"+i; // set the NAME myContainer.addChild(myMask); myContainer.mask = myMask;
the mask looks fine on the stage.now since i name it, i want to use it for other purpose like moving it now i want to actual call myMask i get my number "num" from other function, that works fine
function applyMask(num:int):void { // need to call myMask("NAME-"+num) }
i have tried myContainer.getChildByNamehave tried:
var masking:myContainer=getChildByName("NAME-"+String(num)) as myContainer;
i have traced for options i can think of myself, but all result no property found.
How do we retrieve data in a webpage for comparasion? I need to do this because I dont have complete control or curtain aspects and need to change menu tilte data ( French or English ) depending on what the Webpage Title data is displayed. I have serverside code in the title eg.{title} that will start with either "Welcome" or "Bienvenue".
So I need to retrieve the first word or amount of characters compair.
if var webpdata =="Welcome" then var menuitemdata=english else var menuitemdata=french
The above is just a idea and not actuall script of course