ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method AddEventListener Through A Reference With Static Type XMLLoadData

Jul 16, 2009

I try to make working an XML loader from a custom class on a new var, but when I add an Event listener it tells me this:

1061: Call to a possibly undefined method addEventListener through a reference with static type XMLLoadData.

This is the code I have on the stage:

Code:
var xmlLoad: XMLLoadData = new XMLLoadData("navigation.xml"); //load the xml file
xmlLoad.addEventListener(Event.COMPLETE, onComplete); // execute onComplete once the xmlLoad is fully loaded
function onComplete(e:Event):void{
//
}

and this is the code of my custom class XMLLoadData
Code:

package{
import flash.net.*;
import flash.events.*;

[code]....

If I remove the listener on line 2 from stage, it working, but all my code execute the wrong way because the XML is not fully loaded.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Preloader Text Error "1061: Call To A Possibly Undefined Method AddEventListener Through A Reference With Static Type Class" Query

Jan 24, 2011

I have written a code that shows no errors when checked however I get an error when the movie is tested: message:

[Code]...

View 2 Replies

1061: Call To A Possibly Undefined Method SetLabel Through A Reference With Static Type CustomButton

Mar 12, 2009

I can't call a function from my Class.

var button1:CustomButton = new CustomButton();
button1.setLabel();

I get:

1061: Call to a possibly undefined method setLabel through a reference with static type CustomButton.

My Class:

package
{
import flash.display.MovieClip;
import flash.text.TextField;

[code]....

View 2 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method HitTestObject Through A Reference With Static Type

Sep 11, 2011

Im trying to use the hit test built into flash, but its failing. I have used this many time before! but this time flash is crying at me. I Think i know why but im not sure how to fix it. Here is my hit test code:

[Code]....

I have tried multiple things, Changing instances, location of the code. I currently have 4 classes, Main, Missile, Enemy and House. House has nothing it in really. Missile make a missile, Enemy Makes a enemy. And main deals with adding it all to the stage, and making it randomly appear ect.

View 8 Replies

ActionScript 3.0 :: Error 1061 Call To A Possible Undefined Method AddEventListener Through Reference With Static Type Class

Jan 2, 2010

Error 1061  Call to a possible undefined method addEventListener through reference with static type Class

source:buttonsMenu.addEventListener(Event.ENTER_FRAME, moveMenu);

View 3 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method ShuffleKnuth Through A Reference With Static Type Class?

Aug 11, 2011

I get the above error. I did actually change a little code because I put it in it's own class.I call the below ShuffleArray class in my main doc class as follows:

ShuffleArray.shuffleKnuth(definitionsArray); [code].....

View 3 Replies

Actionscript 3 :: 1061: Call To A Possibly Undefined Method GotoAndStop Through A Reference With Static Type Class?

Dec 11, 2010

I've been using Adobe Flash CS4 for a couple of days. I've drawn a worm, with eyes and a mouth and these pieces are all MovieClip symbols. I have exported them to actionscript with the class name being the same as what they are (ie. the mouth MovieClip is exported as mouth). The mouth has 2 frames, one smiling and one frowning. I need to mouth to stay smiling at first, so in Frame 1 actions I wrote:

View 2 Replies

Flash :: 1061: Call To A Possibly Undefined Method GotoAndStop Through A Reference With Static Type Class

Mar 30, 2011

I see where i was going wrong however when i change the instance name like you said i 1120: Access of undefined property snakePart. all of this code btw is at document class level and the movieclips are in the library not on stage

View 3 Replies

ActionScript 3.0 :: Get This Error: 1061 : Call To A Possibly Undefined Method Weight Through A Reference With Static Type Person?

Jun 15, 2009

If you have numerous methods in a class, can you just call them like so:

// in the .fla file
var john:Person = new Person(63,150); // creates a new person named john 63" and 150lbs.
john.weight(180); // changes johns weight to 180lbs.[code].....

I must be calling the method completely wrong? I get this error: 1061: Call to a possibly undefined method weight through a reference with static type Person.

View 12 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method Save Through A Reference With Static Type Flash.net:FileReference

Oct 6, 2009

I am trying to get simple example of it running. I can make it work if I publish in FlashPlayer10, but not FP 9

[Code]...

The reference material says Language Version : ActionScript 3.0Runtime Versions : AIR 1.0, Flash Player 9 Does this mean the AIR 1.0 and Flash Player 9 or what is the deal?the compile error is... 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference.

View 4 Replies

ActionScript 3.0 :: Error : 1061: Call To A Possibly Undefined Method AddChild Through A Reference With Static Type Class

Jul 13, 2010

I got this Error : 1061: Call to a possibly undefined method addChild through a reference with static type Class.
 
what I'm trying to do :I have create a new class called Graph and make it extends Sprite and  add a scroolpane to my stage and make an empty movie clip called content_mc and make the source of the scrollpane equals to content_mc
 
in the first frame i wrote this code
  
import Graph;
var graph:Graph = new Graph();content_mc.addChild(graph);

View 4 Replies

ActionScript 3.0 :: Getting At Runtime: 1061: Call To A Possibly Undefined Method Save Through A Reference With Static Type Flash?

Feb 1, 2010

I am trying to use my Flash app to update an XML file when a new user registers. I thought I had found a method to do this using the FileReference.save function. From various searches I understand the function is not as simple as it seems but I cannot get my head around what I need to do to get it working.Here is the code:

ActionScript Code:
var newUserToAdd:String = "<user>
<name>Steve</name>[code]............

This is the error I am getting at runtime: 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference. Are ther any prerequisits I am missing in order to use the function?

View 4 Replies

ActionScript 3.0 :: Error 1061: Call To A Possibly Undefined Method Load Through A Reference With Static Type Loader

Oct 20, 2010

When I use the following code inside a keyframe in a layer (Actions layer) it works fine. When I use it inside a custom class I get the following error: .../siteLoader.as, Line 19 1061: Call to a possibly undefined method load through a reference with static type Loader.

[Code]...

View 1 Replies

ActionScript 3.0 :: Error 1061 : Call To A Possibly Undefined Method HideSubMenu Through A Reference With Static Type Flash?

May 19, 2009

I have this kind of problem:

Code:

if(activeBtn != null) activeBtn.hideSubMenu();
here i check if the activeBtn is a different than "null" and than i want to call this method - who's existing and it's with "public" definition.

But no matter what i chaking there's always pop this Error "1061: Call to a possibly undefined method hideSubMenu through a reference with static type flash.display:Sprite."

View 3 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method SetSize Through A Reference With Static Type Flash.display:SimpleButton?

Sep 22, 2009

i am using the script:imagesb_btn.setSize(width, height);imagesb_btn.setSize(100, 50);but i keep getting the above error message when i try to publish.As far as i am aware im using as3 script in an as3 movie.

View 4 Replies

Flex :: Error 1061 Call To Possibly Undefined Method Save Through A Reference With Static Type Flash.net:FileReference

Jun 2, 2011

I want to save XML File using Flex 4 SDK

var fr:FileReference=new FileReference();
fr.save( newXmlRow, 'D:/Sample.xml' );

Error Shows :

1061 "Call to possibly Undefined method save through a reference with static type flash.net:FileReference"

View 2 Replies

ActionScript 3.0 :: Mouse.hide() Error 1061: Call To A Possibly Undefined Method Hide Through A Reference With Static Type Class

Sep 12, 2011

I am using AS 3 Flash CS4, WIndows XP SP3. I am unable to use the Mouse.hide(); method in many of my scripts. If I add Mouse.hide() to a preexisting script, I get the following error; line1 1061: Call to a possibly undefined method hide through a reference with static type Class. If I add Mouse.hide():void; to a preexisting script, I get the following error: line1 Label must be a simple identifier Once this has happened, if I then remove ALL lines of script from the file...but leave the Mouse.hide(); [or Mouse.hide():void;], and also remove all objects from the stage, when I run the file, I still get those same errors.

[CODE]...

View 3 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method AddItem Through A Reference With A Static Text Type Flash.text.Textfield

Nov 8, 2009

I'm trying to build an RSS feed reader to display inside a swf on a webpage. I need to figure out how to create the RSS feed reader as it's the last bit I need to create for this website.

Here's the code I'm using:

var rssLoader:URLLoader = new URLLoader();
var rssURL:URLRequest = new URLRequest("http://teachercenter.scps.k12.fl.us/education/rss.php?sectiondetailid=69411");
rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
rssLoader.load(rssURL);

[code]....

I keep getting an error message that reads:

1061: call to a possibly undefined method addItem through a reference with a static text type flash.text.Textfield.

View 6 Replies

IDE :: 1061: Call To A Possibly Undefined Method AddChild Through A Reference With Static?

Aug 11, 2009

I am a newbee and just starting to learn about AS3. Copied some ideas and tried to paint a single particle on the stage for starters. No success! I get this...1061: Call to a possibly undefined method addChild through a reference with static type flash.displayisplayObject.In an "Particle.as" file I have this code...

package
{
import flash.display.*;

[code].....

View 2 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method GetInstance Through A Reference With Static

Aug 5, 2009

how to publish data to the database using amfphp but for some reason the class isn't allowing me to do it and is returning this error"

1061: Call to a possibly undefined method getInstance through a reference with static type Class.

View 3 Replies

ActionScript 3.0 :: 1061: Call To A Possibly Undefined Method GetChildAt Through A Reference With Static

Jun 30, 2011

I am fighting against this: I have a script inside a movieclip. There are a few children, too. Each child contains other movieclip whose instance name is "masker" and a button. The script reads:

[Code]...

View 3 Replies

ActionScript 3.0 :: Loader Class - Error 1061: "Call To A Possibly Undefined Method Load Through A Reference With Static Type Loader"

Oct 20, 2010

siteLoader.as, Line 23 1061: Call to a possibly undefined method load through a reference with static type Loader.

[Code]....

View 2 Replies

Flex :: Call To A Possibly Undefined Method Through A Reference With Static Type Class

Aug 1, 2011

I wrote a singleton class to keep track of some variables across my application.

I am getting a syntax error that I can't figure out, I am sure that I am missing something simple but it's been one of those days. Anyone see something wrong with my code?

The error is 1061: Call to a possibly undefined method setResult through a reference with static type Class.

My function in my singleton class

public function setResult(resultNumber:int, value:int): void
{
switch(resultNumber)
{

[Code].....

View 2 Replies

Actionscript 3 :: Call To Possibly Undefined Method Stop Through Reference With Static Type Flash

Aug 24, 2011

getting error 1061: Call to a possibly undefined method stop through a reference with static type flash.events:TimerEvent.on my as3 class. I'm just starting to learn as3 and cant figure out whats causing the error.[code]

View 1 Replies

ActionScript 3.0 :: Call To A Possibly Undefined Method Child Through A Reference With Static Type Function

Mar 29, 2011

public var blob:Blob = new Blob()
addChild.child(blob)

i get this error Call to a possibly undefined method child through a reference with static type Function.

View 4 Replies

ActionScript 3.0 :: Error 151061: Call To A Possibly Undefined Method AddListener Through A Reference With Static Type

Mar 5, 2011

I have a code like below however whatever i try i couldnt implent a progress bar to my action script. Generally i take an error like this:Scene 1, Layer 'Layer 1', Frame 1, Line 151061: Call to a possibly undefined method addListener through a reference with static type flash.net:FileReferenceList.

ActionScript Code:
import flash.net.FileReferenceList;
var imagesFilter:FileFilter = new FileFilter("Images", "*.jpeg;*.jpg;*.gif;*.png");
var fileRef:FileReferenceList = new FileReferenceList();

[code]...

View 0 Replies

ActionScript 3.0 :: Getting An Error:1061 : Call To A Possibly Undefined Method AddEventListener ...?

Oct 11, 2010

I created a simple button that I imported into the stage that I named and saved it as Microwave_btn and I wrote a simple script for it that says:

stop();
import flash.display.*;
import flash.events.*;[code]...

The properties for the Microwave_btn has the class labeled as: Microwave_btn and the Base class as: flash.display.SimpleButton. When I test the movie I get this error:1061: Call to a possibly undefined method addEventListener through a reference with static type Class.

View 1 Replies

ActionScript 3.0 :: Error 1061 : Call To A Possibly Undefined Method AddEvenListener Through A Reference?

Aug 19, 2009

I'm attempting to create an XML image gallery complete with progress bar and combo box, from a tutorial in a textbook. The tutorial in the book calls for the use of simple buttons, but I wanted to use my own instead. I wasn't aware of the difference between using simple buttons in code and custom buttons, so when I debugged I received the good old 1061: Call to a possibly undefined method addEvenListener through a reference with static type flash.display:SimpleButton.Obviously my decision to use a custom button in it's place is to blame, but how do I modify the code so that it still does what I want only with a custom button?Here's my source code:

Code:
import fl.data.DataProvider;
Pull image information from XML
var xml:XML = new XML();[code].....

View 2 Replies

ActionScript 3.0 :: Flash 1061: Call To A Possibly Undefined Method StartDrag Through A Reference

Apr 7, 2012

I've got a piece of code that means a button will only become clickable if a set of keys are dragged to a certain location.

This is my code for that:

Keys.buttonMode = true;
Keys.addEventListener(MouseEvent.MOUSE_DOWN, drag1);
Keys.addEventListener(MouseEvent.MOUSE_UP, drop1);

[code]....

I don't get why it's not working, I also get: 1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:SimpleButton.

View 14 Replies

ActionScript 3.0 :: Box2d Addchild - 41061: Call To A Possibly Undefined Method AddChild Through A Reference With Static Type Class

Jan 16, 2012

I have downloaded Box2d ([URL]) and created a project that looks like this: [URL]. catalyst is the green cube and it has the base class "shapes.box", it is inside "world" which has the base class "wck.World". What i want to do is to add another "catalyst" from the library inside "world" when i click on add_btn. I tried to accomplish this by this code:

[Code]...

Symbol 'buttons', Layer 'Actions', Frame 1, Line 41061: Call to a possibly undefined method addChild through a reference with static type Class.

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved