03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Exemple<br />

L'exemple suivant charge une image dans un clip appelé image_mc. Lorsque vous cliquez sur<br />

le clip, ce <strong>de</strong>rnier est supprimé et <strong>de</strong>s informations s'affichent dans le panneau <strong>de</strong> sortie.<br />

this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());<br />

var mclListener:Object = new Object();<br />

mclListener.onLoadInit = function(target_mc:MovieClip) {<br />

target_mc._x = 100;<br />

target_mc._y = 100;<br />

target_mc.onRelease = function() {<br />

trace("Unloading clip...");<br />

trace("\t name: "+target_mc._name);<br />

trace("\t url: "+target_mc._url);<br />

image_mcl.unloadClip(target_mc);<br />

};<br />

};<br />

var image_mcl:MovieClipLoa<strong>de</strong>r = new MovieClipLoa<strong>de</strong>r();<br />

image_mcl.addListener(mclListener);<br />

image_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg",<br />

image_mc);<br />

Si votre fichier SWF comprend un composant <strong>de</strong> la version 2, utilisez les composants <strong>de</strong> la<br />

version 2 <strong>de</strong> la classe DepthManager au lieu <strong>de</strong> la métho<strong>de</strong><br />

MovieClip.getNextHighestDepth(), utilisée dans cet exemple.<br />

Voir également<br />

loadClip (métho<strong>de</strong> MovieClipLoa<strong>de</strong>r.loadClip), onLoadError (écouteur<br />

d'événement MovieClipLoa<strong>de</strong>r.onLoadError)<br />

NetConnection<br />

Object<br />

|<br />

+-NetConnection<br />

public dynamic class NetConnection<br />

extends Object<br />

La classe NetConnection permet <strong>de</strong> lire <strong>de</strong>s fichiers FLV en flux continu à partir d'un lecteur<br />

local ou d'une adresse HTTP.<br />

Remarque : Cette classe est également prise en charge dans Flash Player 6 lorsqu'elle est utilisée<br />

<strong>de</strong> concert avec Flash Communication Server. Pour plus d'informations, consultez la<br />

documentation relative à Flash Communication Server.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 7<br />

NetConnection 999

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!