ActionScript 3.0 :: Class Can't Access An Array On The Timeline

May 5, 2010

I have a multidimensional array on the main timeline. Its name is myInst. I need to access this array from this class to build a scrolling list of swfs which the path to the swfs is in the myInst array. I have not included the entire code/class because the issue is somewhere in this part. The error is 1009, cannot access a property or method of a null object reference. This fla is not going to be the root fla, it is going to be external, so the use of root probably will not work, but I tried it anyway, to no avail.. for any help.

package {
import flash.display.MovieClip;
import flash.net.*;
import flash.events.Event;

[code]....

View 6 Replies


Similar Posts:


Actionscript 3 :: Access From Frame-timeline To Class And From Class To Frame-timeline

Jan 30, 2012

I would like to store the value from combobox or text area-MovieClip in MyClass and then I'd like to read this from another frame in *.fla file only this :) have you another code? what can I write in frame 2 Miclass and frame 3

View 1 Replies

CS3 Access Timeline Functions From Inside A Class

Nov 25, 2010

As above is there a way to access any function written inside main timeline from a class?

View 1 Replies

ActionScript 3.0 :: Access The Timeline From Document Class?

Nov 14, 2010

How do I access the timeline from the document class? I tried: trace(this.parent as MovieClip)

but I got a null object.

View 9 Replies

ActionScript 3.0 :: Access A Movieclip Within A Class On Timeline?

Dec 12, 2011

what do i put on the normal timeline of the MouseControlled.fla file to target the character that moves around? Like if I wanted to start coding some objects it might hit that I have on the root native timeline how do I reference it?

View 3 Replies

ActionScript 3.0 :: Access A Class Object From Main Timeline

Dec 29, 2010

I have a class, and I'm trying access an object outside of that class. For example, in my class I have function: onNodeLoad(node:Object)with that function I can access the properties of node just fine, but outside the class I cannot.In the function that is inside the class, I can trace (node. title)I want to be able to do that trace on the main timeline.[code]So right now, in my main timeline, trace(con.node) comes up null.I've tried to declaring _node public, private, public static.

View 1 Replies

Professional :: Access Timeline Variable From Static Class / Singleton?

Nov 3, 2010

How can I access a timeline variable from a static class / singleton?

View 14 Replies

Access An Instance Reference To Document Class From Stage's Timeline?

Dec 30, 2009

Is there a way to get an instance reference to the document class to call a method of it from the stage's timeline?I see that here's a possible solution: using a singletonOther solution I though of is using stage.getChildAt( 0 ) but it's not very nice.Is there an 'official' instance reference? because the document class is obviously instantiated at startup, but is that instance accessible in any way without having to use a custom solution like the ones mentioned?

View 1 Replies

Actionscript 3 :: Why Can't Class See An Array On The Timeline

Feb 27, 2011

I have a class that controls an enemy. From within that class, it checks for collisions with an array on the main timeline. I've done it this way before and it works fine, so I have no idea what I've done wrong this time. It keeps giving me an

[Code]...

View 2 Replies

Flash :: Pass An Array From Timeline To A Class In As3?

Mar 16, 2011

I have an array in a timeline that I need to pass to a class file, but I can't seem to figure out how to do this, as the method of inter-class array transfers doesn't seem to work.

View 1 Replies

ActionScript 3.0 :: Access The Smoothing Property Of The PNG Images Within WindowHider's Timeline, From The Document Class?

Mar 20, 2010

I have a MovieClip in my library called WindowHider. The timeline for WindowHider contains a frame-by-frame animation that is made up of individual PNG images that I imported. Each of the 10 or so PNG images sits on it's own frame within WindowHider.I can successfully create an instance of WindowHider within my Document class and add it to the display list.

Question: Is it possible to access the smoothing property of the PNG images within WindowHider's timeline, from the Document class? The WindowHider class is animated and rotates, thus the pixels show and the image is jagged. I know if I could access the smoothing property it would solve the issue.

View 2 Replies

ActionScript 3.0 :: Class Created Object To Array In Main Timeline?

Jan 16, 2011

class created object to array in main timeline?

View 1 Replies

ActionScript 3.0 :: Access Array From Deeper Class

Jun 7, 2011

I was wondering if it is possible to access an array from outside the class where it's made.I have a main class, Aardbeleving, which AddsChilds to the stage, with class Eiland.Inside Aardbeleving i use an array to store data for all the childs, called: chip1.Now lets say I want to access chip1[2] from the Eiland class, how do I do that?

View 17 Replies

Actionscript 3 :: Access A Var Array In A Utility Class?

Jan 25, 2011

If my main class I define

var arrItems:Array=[];

and in a utility class (in a different file) I define

[Code]...

View 4 Replies

ActionScript 2.0 :: Cant Access Array From Tower Class

Jul 11, 2011

im doing a tower defence game and i have a problem rotating my towers towards the minions.my idea is, on the Main class e create an array with all the minions, than, on the Tower class i want it to go through the entire array and search for the closer one.the problem is, i cant access the array from the Tower class.How can i solve this, and if it isnt possible, how can i make the tower rotate?

View 2 Replies

ActionScript 3.0 :: Static Variable - Access Buffer Array From The Particlecontainer Class

Dec 19, 2010

I'm currently working on a particle system for a game that I recently started development on, but I've hit a snag: I have a class particlecontainer that tells each particle what to do on enterframe, and which contains each particle as a child. I also have a class (mischandler) which has a static array that contains all current particles, as well as another static array that is a buffer to remove particles from the particlecontainer. Whenever a particle "dies", it calls a function which adds it to the buffer array in mischandler. However, when I try to access this buffer array from the particlecontainer class it does not recognize it as having any elements. If this is unclear here's a simpler explanation:

particlecontainer tells a particle to do it's enterframe function particle calls die() and adds itself to the removebuffer inside mischandler particle container tries to access mischandler.removebuffer but removebuffer has no elements Strangely, the particle can access the removebuffer perfectly fine and sees all the elements in it.

View 1 Replies

ActionScript 3.0 :: Link To A Class File From The Timeline Rather Than Using The Document Class?

Aug 21, 2009

Is there a way to link to a class file from the timeline rather than using the Document Class? (I tried using the document class but it messed up because of the nested movie clips and stuff like that... so I need another way)

View 3 Replies

ActionScript 3.0 :: Access Array In Arraycollection And Add Item To The End Of Array?

Aug 24, 2010

I have this code to try to acess the values of the array in the arraycollection but it does not work it actually creates a value to the end of the arraycollection. can anyone tell me what im doing wrong i basically whant to modifys the individual arrays in the arraycollection and add Login_user.

Code:
for(var i:int = 0; i< dispArray.length; ++i){
dispArray.addItemAt({"login_user":"XXX"},i);
}

View 1 Replies

Professional :: Accessing Timeline From Class Loaded Into Doc Class?

Jun 12, 2011

I can't find a way to directly access a MC (or textfield, etc) on the timeline from a Class loaded into my Document Class. No problem from the Doc Class, but can't do it directly from the loaded Class. Is there a trick to essentiall extend the Doc Class AS from another external class?

View 7 Replies

Flash :: Access Object Property Or Function On Extended Class That Isn't In The Super Class?

Jan 29, 2012

If I have three classes:

public class Example {
public function Example () {
}[code]............

You can see that the two last classes extend the first one, and both have the 'variable' property. In case that I have an instance of Example and I am sure it is also an ExtendedExample OR AnotherExtendedExample instance, is there some way to access the 'variable' property? Something like

function functionThatReceivesAnExtendedExample (ex:Example):void {
if(some condition that I may need) {
ex.func()

View 3 Replies

Actionscript 3 :: Access Variables In Main Application Class From Instantiated Class?

Apr 8, 2010

I have a initApp.as which instantiates a class which needs to access the "currentState" property and the States array as well. However we cannot get this to work as we cannot see how we can access this information.

Within initApp.as currentState is accessed via "this.currentState". This does not work in the class which is instatiated within initApp.as. The following error is thrown:

"Access of undefined property currentState."

View 1 Replies

Actionscript 3 :: Access A Public Property From AvEniroments Class Through The Player Class?

Nov 24, 2011

I have the following inheritance structure:

var environment:AvEnvironment = new AvEnvironment(...);
addChild(environment);
environment.addChild(new Terrain());
environment.addChild(new Player());

I am trying to access a public property from AvEniroments class through the Player class, however I'm getting an undefined property error (#119). I've tried the following:

this.x = AvEnvironment.xs // public property in this class
this.x = parent.xs

I've also tried something like this:

var ev:AvEnvironment = AvEnvironment(parent);
this.x = ev.xs

but I get a TypeError. Error #1009: Cannot access a property or method of a null object reference.

View 1 Replies

Actionscript 3 :: Access A Displayobject On Stage In A Class That Is Not A Document Class?

Mar 7, 2012

How to access a display object on the stage in a class which is not a document class?

I am looking for a solution that doesn't involve passing the stage as a parameter to the class.

One solution i always come across is using "TopLevel.as". Is it a good method because as far as I have heard using global variables is not recommended because it might cause some problems while working on big projects.

View 1 Replies

ActionScript 3.0 :: Access The Stage Property From A Different Class That's Not The Principal Class?

Jul 2, 2009

I was wondering how do you access the stage property from a different class that's not the principal class tied to the fla? Essentially, I have main.as which calls another class menu.as, and I can't seem to be able to use the stage.stageWidth property from menu.as. What's the proper way to be able to use the stage property from any class? Do I have to import it separately each time?

View 2 Replies

ActionScript 3.0 :: Flash Access TextField From Class Imported By Doc Class?

Aug 17, 2010

I'm just now learning the new object oriented way of scripting. It's been a wild ride, but I've finally learned how to keep script off my frames (very hard coming from as2).Here's my problem:

I have a TextField on the stage in my main .fla file named loadPercent.

I'm loading a jpg with preLoad.as and displaying the bytes loaded in loadPercent.

I can access my loadPercent TextField from my MainClass

but I can't access it from preLoad.as

the document class is MainClass.as

Code:
package
{
import flash.display.MovieClip;[code]....

I get three '#1120 access of undefined propery' errors for each time i try to access loadPercent.

a few basic questions: 1. all my files are in a folder in my documents, not in the flash directory, is this bad? I've seen people using com.whatever etc.

2. my main .fla file does not share the same name as my MainClass.as (it's not named MainClass.fla) Is that a problem?

I'm assuming these are inconsequential because my code seems to work up to a certain point.

View 7 Replies

ActionScript 3.0 :: Access Array Inside Of An Array?

Aug 5, 2009

how I can access array data inside of an mc from the main timeline.. I am hoping to get into an array called children, which is inside of an mc, which itself is inside of an array called mcs.

Here is what I am trying to get to: mcs[m].children[0];

View 1 Replies

ActionScript 3.0 :: Possible To Access The Children Of An Array Within Another Array?

Nov 19, 2010

Can I use the indexes of an array that is a child of another array?

View 2 Replies

ActionScript 3.0 :: Access A Movieclip On Document Class From Another Class?

Mar 3, 2011

Going further on my app, I felt in another problem. Despite having lots of posts on the web regarding this, none of the solutions worked for me In my document class (Main.as) ve two containers. One empty and another with a star that is being imported from the library. Here´s the main class:

package
{
import flash.display.*;

[code]......

View 4 Replies

ActionScript 3.0 :: Access Function At Main Class From A Sub Class?

Mar 3, 2011

My first experience is build an aquarium with a lot of fish swimming, and they can be clicked. When one of them is clicked we should receive a trace message saying ("I�m a Fish!"). To do this, I thought that the best way will be:

1- create a document class, named Main.as

2- create a base class, named Clicked.as

2- create a movie clip with a fish.

3- export the movieclip to actionscript. In the mc properties set Class as "fish" and Base Class as "Clicked".

View 6 Replies

ActionScript 3.0 :: Possible To Extend Class W/o Access To Class Code?

Feb 3, 2010

Say you were importing flash.events.KeyboardEvent and you wanted it to extend the MovieClip class, is this possible? Where you dont have access to the class to just type "extends XXX"

View 14 Replies







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