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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Paramètres<br />

x:Number - Entier indiquant la position horizontale par rapport au point d'alignement <strong>du</strong> clip<br />

parent.<br />

y:Number - Entier indiquant la position verticale par rapport au point d'alignement <strong>du</strong> clip<br />

parent.<br />

Exemple<br />

L'exemple suivant <strong>de</strong>ssine un triangle avec une ligne en magenta <strong>de</strong> 5 pixels et un remplissage<br />

bleu partiellement transparent.<br />

this.createEmptyMovieClip("triangle_mc", 1);<br />

triangle_mc.beginFill(0x0000FF, 30);<br />

triangle_mc.lineStyle(5, 0xFF00FF, 100);<br />

triangle_mc.moveTo(200, 200);<br />

triangle_mc.lineTo(300, 300);<br />

triangle_mc.lineTo(100, 300);<br />

triangle_mc.lineTo(200, 200);<br />

triangle_mc.endFill();<br />

Voir également<br />

beginFill (métho<strong>de</strong> MovieClip.beginFill), createEmptyMovieClip (métho<strong>de</strong><br />

MovieClip.createEmptyMovieClip), endFill (métho<strong>de</strong> MovieClip.endFill),<br />

lineStyle (métho<strong>de</strong> MovieClip.lineStyle), moveTo (métho<strong>de</strong> MovieClip.moveTo)<br />

loadMovie (métho<strong>de</strong> MovieClip.loadMovie)<br />

public loadMovie(url:String, [method:String]) : Void<br />

Charge un fichier SWF, JPEG, GIF ou PNG dans un clip Flash Player lors <strong>de</strong> la lecture <strong>du</strong><br />

fichier SWF d'origine. La prise en charge <strong>de</strong>s fichiers GIF non animés, <strong>de</strong>s fichiers PNG et<br />

<strong>de</strong>s fichiers JPEG a été ajoutée à Flash Player 8. Si vous chargez un fichier GIF animé, seule la<br />

première image s'affiche.<br />

Conseil : Pour suivre la progression <strong>du</strong> téléchargement, appliquez la métho<strong>de</strong><br />

MovieClipLoa<strong>de</strong>r.loadClip() <strong>de</strong> préférence à la métho<strong>de</strong> loadMovie().<br />

Si la métho<strong>de</strong> loadMovie() n'est pas utilisée, Flash Player affiche un fichier SWF unique,<br />

puis le ferme. L'utilisation <strong>de</strong> la métho<strong>de</strong> loadMovie() permet d'afficher plusieurs fichiers<br />

SWF simultanément, puis <strong>de</strong> basculer entre les fichiers SWF sans charger d'autre document<br />

HTML.<br />

Un fichier SWF ou une image chargé(e) dans un clip hérite <strong>de</strong>s propriétés position, rotation et<br />

scale (échelle) <strong>du</strong> clip. Vous pouvez utiliser le chemin cible <strong>du</strong> clip pour cibler le fichier SWF<br />

chargé.<br />

MovieClip 923

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

Saved successfully!

Ooh no, something went wrong!