FORUMS: list search recent posts

Help with #1009 and preloader

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mario Bar
Help with #1009 and preloader
on Jan 22, 2010 at 12:42:22 am

Hello, I'm a flash begginer and I have a problem with a simple site in AS3. The site does work till i place a preloader on it.

The code for the preloader is below but I guess it doesn't cause the problem because it works on other sites:

import flash.display.MovieClip;

function update(e:ProgressEvent):void
var percent:Number = Math.floor( (e.bytesLoaded*100)/e.bytesTotal );
if(preloaderMC is MovieClip){
if(percent == 100){
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);

// Extra test for IE
var percent:Number = Math.floor( (this.loaderInfo.bytesLoaded*100)/this.loaderInfo.bytesTotal );
if(percent == 100){

The AS on the second frame:
trace ("Działa")

//import potrzebnych klas
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

//menu i funkcja definiująca działanie przycisków
home_btn.addEventListener (MouseEvent.CLICK, klik);
first_btn.addEventListener (MouseEvent.CLICK, klik);
oferta_btn.addEventListener (MouseEvent.CLICK, klik);
kontakt_btn.addEventListener (MouseEvent.CLICK, klik);
galeria_btn.addEventListener (MouseEvent.CLICK, klik);
function klik(evtObj:MouseEvent) {
trace ("Funkcja "" działa")

and the error:

TypeError: Error #1009: ble, ble, ble
at strona_fla::MainTimeline/frame2()
at flash.display::MovieClip/nextFrame()
at strona_fla::MainTimeline/update()

I guess the problem is with the first_bth because when I move it to the first frame the movie works - but it does not do what it should - subpages does animate in as they should but they stay in place whithout moving out. Does anyone know how to solve this?

Return to posts index

Pieter Helsen
Re: Help with #1009 and preloader
on Jan 22, 2010 at 1:25:25 am

error #1009 is a very common error. It means that you're addressing something (a movieclip, a button, ...) that isn't there yet.

Also, from the rest of the error message, we can deduct that the error occurs at frame 2. So try commenting out the buttons one by one, and see if maybe one of them isn't available (this could be because of faulty instance naming for example)

Kind regards,

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved