ActionScript 3.0 :: Imported Tweenlite Class On Main Stage - Error 1009

May 31, 2010

I am getting a 1009 error using tweenlite. I have placed the COM folder of tweenlite in the same directory as the FLA. On the main stage I have imported the tweenlite class using:
Code:
import com.greensock.*;
import com.greensock.easing.*;

On the main stage I have a MC called mainholdermc. When I click a button called mentions but on the main stage it basically tells mainholdermc to play. This works well. I have another movieclip called vosdes. At the same time that mainholdermc plays I want to use tweenlite to make the aplha of vosdes lower. If I put this actionscript on the main page it works fine:
Code:
mentionsbut.addEventListener(MouseEvent.CLICK, mainholder);
function mainholder(event:MouseEvent):void {
mainholdermc.gotoAndPlay(2);
TweenLite.to(vosdes, 0.4, {alpha:0.1});
}

The problem is that I want to move the tweenlite command to within the the vosdes movieclip. So within the vosdes movieclip I have this written in the actionscript:
Code:
import com.greensock.*;
import com.greensock.easing.*
TweenLite.to(this.vosdes, 0.4, {alpha:0.1});

I found that by using
Code:
this.MC_NAME
it is the equivalent of the _root in AS2.

However this is not working. When I compile the FLA no errors occur until I click on the mentionsbut and I get the following error:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.greensock::TweenLite/init()
at com.greensock::TweenLite/renderTime()
at com.greensock.core::SimpleTimeline/renderTime()
at com.greensock::TweenLite$/updateAll()
[Code] .....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: TypeError: Error #1009 When Adding Custom Class To Stage

May 18, 2009

I have extended a RadioButton into a custom class in order to store some extra info. I want to dynamically add these RadioButtons to the stage to create a dynamic menu box. So I started simple in order to make sure I knew how to do this.Here's the error (I love Flash IDE error reporting):

Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::RadioButton/drawLayout()
at fl.controls::LabelButton/draw()

[code]....

View 3 Replies

ActionScript 3.0 :: Assistance Unloading Flv's From Swf's Imported To Main Stage?

May 11, 2009

I have my main.fla which imports external swfs that contain flv's. I have three buttons that navigate the main timeline to frames 2-4. At frames 2-4 an external swf gets loaded into an empty movie clip via this code. Each loaded swf acts like a menu with some nice vidoes loading in the background.The problem i found is the flvs continue to play as i navigate between menus, which makes the main swf/fla slow down becuase the pc is working harder to deliver all the stuff running in the background. I've added this code to frame 1 of my empty movie clip that is in my library that has the instance name 'menu1'I keep getting the error "Access of undefines property mc1"I have the source files for my site here if you can take a look and see what I'm doing wrong. I have removed this code so i don't get the error and have tried other things to no avial.

///////////////////////
var loader:Loader = new Loader(); addChild(loader); loader.load(new URLRequest(MovieClip(this.parent).src));

[code].....

View 2 Replies

ActionScript 3.0 :: Assistance Unloading Flv's From Swf's Imported To Main Stage

Sep 15, 2011

I have my main.fla which imports external swfs that contain flv's. I have three buttons that navigate the main timeline to frames 2-4. At frames 2-4 an external swf gets loaded into an empty movie clip via this code. Each loaded swf acts like a menu with some nice vidoes loading in the background.
 
The problem i found is the flvs continue to play as i navigate between menus, which makes the main swf/fla slow down becuase the pc is working harder to deliver all the stuff running in the background. I've added this code to frame 1 of my empty movie clip that is in my library that has the instance name 'menu1'
 
I keep getting the error "Access of undefines property mc1"
 
I have the source files for my site here if you can take a look and see what I'm doing wrong. I have removed this code so i don't get the error and have tried other things to no avial. [URL]
  
///////////////////////
var loader:Loader = new Loader(); addChild(loader); loader.load(new URLRequest(MovieClip(this.parent).src));
////////////////////

[Code].....

View 3 Replies

Flash :: Get Stage.stageHeight Or Stage.stageWidth From Imported Class?

Jul 1, 2010

can you tell me a simple and clean way to pass the dimension of the stage to another class, imported in my documentclass?

View 2 Replies

ActionScript 3.0 :: Main Timeline : Error #1009 Comes Up?

May 11, 2011

TypeError: Error #1009: Cannot access a property or method of a null object reference. at neonSign_fla::MainTimeline/flickerIt()

The Code on Frame 1:

import flash.filters.*;
var audio:Sound = new Sound();
var req:URLRequest = new URLRequest("Buzz.mp3");[code]......

So Why am I receiving the error when the actionscript is on the main timeline.

View 1 Replies

ActionScript 3.0 :: GotoAnd Play Main Frame - Flash Error 1009

Oct 6, 2011

Error #1009 cannot access a property or method of a null object reference.
But the code I use doesnt have anything that is null..
Mol.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndStop("Main");
}
This is the code I have reapeted 5 times on multiply frames. (I do have changed the names ect.)
the "Main" is a label on a frame. When I click on 1 button, it works fine. When I click on the button that leads me back to "Main" it works, BUT then it gives the error and I cant do a thing anymore..

View 1 Replies

ActionScript 3.0 :: Error # 1009 With Stage

Dec 9, 2010

I'm getting this error TypeError: Error #1009: Cannot access a property or method of a null object reference.

and I tried Debuging it and it pointed to this line

ActionScript Code:trace(parent.stage);

so then I removed the "parent" part and in the Output window I got null, can someone explain this to me

View 3 Replies

IDE :: Error #1009 When Add A Button To The Stage?

Jun 5, 2009

Each "date" aka button when clicked advances to its respective named frame. It works fine until I have a section of the timeline with more than one "entry". I use the same naming process as i did for the main sections using a "next >" button and coding it the same way I coded the main buttons but it doesn't work. I get:Type Error: Error #1009. Cannot access a property or method fo a null object reference atTimeline_Sce3_fla::MainTimeline/frame1()I've dragged an instance of the bttn_next onto the stage, given it an instance name, inserted a keyframe into the layer and named the layer to advance to. I know there's something wrong with this button - could this be a flow or inheritance problem? i've commented out the line that throws the error (starts with //btn1974b...). the code reads:

stop();
b1971.addEventListener(MouseEvent.CLICK,clickSecti on);
b1973.addEventListener(MouseEvent.CLICK,clickSecti on);

[code]....

View 3 Replies

ActionScript 3.0 :: Error #1009 - TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Mar 26, 2009

TypeError: Error #1009: Cannot access a property or method of a null object reference. at MethodInfo-11() where is methodInfo-11?

[Code]....

View 4 Replies

ActionScript 3.0 :: Flash Error #1009: Get On The....Stage?

Aug 9, 2010

keep getting the same error("TypeError: Error #1009: Cannot access a property or method of a null object reference.at FullFla$iinit()")-I gather that I am attempting to call an object that is not presently on the stage, BUT I am unclear exactly what steps to take to correct it?...Add a wrapper DisplayObject or do I change an the Event that I am listening for?

package {
import flash.display.StageAlign;
import flash.display.StageScaleMode;

[code]....

View 1 Replies

ActionScript 3.0 :: Error 1009 - How To Initialize The Stage

Nov 30, 2010

I'm running through my code and when the program runs, it gets to the line of code that says "stage.addChild(mainGrid)", it simply gives me the same old 1009 error. Been scratching my head for days now.

View 5 Replies

Error #1009 Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Aug 9, 2010

Error #1009: Cannot access a property or method of a null object reference.

This is the error I cannot seem to understand. On the stage I have a movie clip, mcTree. It's keyframe is in frame 3143. There is no tween or anything. In frame 3144, I have the following actionscript:

mcTree.gotoAndStop(2);

I publish the movie and I get to frame 3144 then BAM TypeError: Error #1009: Cannot access a property or method of a null object reference.

at 2file_fla::MainTimeline/frame3144()

As you can tell, I'm more than 3000 frames into my animation here and have made it this far using this method, and it has worked.

View 4 Replies

ActionScript 3.0 :: Preloader - Stage - #1009 Error: Cannot Access

May 5, 2010

I've been trying to load external swf ("index.swf") with the following code in AS3:

[Code]...

Of course I receive the #1009 error : Cannot access a property or method of a null object reference. I guess it is some "stage issue" but I'm not familiar enought with AS3 to avoid the problem by my own.

View 5 Replies

ActionScript 3.0 :: Access Stage In Preloaded Swf -> Error 1009

Oct 21, 2008

I'm trying to preload an external swf, but when I try to access the stage in the external swf, I get a 1009 error. When I remove the stage.scaleMode, stage.align and stage.stageWidth, it works fine. The content.swf also works fine when i run it seperately from the preloader.

View 3 Replies

Professional :: Error#1009 When Want To Remove Some Movieclips From The Stage?

Apr 28, 2010

I met a problem Error#1009 when I want to remove some movieclips from the stage
 
for(var g:Number = 0; g<10; g++){  var ClassRef_RG:Class = Class(getDefinitionByName(classNames_G[Math.floor(Math.random()*class Names_G.length)]));var classInstance_RG:* = new

[code].....

View 9 Replies

ActionScript 3.0 :: Error #1009 (class And Package)

Jul 28, 2011

This is my code

ActionScript Code:
package test{
class Main{
public function Main(){
}
}
}

View 6 Replies

ActionScript 3.0 :: Error #1009 - Stage Properties Access Denied?

May 27, 2011

Class called 'bg' dynamically creates a background that varies depending on the stage width & height.

Code:
package
{

[code]....

View 9 Replies

ActionScript 3.0 :: Preloader Error 1009 With Movie Class

Dec 9, 2009

I am attempting to use a simple preloader that I've used many times in the past but am now receiving an error. The difference this time is that I've created a Class as opposed to just placing all of my code in the the time line.

[Code]....

When I publish the file, I get the error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at game() Everything runs perfectly fine when i publish the file not using any preloader.

View 1 Replies

Actionscript 3.0 :: Preloader Error #1009 With Movie Class?

Dec 9, 2009

I am attempting to use a simple preloader that I've used many times in the past but am now receiving an error. The difference this time is that I've created a Class as opposed to just placing all of my code in the the time line. I've placed the following code in the timeline of my preloader movie and am attempting to load the SWF of my main movie, which uses an external class for all of its code.

ActionScript Code:
Code: Select allfunction loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;

[code]....

When I publish the file, I get the error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at game()

Everything runs perfectly fine when i publish the file not using any preloader.

View 1 Replies

Actionscript 3 :: Calling A Method, Which Is Defined In Another Class, From Main Class Gives Error 1120?

Aug 16, 2010

I have two classes. The Main class calls a function, which is defined in a Second class.I'm getting the following error:Error 1120: Access of undefined property myFunctionBasically, I am creating buttons in the Main class that will add a corresponding Child to an Object in the Second class (if you click one button, child x1 will be added, if you click another button, child x2 will be added, and so forth).Here's the relevant code for the Main.as file:

package
{
import flash.display.MovieClip;

[code].....

View 3 Replies

Flex :: Error #1014: Class [some Class In MAIN] Could Not Be Found?

Nov 19, 2009

I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk.The project does NOT use the mx framework.What i want to have is:

A big 'MAIN' project several small 'MODULE' projects. each 'MODULE' class refrences the 'MAIN' project as an External reference (doesnt compile into swf) - this is done by setting link type = external in the 'MODULE' project properties -> library path.'MAIN' loads a 'MODULE' project on runtime using the 'loader' class.

the problem:I recieve an error from the MODULE project: VerifyError: Error #1014: Class [some class in MAIN] could not be found.

View 2 Replies

ActionScript 3.0 :: Loading A Swf Created Using Document Class Gives Error #1009

Aug 29, 2007

Well the shiny new app is now 830K and needs to be preloaded. Simple eh? I've got a preloader that works nicely but I've been trying all day to find a reasonable way to load a swf that was compiled as a document class. My solution was to make a bare bones swf that would preload my main app swf:

[Code]....

View 6 Replies

ActionScript 3.0 :: Error 1009, Instantiating A Class That Extends A Sprite?

Apr 25, 2009

've tried calling constructor class from my main.fla, and it just doesn't work. The error when I try to instantiate the constructor is that it needs an argument... and since the class extends a Sprite.

PHP Code:
public functionportGal():void {
this._images = new Array();

[code].....

View 3 Replies

Flash Player 10 Vs FP 9 - Pile Of 1009 Errors And Many Of Tweenlite Instances Won't Work

Apr 7, 2010

My movie publishes fine in FP9. When I try to publish in FP10 (so I can use unloadAndStop() ) I get a pile of 1009 errors and many of my Tweenlite instances won't work. Is there something obvious I'm missing here? Are there big differences between FP10 and 9?

View 1 Replies

ActionScript 3.0 :: Error #1009 - When Hit A Certain Point Of The Stage It Opens A New Scene Where A Certain Animation Should Happen

Aug 19, 2011

I'm having a huge problem with my Flash file; here is what I'm trying to do and whats happening:
 
I have a scene where with a movie clip that is controlled by the keyboard, when it hit a certain point of the stage it opens a new scene where a certain animation should happen.

The problem is every time the animation hits that certain point the code I was using continues running and flash shows me an error message.
 
Error message:

How can I make this code work only on the scene its placed so I won't get this ERROR?

Here is the code I'm using:

View 1 Replies

Actionscript 3 :: Replacing All Of The Class Files With The Tutorial Specimen Ones - TypeError: Error #1009

May 21, 2010

I have tried replacing all of the class files with the tutorial specimen ones but i still get the error.

[Code]...

Now, not really understanding the error properly I paste dumped the files online for you to look at.

[Code]...

As the error still occured when using the specimen class files I really have no idea where to begin.

View 2 Replies

ActionScript 3.0 :: Change Slide-show Into Working Document Class Without Error 1009?

Feb 11, 2010

I'm trying to make a slide-show that adjusts to the width or height of the stage, and eventually, of the web browser window. I was able to load and resize a picture by writing code on the timeline, but I got the Error #1009 (Cannot access a property or method of a null object reference) when I put this slide show into another movie clip loader (which chooses between different swf pages of the website, with the purpose of keeping the swf file sizes down). By the way, my "slide-show" loads the picture fine. When I use the movie clip loader to load this "slide-show" it works too. Only when I use the Flash Player to open it, it gives me the Error 1009. I looked around on actionscript.org, and everyone seems to be recommending the folowing code (or something like it):[code]

I also ran into some information about document classes and I figure maybe I should be using document classes to make this stuff more modular and reusable. So I put my slide-show code into an .as file, importing all the flash.xxx.* classes, and put it in a package and class and constructor function... in the same directory as my swf file, and set it as the document class to a blank fla file. Then I tested it and all I got was a blank swf. This is without the Event.ADDED_TO_STAGE code. I guess I don't know how to get the document class thingy working either. So my question is, can someone tell me how I can change my slide-show code into a working document class without the Error 1009?r?[code]

View 1 Replies

ActionScript 3.0 :: Referencing Stage - Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Feb 4, 2012

I think my issue is to do with referencing the stage, but not to sure. When I try

[CODE]...

View 3 Replies

ActionScript 3.0 :: OnClick On The Stage - Error #1009: Cannot Access A Property Or Method Of A Null Object Reference

Sep 9, 2009

i got this error Cannot access a property or method of a null object reference. whenever I clicked on my button

[Code]...

View 4 Replies







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