ActionScript 2.0 :: MyVar = X Gives Undefined?
Mar 2, 2007
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++) {
[code]....
View 2 Replies
Similar Posts:
Oct 11, 2009
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?
View 2 Replies
Nov 30, 2011
I put this code on the main time line:
Code:
var myVar = "something";
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?
View 1 Replies
Feb 1, 2010
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
View 3 Replies
Jan 26, 2012
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?
View 1 Replies
Oct 12, 2010
im having problems getting some as3 generated (not drawn on stage) movie clips moving across the screen.
Code:
package {
import flash.geom.ColorTransform;
import flash.display.MovieClip;
import fl.motion.Color;
import flash.display.*;
[code]....
View 7 Replies
Jul 12, 2007
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?
View 6 Replies
Sep 23, 2009
Not sure what's going on here.
code:
Stage["displayState"] = "normal";
Stage.align = "TL";
for (i in Stage) {
trace(i+": "+Stage[i]);
}
[Code].....
Anyone know why i am getting undefined for the displayState?
View 2 Replies
May 11, 2009
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]
View 8 Replies
Jun 30, 2009
I have just created and posted some scrolling banners to our company website, but I'm getting the following error:
Line: 110
Char 1
Error: 'swfobject is undefined'
Code 0
Do you want to continue running scripts on this page?
View 3 Replies
May 22, 2009
I'm getting this very mystirious error. What I don't understand is that I have some code that is the same but works. Code that doesn't work:[code]
View 2 Replies
Aug 6, 2009
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]
View 37 Replies
Feb 24, 2011
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]...
View 3 Replies
Aug 6, 2009
I have the following line, which is just a loadVariables:
Code:
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:
Code:
&faFile=player1.mp3
And then later I have this line which loads the sound from the .mp3:
Code:
this.sound.loadSound ("media/" + faFile, true);
But when I run this I get:
undefined
Error opening URL 'file:///jeffrey/Downloads/mp3%5Fplayer%5Ffiles%5Fedit/media/undefined'
This is Flash CS4.
View 14 Replies
Sep 13, 2010
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
View 2 Replies
Mar 16, 2011
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:
package as3.comp{
import flash.events.Event;
import flash.events.ProgressEvent;
[code]........
View 1 Replies
Jul 13, 2011
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].........
An unsuccessful attempt traces out as empty.
View 2 Replies
Aug 21, 2009
ActionScript Code:
package{
import Array;
public class ArrayUtil extends Array{
public var array:Array = new Array();
[code]...
View 7 Replies
Dec 1, 2009
I need to know if Null is the same as Undefined and then, is it the same in AS2 as it is in AS3?According to the help files in CS3:
Null: A special value that can be assigned to variables or returned by a function if no data was provided
Undefined: A special value, usually used to indicate that a variable has not yet been assigned a value.
View 2 Replies
Jan 20, 2011
I have a flash file to start calling this function:
Code:
public function ConnectPHP():void
{
[code]......
View 1 Replies
Aug 1, 2005
i have an xml file set up like this.
[Code]...
'list' is the instance name i gave the ListBox Component. But when i test it the list box says Undefined, Undefined?
View 3 Replies
Aug 27, 2005
Ive been working a bit in PHP and flash and have hit a snag. This is my PHP code.
[Code]...
No matter what I do the textBox "recieved" keeps returning "undefined"
View 4 Replies
Dec 15, 2005
This one works really fine, but... the first value is undefined...
var thumb_spacing = 80;
circlecenterX = Stage.width/2;
circlecenterY = Stage.height/2;[code]......
View 14 Replies
Feb 1, 2006
[Code]....
why is it undefined?
View 4 Replies
Sep 4, 2006
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);
[Code]....
View 4 Replies
Sep 5, 2006
Code:
function createJustifiedText(name, depth, x, y, width, text, format) {
this.createEmptyMovieClip(name, depth);
[code].....
View 2 Replies
Sep 12, 2007
This should be a rather simple thing to do. Server is running, files are in my htdocs folder. but it just reports undefined.
Code:
var cat = new LoadVars
function printOut(success){
frankencat.text = cat.id;
}
cat.load("test.php");
cat.onLoad = printOut();
PHP Code:
<?php print "id=lalalalalalalalalalallalalalalalalalalalalalalalalalalala";?>
View 3 Replies
Feb 3, 2009
im currently getting an error with from the output box sayin
Error opening URL: C:/Documents and Setting/blah/blah/blah/undefined
this is the xml code
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<slideshow>
[Code]...
View 10 Replies
Feb 10, 2009
AS2 on a button symbol:
on (release) {
_root.randomVar = pie
trace (_root.randomVar)[code]..........
If I put Var = X in the time line it comes out undefined, no variables seem to be working, tried it in 2x flash projects
View 8 Replies
Jan 27, 2004
[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..
View 14 Replies