This is the code i've got, basically checks finds the x,y position of number 2 in a multidimensional array. For some reason sprite.px = x and sprite.py = y give undefined messages when i trace them. What am i doing wrong?
[AS]
for (var x = 0; x<map[x].length; x++) {
for (var y = 0; y<map.length; y++) {
I have a class like this.. public class Doc { public function Doc():void {} public var myVar:Boolean; } How can I know if the value held by myVar is default false, or someone has assigned false to it? Isn't there an undefined state? How can I achieve such a thing?
if I make create a movieclip and on the first frame trace(root.myVar) I get this error:
Quote: 1119: Access of possibly undefined property myVar through a reference with static type flash.displayisplayObject.
Why? Even if I use the target tool in flash and choose Absolute it gives me 'root' for my main time line.How can I get my variable off the main time line with an absolute path?
if i have embeded swf like myswf.swf?myVar=test.txt ,i get by _root.myVar (test.txt)how can i get this parameter in AS3? I have searched google but no success
I have a base class "Vehicle" and a derived class "Car".
[Code]...
Basically, I want to set a vehicle property in Car's constructor, call Vehicle's constructor with super() and have Vehicle do something based on myVar. But this is the output i get: car pre: null car post: car vehicle: vehicle Why does myVar not keep the value of "car" when the base class constructor is called? How am I supposed to implement this correctly?
i am using flash, .Net, and MySQL and have elements (text fields) posting in flash.Question is, if the table in the data base is not holding the var char how can I set the text field in flash to not show undefined and just be blank?
I am on AS2.0, CS4:i am trying to extract the following data from the XML attribute:[code]i tried to load the xml attributes into the two separate dinamic text fields:[code]
I have the following line, which is just a loadVariables:loadVariables("data.txt", _root.fa);This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:&faFile=player1.mp3.And then later I have this line which loads the sound from the .mp3:[code]
I've set up a holder flash file that checks an XML file every 30 secs, and if the content has changed loads a new movie into itself. I am getting mixed results and baffled why this is not working consistently - the XML is being read successfully, but the attributes that should be read from the XML are being returned as 'undefined' for some reason.[code]...
So good so far in ActionScript language I actually haven't fell in bad condition but still I have one good issue that I can't do!In order at the root timeline everything is Ok when I call the XML childNodes or write the XML class everything its true, but when I call the XML childNodes from root within a movieclip XML
I know there are a number of posts dealing with this issue. But, I'm still not understanding it.I keep getting a "1120: Access of undefined property CSSloader." in the following script:
I'm using YQL to try and find band photos for a project I'm working on. If an image is found, it is returned in an XML response, and my flash code posts it. But if one is not found, I'm not quite sure how to tell flash not to do anything. Here's my code:
XML.ignoreWhitespace = true; var groupPhotoXML = new XML (e.target.data); var imgRef = groupPhotoXML.results.img[0].@src;[code].........
I've got bit stuck of the following code, I don't know why the txt doen't display in flash movie, I guess it's a simple error but I just don't find it.
[URL]
the modified code goes here:
Code: function createJustifiedText(name, depth, x, y, width, text, format) { this.createEmptyMovieClip(name, depth); this[name].createTextField("tempCamp", 10, 0, 0, 0, 0);
[AS]_parent["object"+index]._x;[/AS] What is the point of the [] ? Is there a different way to write this? I am having trouble getting this working right, returns undefined when I import the .swf into a diff .swf but if I run it alone works fine..