Actionscript 3 :: Call To Possible Undefined Function UpdateDisplayList In New Class Of HGroup?
Feb 22, 2012[Code]...
why throwing "Call to possible undefined function updateDisplayList"?
[Code]...
why throwing "Call to possible undefined function updateDisplayList"?
why this is not working.I have an application with a new class I just created. The class loads, but will not call it's own internal function.
package com.parkerandkent.components.classic.photogallery {
import caurina.transitions.Tweener;
import flash.display.MovieClip;[code]....
"Test 2" will not fire here.And I get this error message:
CallTag.as , Line 10 1180: Call to a possibly undefined method init.
I have 5 buttons that onRelease (= when clicked) calls the same function with each a different variable.
contentLoader(profile);
contentLoader(projects);
and so on.
the function is:
function contentLoader(sName:String) {
trace(sName);
}
Now the trace returns 'undefined'...I just do NOT see it anymore The idea behind is that I want to use a moviecliploader to load in the content corresponding with the clicked button (projects.swf, so it'll use myMCL.loadClip(sName + ".swf"); That trick always worked, but like I said, it keeps returning undefined. Did I make a mistake by strict data typing sName as a String?
how do use a function from a doc class.... to call a function to work on in
[Code]...
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].....
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.
Im getting this error: 1180C: as3_scrollbarAS3 ScrollbarsrcclassesMain.as, Line 1 1180: Call to a possibly undefined method addFrameScript. the actionscript in my .fla timeline is: _scrollBar = new FullScreenScrollBar(_content, 0x222222, 0xff4400, 0x05b59a, 0xffffff, 15, 15, 4, true); addChild(_scrollBar)
[Code]....
Error 1061 Call to a possible undefined method addEventListener through reference with static type Class
source:buttonsMenu.addEventListener(Event.ENTER_FRAME, moveMenu);
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].....
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 RepliesI 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 RepliesI'm new to oop and I'm trying to convert a auto scrolling TextField into a class. I guess it has something to do with there not being a stage when the class is instantiated but I'm not sure how to get around it. my code:
[Code]...
How can I run function of the main document class from a class of a MovieClip? I usually just used MovieClip(parent).function(), but now my MovieClip has another parent. Or what do I have to pass to the MovieClip class when creating the MovieClip to acess the main document class?
View 9 RepliesLets say I have a Main Document Class called Main. I also have a child class called childClass that call a function from the Main class and is also imported in the Main class. How should I call the function? I tried this , but when calling the function, it's getting me error.
Main class :
Code:
package {
import flash.display.Sprite;
import com.childClass;
[Code].....
I have a Document class that instantiates a class named Other. I need to call a function in the Other class from the Document class.I'm getting this error: Call to a possibly undefined method OtherFunction through a reference with static type Other.I have read online that you need to use make the functions static or use a getter function but I'm unclear how to do that. I haven't been able to make it work and I feel like i'm missing something fundemental with this problem.below are simplified versions of the classes.
Document class
Code:
package {[code]......
I have a document class called Main.as In the class constructor I have the following listener:
enter code here
var listeningFORModeChangeToStudent:Sprite = new Sprite;
listeningFORModeChangeToStudent.addEventListener(TellAllModeChangeToStudent.STUDENT,exp);
addChild(listeningFORModeChangeToStudent);
[code]....
In a third class I make a call to the despatcher in the previous class:
enter code here
var ThisTellAllModeChangeToStudent:TellAllModeChangeToStudent = new TellAllModeChangeToStudent;
ThisTellAllModeChangeToStudent.tellAllModeChangeToStudent();
I have trace statements in eveything and from this I know the despatcher in TellAllModeChangeToStudent is being called.The problem is that the listener in the main.as is not calling the function exp.I cant see why and I dont know how to check if the listener is actually seeing the dispatch event?
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);
can i call a class public function from another class? what's the cleaniest solution to do that?
[Code].....
a button wich is istanced in Menu, run showTheThumbs method, in Thumbs.
My question today revolves around a CustomEvent I'm trying to send from one sub Class to another.
I've used my CustomEvent class to pass an event from a sub Class to my main class fine, but I'm not sure who to do that between sub classes.
My Custom Event Class
package src.events {
import flash.events.Event;
public class CustomEvent extends Event
{
[Code].....
I want to create a utility class (my first one ). Trying the package thing first I'm stuck with a "1061: Call to a possibly undefined method abc through a reference with static type Class"
I have:
1. packagetest.fla: empty except the assignment of the class in its properties: packagetest
2. packagetest.as (same directory as packagetest.fla):
Code:
package
{
import flash.display.MovieClip;
import example.*;
[Code].....
I'm trying to have a class file which can add objects to the stage via addChild; however, when I call addChild from within the class file, I get the error "1180: Call to a possibly undefined method addChild." I've tried importing flash.display.* and that doesn't fix the problem. Does the class file have to extend Sprite or MovieClip to be able to add objects to the stage?
View 8 RepliesHow do you call a function from another class in AS3? Functions referring properties/methods from instances created in that class. For example I have a class that creates a textfield and a scrollbar and another that load some images in a Scroll Pane component. I do it in that way because in some menus appears only text and in others text & images
What I need is with the scrollbar, scroll both text and images
I have this piece of code that has a problem.
[Code]...
This is what I can do..Write a Menu Class to build a panel of buttons.Add the event listener to the object in the Class.Instantiate the Class in the main document.
What I cant do or understand is how to respond to the events from the Menu Class in the Main document, say by calling a function that exists in the Main document.
I get around this by instantiating the menu Class and then assigning the listener to it in the Main document.
I have a mainIndex.as menu.as (extends movieclip-instantiated in mainIndex)
When a button is clicked in "menu" class I want passing the name of the menu item to a mainIndex so the swf with that name can be loaded.
I'm just beginning to learn AS3. Here's what I intend to do. Create a base movie. Load a footer into the basemovie. When a button is clicked in the footer, I want to call a function in the base movie to load a page on the top.
Please refer to the attachment. Basemovie is the main class, that loads the footer swf. In footer.as, I want to be able to call basemovie.fLoadContent() from the function fClickNext().
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.
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]...
I like to call a function that is outside of the class file.
for example
main.fla
Code:
function callmepls(){
trace("yes");
}
[Code].....
I'm basically trying to call a function that is on document class from another document class. I have a document class called Main.as in it there is a function called tester(). I need to call this function from another document class called Step1.as.[code]Does anyone know how I can call the function? I cant seen to get it to work.
View 5 Replies