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


Similar Posts:


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 :: Error 1009 \ Created A Media Player?

Mar 14, 2009

I have created a media player that plays either video oradio depending on which choice the user makes. It is a simpleinterface, and I am not using XML, only simple URLRequests.The videos play just fine, but every time I click to play anudio track, I get an error 1009."TypeError: Error #1009: Cannot access a property or methodof a null object reference. at stage_fla::MainTimeline/playSong()"

View 3 Replies

ActionScript 3.0 :: Error #1009 When Trying To Deleted A Dynamically Created Shape

Jul 21, 2010

I have a function that draw shapes:

Quote:

var _box:Shape = new Shape();
_box.graphics.clear();
_box.graphics.beginFill( 0xFF0000, 0.5 );
_box.graphics.lineStyle( 0.5, 0xcccccc );

[code]....

I got this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.The problem is the removeChild. I don't know the correct way to do that.

View 1 Replies

ActionScript 3.0 :: Objects Created In Document Class?

Sep 5, 2009

So I'm trying to create an object in my document class then reference it from a custom class file.I'm creating a photoContainer MC in the createPhotoContainer method and directly after it's creation it gets passed to the GalleryView class by calling it's constructor function.

ActionScript Code:
public class GalleryDocument extends MovieClip
{

[code].....

View 5 Replies

ActionScript 3.0 :: Dynamic Vars Created Within Document Class

Jan 26, 2009

I am a bit puzzled why this does not work when placed in my document class, but works when directly added a key frame in the Flash IDE.
ActionScript Code:
this['myVar1'] = new Object();
When within the document class I get this error when compiled,
ReferenceError: Error #1056: Cannot create property myVar1

I have tried the following but I still get an error.
ActionScript Code:
public static var root_Ref:Object;
root_Ref = root;
root_Ref['myVar1'] = new Object();

View 2 Replies

ActionScript 3.0 :: Flash - Access Child Created By Document Class?

Apr 14, 2011

I am new to AS 3 and I tried to solve this (probably really simple) problem, but I couldn't, so I gotta ask here. All I did was create a child through a function in my document class.It is in fact an altered version of the rotate circles tutorial from kirupa.

Code:
function makeCircle (e:Event):void {
var circle:BlueCircle=new BlueCircle ;

[code]......

View 4 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 :: Class Is Loading The File But When Return It To A New Xml Object In The Document Class It Doesnt Load It?

Aug 18, 2009

I found myself loading a new XML file every day and so decided to create a small class that will load the xml file and return it.The class is loading the file but when i try to return it to a new xml object in the document class it doesnt load it.I think that it's something to with the return being in a nested function but i tried a few ways and non seems to work.
 
[DOCUMENT CLASS]
loadXML:LoadXML = new LoadXML();
myXML:XML = new XML(loadXML.loadXMLFile("gallery.xml"));[code].....

View 1 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 :: Error 1009 When Loading Swf?

Oct 11, 2009

I am trying to load an external swf (which references external files) everything seems to be fine only when i publish it i get error 1009
 
Here is my code
 
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("mainVideo/preview.swf");

[Code].....

and write the same code but i still get the error.
 
I read about referencing external swf with referenced files, seems to be an issue with that, am i right?

View 15 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 :: Loading External Swf: 1009 Error?

Feb 23, 2009

Having a problem here. I can load external swf files, but once I started on one the pages I end up with the 1009 errorThey work fine on their ownand the placebo page still loads inside the mainREALLY need to get this working. What should I be doing?index.swf

Code:
var xmlPath:String = "index.xml";
var settingsXML:XML;

[code].....

View 1 Replies

ActionScript 3.0 :: Loading External Swf: 1009 Error

Feb 23, 2009

I can load external swf files, but once I started on one the pages I end up with the 1009 error.

They work fine on their own

and the placebo page still loads inside the main

REALLY need to get this working. What should I be doing?

index.swf

Code:
var xmlPath:String = "index.xml";
var settingsXML:XML;
var tweensArray:Array = new Array();

[Code].....

View 4 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.0 :: Error #1009  Whille Loading External Swf?

Feb 23, 2009

I tried to load external swf in my mainpage.fla file. when Itest movie in flash, it throws error.Error #1009: Cannot access a property or method of a nullobject reference.

View 1 Replies

ActionScript 3.0 :: Loading Video - Error 1009 In Firefox But Not IE

Jan 7, 2010

I am trying to load a video and I get the 1009 error in Firefox, but not in Internet Explorer.
var myVideo:NetConnection = new NetConnection();
myVideo.connect(null);
var newStream:NetStream = new NetStream(myVideo);
var videoHolder:Video = new Video(720, 480);stage.addChild(videoHolder);
videoHolder.attachNetStream(newStream);
[Code] .....

View 6 Replies

ActionScript 3.0 :: Loading External SWFs Error #1009 ?

Oct 8, 2009

I have an index called allproducts and I want users to be able to click on an element and load a new SWF (with several external .as files) that has specifics about that element.When I run JUST the element (SS_glutenfree.swf), it works great. When I run allproducts.swf and click on the gluten free button, I get: TypeError: Error #1009: Cannot access a property or method of a null object reference.

at Handle()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()[code]....

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

allproducts.swf is in the folder above SS_glutenfree.swf and all of its .as files (which are Gallery, Handle, and Img).

View 8 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

ActionScript 3.0 :: Loading Menu As External File But Getting Error 1009

May 10, 2010

I am trying to load a menu as an external file .... and getting this :
TypeError: Error #1009: Cannot access a property or method of a null object reference. at com::menu()

Here is my code:
if(!menuLoader){
var menuRequest:URLRequest = new URLRequest("menu.swf");
var menuLoader:Loader = new Loader();
menuLoader.load(menuRequest); container.addChild(menuLoader);
menuLoader.x = 700; menuLoader.y = 50;
}

View 9 Replies

Actionscript 3.0 :: TypeError: Error #1009 (Something Wrong As Loading .swf File?

Apr 3, 2009

I´m having one problem with my .swf file which I´m trying to add to stage. It needs also a .xml file to work because it includes all the images and so on. I downloaded it from here for free : http:[url].....I tried to use this kind of a code

Code: Select allvar requestObj:URLRequest = new URLRequest("featureSlider.swf");
var loaderObj:Loader = new Loader();
addChild(loaderObj);
loaderObj.load(requestObj);

but with no result. Some error appears to the output window:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at featureSlider_fla::mc_featureSelector_4/featureSlider_fla::frame1()

Here´s the code of the .fla file
Code: Select allimport fl.transitions.*;
import fl.transitions.easing.*;[code]........

You are able to download the. zip packet as well over here http:[url]......add to the code to get it work? some if statement or what?

View 2 Replies

ActionScript 3.0 :: Loading External Text With Button - Error #1009

Jul 28, 2009

I have a button (LOW_btn), located in one movieclip, and is set to play the next frame of another movie clip "bodybox_mc" and at the same time load an external .txt file into a dynamic text box "musictext_txt", which is deeper within the "bodybox_mc". (There is an update to "musictext_txt"'s scrollbar as well). However at runtime i receive the error 1009 (output is after the code). Here is the code (sorry if the variables and stuff are a bit long):

[Code]....

View 1 Replies

ActionScript 3.0 :: TypeError: Error #1009: (FULL SCREEN LOADING SWF'S)

Apr 27, 2010

I am kinda new to flash but pretty well off in the beginner stage. I am currently creating a flash website for a client and need help with full screen issues im having.
My main swf has the following code:

[Code]...

When i publish i get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at nexter_fla::MainTimeline/initialDisplay() But you need to realize that this error comes after I have clicked twice. By this i mean the "nexter" loads at the start up of the SWF. Then if I click "one_btn" or "two_btn" my swf still works. BUT! the moment click the opposite btn i get the above error. Wats going on?????

View 1 Replies

ActionScript 3.0 :: Document Class Error #2136

Dec 22, 2010

in Flash CS3 I've this DocumentClass:
 
package {    import flash.display.MovieClip;    public class DocumentClass extends MovieClip {
public function DocumentClass() {            trace("document class created");        }    }}
 
This actually works, but I want to have the possibility to re-instance the DocumentClass (because I want to restart a game and the Main class is the DocumentClass).In the first frame I have:
 
import flash.events.MouseEvent;
btn.addEventListener(MouseEvent.MOUSE_DOWN, restart);function restart(evt:MouseEvent){    var d = new DocumentClass();}
But this code (I simplified my situation, but the result is the same) throws an error:
Error: Error #2136: The SWF file  file:///E|/Documents%20and%20Settings/Pepper/My%20Documents/FlashDeve lopment/PepperGame.swf  contains invalid data at DocumentClass/restart()/frame1()
 
What can I do to restart my game by calling the DocumentClass point of entry? Is this possibile?

View 4 Replies

Flash :: Error #1034 With Document Class

Oct 11, 2011

I got a little class and all works fine. Then I add it in Document Class and puff, Error 1034 happens.

Error #1034: Type Coercion failed: cannot convert
flash.display::MovieClip@2be9dba1 to fl.text.TCMText.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()

[Code]...

View 1 Replies

ActionScript 3.0 :: Loading SWF Created In OOP (Getting Error Message)

Oct 14, 2010

I created a slideshow using OOP and it works fine when I test it both in 'Test Movie" and 'Publish Preview', yet when I try to load the SWF into my site I keep getting error messages.[code]...

View 2 Replies

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 :: 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

ActionScript 3.0 :: Loading Swf Document Class?

Jan 24, 2010

I have a movie which is placed on the stage in the authoring environment, this movie is called LiftMovie. When the user clicks on a button in LiftMovie, it loads another movie into a placeholder called MallPlaceHolder and the LiftMovie has its visibility set to false.From the document class of the movie loaded into MallPlaceHolder, if the user clicks on the image of the Lift in the mall, I want it to make the LiftMovie visible again.

View 1 Replies







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