Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Unload error

This is a discussion on Unload error within the advanced Actionscript 3.0 forums, part of the Flash CS3 eng category; I have a scene ("mother") with several buttons. Every button load an external swf ("son01,son02.."). ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > advanced Actionscript 3.0

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 23-08-08, 14:53
Junior Member
 
Join Date: Aug 2008
Posts: 1
Rep Power: 0
rhx2060 is on a distinguished road
Unload error

I have a scene ("mother") with several buttons. Every button load an external swf ("son01,son02..").
The scene "son.." has buttons that control a collada object(papervision3d) with a function(ERonEnter).
I have a problem: When I press a second button to unload the scene son.. there is an error
Could you help me?, thanks and sorry for my english.

Code:
TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
    at LC15_TEST_fla::MainTimeline/EROnEnter()
and the code:

Code:
stop();

import flash.display.Loader
import flash.events.*
import flash.net.URLRequest

var urlRequestLC15:URLRequest=new URLRequest("LC15_TEST.swf")
var loaderLC15:Loader=new Loader()
loaderLC15.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete)

loaderLC15.x=-5
function onComplete (e:Event):void
{
    addChild(loaderLC15)
}
LC15_mc.buttonMode=true
LC42S_mc.buttonMode=true
LC7_mc.buttonMode=true
LC15_mc.addEventListener(MouseEvent.CLICK,LC15)

function LC15(e:MouseEvent):void
{
loaderLC15.load(urlRequestLC15)
}
close_btn.addEventListener(MouseEvent.CLICK,onClosed)

function onClosed (e:MouseEvent):void{
    loaderLC15.unload()
    removeChild(loaderLC15)
}
and the code function for the scene son

Code:
function EROnEnter(e:Event):void {
    this.mScene.renderCamera( mCamera )
    this.stage.quality = "HIGH";
    this.stage.scaleMode = "noScale";
    this.stage.addEventListener(MouseEvent.MOUSE_DOWN, ERMouseDownHandler);
    this.stage.addEventListener(MouseEvent.MOUSE_UP, ERMouseUpHandler);
    this.stage.addEventListener(MouseEvent.MOUSE_WHEEL, ERMouseWheelHandler);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Actionscript 3 Failure to unload bbellx advanced Actionscript 3.0 1 18-11-08 02:48
Actionscript 3 load unload swf skill83 Actionscript 3.0 base 0 06-11-08 10:11
Actionscript 3 since there is no unLoad laikarecords Actionscript 3.0 newbies 1 09-07-08 19:18
unload images karonte Actionscript 3.0 base 2 14-05-08 20:01
Unload swf jimbo Actionscript 3.0 newbies 6 15-10-07 16:00


All times are GMT. The time now is 22:02.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406