Hi for all, i wrote the class bellow and when i load class and use this class into my FLA file i receive the message:
[INDENT]Access of undefined property loadProgress
Access of undefined property loadComplete[/INDENT]
I import and use classe like show bellow:
import com.dLibs.openFile;
openFile.addFile(contentLoaded,"Pessoal/wp_lucas001.jpg",2,"easeOutBack");
and here my class:
package com.dLibs {
import flash.display.*;
import flash.net.*;
import flash.events.Event;
import flash.events.ProgressEvent;
import caurina.transitions.Tweener;
public class openFile {
private var _contLoadClip:MovieClip;
private var loader:Loader;
private var request:URLRequest;
public var contClip:MovieClip;
public var transTime:Number;
public var transMode:String;
public function openFile() {
trace("public funcion 'n static");
};
public static function addFile(contClip:MovieClip, file:String, transTime:uint = 1, transMode:String = "easeOutElastic"):void
{
var request:URLRequest = new URLRequest(file);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(request);
};
private function loadComplete(event:Event):void
{
contClip.addChild(loader);
contClip.alpha = 0;
Tweener.addTween(contClip, { alpha : 1, time : transTime, transition : transMode });
};
private function loadProgress(event:ProgressEvent):void
{
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
// trace("Loading: "+percentLoaded+"%");
};
};
};
if anyone know about this error, please help-me.
I’m waiting and Tks for all in advance.