Hello
first : I'm sorry for my too bad english : --> i'm french! (noboddy is perfect)
second : megazine is a very nice work ! thanks for this big work.
I don't think that my problem is bug, but I don't know where can I wrote my post.
Now I explain my problem:
On the stage I have a Sprite (var anim:Sprite ...) after i want load megazine in this Sprite.
the function foncProgress "trace" well the loading;
the function foncComplete "trace" well the event
But I don't see the meggazine
I have ask the width (pevt.CurentTarget.content.width) and the function "trace width = 0), perhaps the problem is here ?
I put here the code i have wrote in the frame
var livre :Loader = new Loader();
livre.addEventListener(Event.REMOVED_FROM_STAGE, livreDesactivation);
livre.contentLoaderInfo.addEventListener(Event.COMPLETE, livreComplete);
livre.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, livreProgress);
livre.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, livreErreur);
function livreDesactivation(pEvt:Event):void
{
livre.contentLoaderInfo.removeEventListener(Event.COMPLETE, livreComplete);
livre.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, livreProgress);
livre.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, livreErreur);
livre= null;
}
function livreErreur(pEvt)
{
var texteErreur:String = pEvt.text;
Alert.show(texteErreur, {buttons:["OK"]});
}
function livreProgress(pEvt:ProgressEvent):void
{
var pourcent:int = pEvt.bytesLoaded / pEvt.bytesTotal * 100;
patience.visible = true;
patience.play();
patience.chargement_txt.text = "chargement des données "+ pourcent+"%";
trace("chargement des données "+ pourcent+"%")
}
function livreComplete(pEvt:Event):void
{
patience.visible = false;
patience.stop();
patience.chargement_txt.text = "";
var contenu:* = pEvt.currentTarget.content
trace( contenu.width)
trace( contenu is MovieClip)
contenu.width = 601
contenu.height = 602
anim.addChild(contenu);
}
livre.load(new URLRequest("cartes/carteRestaurant.swf"));