<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cours Internet &#187; Sources &amp; Scripts</title>
	<atom:link href="http://cours-internet.com/category/flash/sources-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://cours-internet.com</link>
	<description>Supports de cours pour la création de sites Internet avec flash, Dreamweaver et wordpress</description>
	<lastBuildDate>Tue, 04 May 2010 11:58:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bases AS3</title>
		<link>http://cours-internet.com/bases-as3/</link>
		<comments>http://cours-internet.com/bases-as3/#comments</comments>
		<pubDate>Tue, 04 May 2010 11:56:15 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Scripts (AS3)]]></category>

		<guid isPermaLink="false">http://cours-internet.com/?p=1057</guid>
		<description><![CDATA[EXERCICES

LES PROPRIETES

EXERCICE 1
&#62;&#62; Que veut dire alpha?
&#62;&#62; Que veut dire scaleY?
&#62;&#62; Quelle valeur peut prendre alpha?
EXERCICE 2
&#62;&#62; J&#8217;ai sur ma sc&#232;ne principale :
un clip avec pour nom d&#8217;occurrence &#8220;monRectangle&#8221;
remplacez les pointill&#233;s pour avoir &#8220;monRectangle&#8221; positionn&#233; sur un abscisse (x) de
50 et une ordonn&#233;e (y) de 150
monRectangle&#8230;..=50
monRectangle&#8230;..=150

ADDCHILD

EXERCICE 1
&#62;&#62; Que veut dire addChild()?
EXERCICE 2
&#62;&#62; J&#8217;ai dans ma [...]]]></description>
			<content:encoded><![CDATA[<h2>EXERCICES</h2>
<h3>
LES PROPRIETES</h3>
<p>
EXERCICE 1<br />
&gt;&gt; Que veut dire alpha?<br />
&gt;&gt; Que veut dire scaleY?<br />
&gt;&gt; Quelle valeur peut prendre alpha?</p>
<p>EXERCICE 2<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
un clip avec pour nom d&rsquo;occurrence &ldquo;monRectangle&rdquo;<br />
remplacez les pointill&eacute;s pour avoir &ldquo;monRectangle&rdquo; positionn&eacute; sur un abscisse (x) de<br />
50 et une ordonn&eacute;e (y) de 150<br />
monRectangle&#8230;..=50<br />
monRectangle&#8230;..=150</p>
<h3>
ADDCHILD</h3>
<p>
EXERCICE 1<br />
&gt;&gt; Que veut dire addChild()?</p>
<p>EXERCICE 2<br />
&gt;&gt; J&rsquo;ai dans ma biblioth&egrave;que un clip nomm&eacute; myClip et en script : addChild(new my-<br />
Clip())<br />
Que dois je faire pour le faire apparaitre de fa&ccedil;on dynamique sur la sc&egrave;ne?</p>
<h3>
LES TYPES DE VARIABLES</h3>
<p>
EXERCICE 1<br />
&gt;&gt; var nb:int veut dire que la variable nb prendra pour valeur tout les nombres entiers<br />
(int comme integer)<br />
Que veut dire var nb:Number?<br />
Que veut dire var myText:String?<br />
Que veut dire var monClip:MovieClip?<br />
EXERCICE 2<br />
&gt;&gt; Sur le code suivant : qu&rsquo;est ce que my_color? Que va il se produire sur le MovieClip<br />
&ldquo;clip&rdquo;<br />
var my_color:ColorTransform = new ColorTransform();<br />
my_color.color=0&#215;003299;<br />
clip.transform.colorTransform=my_color;</p>
<h3>
LES ECOUTEURS</h3>
<p>
EXERCICE 1<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;monBouton&rdquo;<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;monRectangle&rdquo;<br />
Dans le cript ci dessous, remplacez les pointill&eacute;s pour que mon clip monRectangle se<br />
transforme avec une hauteur de 200 px.<br />
&#8230;&#8230;&#8230;&#8230;&#8230;..addEventListener(MouseEvent.MOUSE_DOWN, &#8230;&#8230;&#8230;&#8230;&#8230;..);<br />
function maHauteur(e:MouseEvent) {<br />
&#8230;&#8230;&#8230;..height=200;<br />
}<br />
EXERCICE 2<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;monBouton&rdquo;<br />
une intepolation de mouvement:<br />
Dans le script ci dessous, remplacez les pointill&eacute;s pour que en cliquant sur monBouton<br />
l&rsquo;interpolation s&rsquo;arrete.<br />
monBouton.addEventListener(&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..,stopIt);<br />
function stopIt(e:Event) {<br />
&#8230;&#8230;&#8230;<br />
}<br />
EXERCICE 3<br />
&gt;&gt; Que veut dire stage?</p>
<p>EXERCICE 4<br />
&gt;&gt; Quel mot peut &ecirc;tre remplacer ici par stage et quel changement cela va t-il produire?<br />
balon.addEventListener(MouseEvent.MOUSE_DOWN,changeColor);</p>
<p>EXERCICE 5<br />
&gt;&gt; Que veut dire mouseX?<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;point&rdquo;<br />
Que va produire le script suivant ?<br />
stage.addEventListener(MouseEvent.MOUSE_MOVE,actionOver);<br />
function actionOver(e:Event){<br />
point.x=mouseX<br />
}</p>
<p>EXERCICE 7 (Syntaxe)<br />
&gt;&gt;La syntaxe pour utiliser un &eacute;couteur est la suivante :<br />
MovieClip.addEventListener(condition,mafunction)<br />
function mafunction() {<br />
blabla<br />
}<br />
Citez 5 conditions possibles</p>
<p>EXERCICE 6<br />
&gt;&gt; Corrigez les 6 erreurs<br />
Bouton.addEventListener(MouseEvent.MOUSE_OVER,actionOver);<br />
Bouton.addEventListener(MouseEvent.MOUSE_OUT,actionOut<br />
Bouton.addEventListener(MouseEvent.CLICK,actionClick);<br />
function actionOver() {<br />
carre.x=40;<br />
}<br />
function actionout(e:Event) {<br />
carre.x=80;<br />
function actionclick(e:Event) {<br />
carre.alpha=6;<br />
}</p>
<p>LA BOUCLE FOR<br />
&gt;&gt; J&rsquo;ai dans ma biblioth&egrave;que un clip nomm&eacute; Rond avec une liaison &ldquo;export&eacute; pour actionscript&rdquo;<br />
(clic droit &gt;&gt;Liaison&gt;&gt; export&eacute; pour actionscript)<br />
Que va produire ?<br />
for (var ii:Number=0; ii&lt;50; ii++) {<br />
var monRond:MovieClip =new Rond();<br />
addChild(monRond);<br />
monRond.x=ii*50;<br />
}</p>
<p>&gt;&gt; Que va produire ?<br />
for (var ii:Number=0; ii&lt;50; ii++) {<br />
for (var jj:Number=0; jj&lt;50; jj++) {<br />
var monRond:MovieClip =new Rond();<br />
addChild(monRond);<br />
monRond.x=ii*50;<br />
monRond.y=jj*50;<br />
}<br />
}</p>
<p>LA CONDITION IF ELSE</p>
<p>EXERCICE 1<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;point&rdquo;<br />
Que va produire le script suivant ?<br />
stage.addEventListener(MouseEvent.MOUSE_MOVE,actionOver);<br />
function actionOver(e:Event){<br />
point.x=mouseX<br />
}<br />
EXERCICE 2<br />
&gt;&gt; Nous rajoutons une condition if else dans le script et dans le clip point il y a 2 images<br />
cl&eacute;s<br />
Que va produire le script suivant ?<br />
stage.addEventListener(MouseEvent.MOUSE_MOVE,actionOver);<br />
function actionOver(e:Event) {<br />
point.x=mouseX;<br />
if (point.x&gt;200) {<br />
point.gotoAndStop(2);<br />
} else {<br />
point.gotoAndStop(1);<br />
}<br />
}</p>
<p>HITTESTOBJECT</p>
<p>EXERCICE 1<br />
&gt;&gt; A quoi servent startDrag et stopDrag?</p>
<p>EXERCICE 2<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;point&rdquo;<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;maSurface&rdquo;<br />
Que va produire le script suivant ?<br />
point.addEventListener(MouseEvent.MOUSE_DOWN, dragMonPoint);<br />
point.addEventListener(MouseEvent.MOUSE_UP, stopdragMonPoint);<br />
function dragMonPoint (evt:Event){<br />
point.startDrag();<br />
}<br />
function stopdragMonPoint (evt:Event){<br />
point.stopDrag();<br />
}</p>
<p>EXERCICE 3<br />
&gt;&gt; Nous rajoutons une condition et dans le clip point il y a 2 images cl&eacute;s<br />
Que va produire le script suivant ?<br />
point.addEventListener(MouseEvent.MOUSE_DOWN, dragMonPoint);<br />
point.addEventListener(MouseEvent.MOUSE_UP, stopdragMonPoint);<br />
function dragMonPoint (evt:Event){<br />
point.startDrag();<br />
}<br />
function stopdragMonPoint (evt:Event){<br />
point.stopDrag();<br />
if(point.hitTestObject(surface)){<br />
point.gotoAndStop(2);<br />
point.removeEventListener(MouseEvent.MOUSE_DOWN, dragMonPoint);<br />
}<br />
}<br />
&nbsp;</p>
<h3>
TWEENLITE</h3>
<p>&nbsp;</p>
<p>
EXERCICE 1<br />
&gt;&gt; Que faut il faire avant d&rsquo;utiliser la classe tweenlite?<br />
EXERCICE 2<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un clip avec pour nom d&rsquo;occurrence &ldquo;monClip&rdquo;<br />
Que va produire le script suivant ?<br />
import com.greensock.*;<br />
import com.greensock.easing.*;<br />
TweenLite.to(monClip,2,{x:450,y:150,rotation:25});<br />
EXERCICE 3<br />
Quelle sera la diff&eacute;rence du script pr&eacute;cedant avec le script suivant?<br />
import com.greensock.*;<br />
import com.greensock.easing.*;<br />
TweenLite.to(monClip,2,{x:450,y:150,rotation:25,ease:Strong.easeOut});</p>
<h3>
LES CHAMPS TEXTES</h3>
<p>
EXERCICE 1<br />
&gt;&gt; Quelle diff&eacute;rences y a t-il entre un champs texte dynamqie et un champ texte statique<br />
EXERCICE 2<br />
&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
- un champ text dynamique avec pour nom d&rsquo;occurrence &ldquo;monChampdeText&rdquo;<br />
- 4 clips nomm&eacute;s bouton1, bouton2, bouton3, bouton4<br />
Que va produire le script suivant ?<br />
bouton1.addEventListener(MouseEvent.MOUSE_DOWN,startPress2);<br />
bouton2.addEventListener(MouseEvent.MOUSE_DOWN,startPress1);<br />
bouton3.addEventListener(MouseEvent.MOUSE_DOWN,startPress2);<br />
bouton4.addEventListener(MouseEvent.MOUSE_DOWN,startPress2);<br />
function startPress1(evt:MouseEvent) {<br />
monChampdeText.text=&rdquo;C&rsquo;est perdu&rdquo;<br />
}<br />
function startPress2(evt:MouseEvent) {<br />
monChampdeText.text=&rdquo;C&rsquo;est gagn&eacute;&rdquo;<br />
}</p>
<p>
&nbsp;</p>
<h2>
CORRECTIONS</h2>
<p>&nbsp;</p>
<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>
<h3>LES PROPRIETES</h3>
<p>&gt;&gt; x et y<br />
&gt;&gt; scaleX et scaleY : echelle de valeur d&eacute;terminant la largeur et la hauteur du clip en pourcentage (valeur entre 0 et 1)<br />
&gt;&gt; width et height : d&eacute;termine la largeur et hauteur du clip<br />
&gt;&gt; alpha : d&eacute;termine la transparence du clip ( valeur entre 0 et 1)<br />
&gt;&gt; visible : d&eacute;termine si le clip est visible ou non&nbsp; ( valeur&nbsp; 0 ou 1)<br />
&gt;&gt; rotation : d&eacute;termine l&#8217;angle de rotation du clip sur 360 degr&eacute;</p>
<p>exemples :</p>
<p>&gt;&gt; J&rsquo;ai sur ma sc&egrave;ne principale :<br />
un clip avec pour nom  d&rsquo;occurrence &ldquo;monRectangle&rdquo;</p>
<p>&nbsp;</p>
<ul>
<li>monRectangle.x=50 &gt;&gt; va positionner le clip monRectangle sur l&#8217;absisse (x) 50</li>
<li>monRectangle.y=200 &gt;&gt; va positionner le clip monRectangle sur l&#8217;ordonn&eacute;e (y) 200</li>
<li>monRectangle.scaleX=0.25 &gt;&gt; va diminuer la largeur de monRectangle de 25 %</li>
<li>monRectangle.scaleY=0.8 &gt;&gt; va diminuer la largeur de monRectangle  de 80 %</li>
<li>monRectangle.width=200 &gt;&gt; va donner une largeur 200 px</li>
<li>monRectangle.height=10 &gt;&gt; va donner une largeur 10 px</li>
<li>monRectangle.alpha=0.5 &gt;&gt; va rendre le clip monRectangle transparent de 50 %</li>
<li>monRectangle.visible=0 &gt;&gt; va rendre le clip monRectangle invisible <br />
    monRectangle.visible=1 &gt;&gt; va rendre le clip monRectangle visible si le clip &eacute;tait invisible auparavent</li>
<li>monRectangle.rotation=45 &gt;&gt; va faire tourner le clip monRectangle de 45 degr&eacute;</li>
</ul>
<h3>
ADDCHILD</h3>
<p>
Permet (entre autre) l&#8217;importation de clips depuis la biblioth&egrave;que. Il faut qu&#8217;il y ait une liaison dans la biblioth&egrave;que : clic droit sur le clip dans la biblioth&egrave;que &gt;&gt; liaison ou propri&eacute;t&eacute;s &gt;&gt; exporter pour actionscript. C&#8217;est un peu l&#8217;&eacute;quivalent de attachMovieClip en AS2</p>
<p>exemples :<br />
&nbsp;</p>
<ul>
<li>addChild(new my-Clip()) permet d&#8217;importer le clip my-Clip sur la sc&egrave;ne
<p>    &nbsp;</li>
</ul>
<h3>&nbsp;LES TYPES DE VARIABLES</h3>
<p>
Number : Nombre d&eacute;cimaux (avec une virgule)<br />
int : Nombre entier (sans virgule)<br />
String : Chaine de caract&egrave;re<br />
Boolean : valeur binaire prenant seulement deux valeur : true ou false<br />
MovieClip : clip</p>
<p>exemples :</p>
<ul>
<li>var nb:Number veut dire que la variable nb prendra pour valeur tout les nombres entiers.<br />
    Par exemple var x:Number=1.002 ou var x:Number=120007.852<br />
    &nbsp;</li>
<li>var nb:int veut dire que la variable nb prendra pour valeur tout les  nombres entiers.<br />
    Par exemple var x:int=1 ou var x:int=120007<br />
    &nbsp;</li>
<li>var myText:String veut dire que la variable myText prendra pour valeur un mot ou une phrase ou une suite de caract&egrave;re <br />
    Par exemple var myText:String=&quot;j&#8217;adore l&#8217;ActionScript&quot; ou myText:String=&quot;le schnitzel est un plat autrichien&quot;<br />
    &nbsp;</li>
<li>var test:Boolean veut dire que la variable test prendra pour valeur true ou false.<br />
    Par exemple var test:Boolean=true ou var test:Boolean=false<br />
    &nbsp;</li>
<li>var monClip:MovieClip veut dire que la variable monClip est un clip<br />
    Par exemple var monClip:MovieClip=new clipDeMablioth&egrave;que()</p>
<p>    &nbsp;</li>
</ul>
<p>Autre variable :<br />
ColorTransform : Permet de changer la couleur d&#8217;un clip</p>
<p>exemple :</p>
<p>var my_color:ColorTransform = new ColorTransform();<br />
my_color.color=0&#215;003299;<br />
clip.transform.colorTransform=my_color;</p>
<p>&nbsp;</p>
<h3>&nbsp;LES ECOUTEURS</h3>
<p>&nbsp;Syntaxe d&#8217;un ecouteurs addEventListener<br />
MovieClip.addEventListener(condition,mafunction)<br />
function mafunction() {<br />
blabla<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/bases-as3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Petits Scripts</title>
		<link>http://cours-internet.com/petits-scripts/</link>
		<comments>http://cours-internet.com/petits-scripts/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 09:54:46 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS3)]]></category>

		<guid isPermaLink="false">http://cours-internet.com/?p=862</guid>
		<description><![CDATA[Duplication et positionnement d&#8217;un clip pris dans la biblioth&#232;que

&#160;var myBtn : Array = [];
for (var ii : int = 0; ii &#60; 10; ii++) {
&#160;&#160;&#160; myBtn.push( addChild( new Btn( ) ) );
&#160;&#160;&#160; myBtn[ ii].x=30*ii+30;
&#160;&#160;&#160; myBtn[ ii].y = stage.stageHeight &#8211; 30;
&#160;&#160;&#160; myBtn[ ii].txt.text=ii
}

Explication du script : 

Connectez vous pour lire la suite, ou enregistrez vous gratuitement [...]]]></description>
			<content:encoded><![CDATA[<h3>Duplication et positionnement d&#8217;un clip pris dans la biblioth&egrave;que</h3>
<p><embed width="450" height="100" menu="true" loop="true" play="true" src="http://cours-internet.com/wp-content/uploads/flash/as3/petits-scripts/DuplicClip.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
<p>&nbsp;<strong>var myBtn : Array = [];</strong><br />
<strong>for (var ii : int = 0; ii &lt; 10; ii++) {</strong><br />
<strong>&nbsp;&nbsp;&nbsp; myBtn.push( addChild( new Btn( ) ) );</strong><br />
<strong>&nbsp;&nbsp;&nbsp; myBtn[ ii].x=30*ii+30;<br />
&nbsp;&nbsp;&nbsp; myBtn[ ii].y = stage.stageHeight &#8211; 30;</strong><br />
<strong>&nbsp;&nbsp;&nbsp; myBtn[ ii].txt.text=ii</strong><br />
}</p>
<p><strong><br />
Explication du script : <br />
</strong></p>
<p><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/petits-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actions autonomes (AS2)</title>
		<link>http://cours-internet.com/actions-autonomes-as2/</link>
		<comments>http://cours-internet.com/actions-autonomes-as2/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:45:56 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[attachMovie]]></category>
		<category><![CDATA[duplicateMovieClip]]></category>
		<category><![CDATA[gotoAndPlay]]></category>
		<category><![CDATA[Math.random]]></category>
		<category><![CDATA[onEnterFrame]]></category>
		<category><![CDATA[removeMovieClip]]></category>
		<category><![CDATA[source flash]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=578</guid>
		<description><![CDATA[







 function opendivdiapo(id) { 
 for (i=1;i                   p._y = Stage.height; 
                        } 
  [...]]]></description>
			<content:encoded><![CDATA[<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left"><embed width="260" height="150" menu="true" loop="true" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/trajectoire.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top"><script type="text/javascript"> function opendivdiapo(id) { 
 for (i=1;i<=14;i++) { // so you can add more than 2 
 var divname = 'divdiapo'+i; 
 var divStyle = document.getElementById(divname).style; 
 divStyle.display=(id==divname)?'block':'none'; 
 } 
} 
</script></p>
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/trajectoire.zip"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="Flash" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onclick="opendivdiapo('divdiapo1');"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/description.gif" alt="Flash" />Voir le code</a></div>
<div id="divdiapo1" style="display: none; float: left;">a = 2; <br />
                        deg = 34; <br />
                        coef = 0.3; <br />
                        n = 0; <br />
                        longueur = 300; <br />
                        retrecissement = 0.1; <br />
                        transparence = 1; <br />
                        _root.onEnterFrame = function() { <br />
                        p._x = p._x+a*Math.sin(deg); <br />
                        p._y = p._y+a*Math.cos(deg); <br />
                        timer(); <br />
                        deg += speed; <br />
                        if (p._x&gt;Stage.width) { <br />
                        p._x = 0; <br />
                        } <br />
                        if (p._x&lt;0) { <br />
                        <!--0-->                   p._x = Stage.width; <br />
                        } <br />
                        if (p._y&gt;Stage.height) { <br />
                        p._y = 0; <br />
                        } <br />
                        if (p._y&lt;0) { <br />
                        <!--0-->                   p._y = Stage.height; <br />
                        } <br />
                        n++; <br />
                        p.duplicateMovieClip(&quot;p&quot;+n,n); <br />
                        for (i=n-1; i&gt;n-longueur; i--) { <br />
                        eval(&quot;p&quot;+i)._width = eval(&quot;p&quot;+i)._width-retrecissement; <br />
                        eval(&quot;p&quot;+i)._height = eval(&quot;p&quot;+i)._height-retrecissement; <br />
                        eval(&quot;p&quot;+i)._alpha = eval(&quot;p&quot;+i)._alpha-transparence; <br />
                        } <br />
                        m = n-longueur; <br />
                        eval(&quot;p&quot;+m).removeMovieClip(); <br />
                        }; <br />
                        t = 0; <br />
                        temper(); <br />
                        speed = Math.random()-0.5; <br />
                        function temper() { <br />
                        temps = Math.random()*10*5; <br />
                        } <br />
                        function timer() { <br />
                        t++; <br />
                        if (t&gt;temps) { <br />
                        t = 0; <br />
                        temper(); <br />
                        speed = 0.2*(Math.random()-0.5); <br />
                        } <br />
                        }</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox2">
<div class="left"><embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/pluie.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo2" style="display: none; float: left;">//initialisation de la variable n &agrave; 0<br />
                                    n = 0;<br />
                                    //Cr&eacute;ation d'une boucle<br />
                                    this.onEnterFrame = function() {<br />
                                    n++;<br />
                                    //la boucle va tourner 700 fois, on va avoir 700 goutte de pluie<br />
                                    if (n&lt;700) {<br />
                                    <!--700-->                           //on va chercher le clip &quot;goutte&quot; dans la bibliotheque<br />
                                    this.attachMovie(&quot;goutte&quot;,&quot;goutte&quot;+n,n);<br />
                                    } else {<br />
                                    //arret de la boucle un script situ&eacute; dans le scripr<br />
                                    delete this.onEnterFrame;<br />
                                    }<br />
                                    };<br />
                                    ///un script situ&eacute; dans le clip s'occupe <br />
                                    ///du positionnement al&eacute;atoire<br />
                                    ///et de la largeur de la goutte</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox3">
<div class="left"><embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/declenche_anim2.swf" play="true" loop="True" menu="true"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo3" style="display: none; float: left;">//D&eacute;finir le nombre de clips<br />
                                    nb = 8;<br />
                                    temps_max = 50;<br />
                                    ///<br />
                                    mc1.gotoAndPlay(2);<br />
                                    declencheanim();<br />
                                    function declencheanim() {<br />
                                    numero = int(Math.random()*nb)+1;<br />
                                    temps = Math.random()*temps_max;<br />
                                    n = 0;<br />
                                    this.onEnterFrame = function() {<br />
                                    n++;<br />
                                    if (n&gt;temps) {<br />
                                    eval(&quot;mc&quot;+numero).play();<br />
                                    delete this.onEnterFrame;<br />
                                    }<br />
                                    };<br />
                                    }</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/actions-autonomes-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loadings (AS2)</title>
		<link>http://cours-internet.com/loadings/</link>
		<comments>http://cours-internet.com/loadings/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:20:59 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[chargement]]></category>
		<category><![CDATA[getBytesLoaded]]></category>
		<category><![CDATA[getBytesTotal]]></category>
		<category><![CDATA[loading]]></category>
		<category><![CDATA[onEnterFrame]]></category>
		<category><![CDATA[préchargement]]></category>
		<category><![CDATA[source flash]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=484</guid>
		<description><![CDATA[// 
// ]]&#62;
Pretty Loaded recense des pages d&#8217;attente cr&#233;atives et originales. De quoi s&#8217;inspirer&#8230;  http://www.prettyloaded.com









Pr&#233;Loading1
                        








T&#233;l&#233;chargez
Flash 8
Voir le code
_parent.stop();  this.onEnterFrame = function() {  pourcentage = _parent.getBytesLoaded()/_parent.getBytesTotal()*100;  barre_loading._width = [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
function opendivslid(id) {
 for (i=1;i<=14;i++) { // so you can add more than 2
 var divname = 'divslid'+i;
 var divStyle = document.getElementById(divname).style;
 divStyle.display=(id==divname)?'block':'none';
 }
}</p>
<p>// ]]&gt;</script></p>
<p><em>Pretty Loaded</em> recense des pages d&rsquo;attente cr&eacute;atives et originales. De quoi s&#8217;inspirer&#8230;  <a href="http://www.prettyloaded.com">http://www.prettyloaded.com</a></p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Pr&eacute;Loading1</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading1_demo.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading1_demo.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading1.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div class="icone"><a onclick="opendivslid('divslid1');"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/description.gif" alt="Flash" />Voir le code</a></div>
<div id="divslid1" style="display: none; float: left;">_parent.stop();  this.onEnterFrame = function() {  pourcentage = _parent.getBytesLoaded()/_parent.getBytesTotal()*100;  barre_loading._width = pourcentage;  if (pourcentage == 100) {  delete this.onEnterFrame;  _parent.play();  }  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>MovieClipLoader 1</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/moviecliploader.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/moviecliploader.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/moviecliploader.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onclick="opendivslid('divslid2');"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/description.gif" alt="Flash" />Voir le code</a></div>
<div id="divslid2" style="display: none; float: left;">var monClip_mcl = new MovieClipLoader();  var monEcouteurDeClip = new Object();  monEcouteurDeClip.onLoadStart = function(cible)                                {  _root.attachMovie(&quot;preloader&quot;,&quot;preloader&quot;,1);  preloader._x = 100;  preloader._y = 100;  };  monEcouteurDeClip.onLoadProgress = function(cible,                                loadedBytes, totalBytes) {  progression = loadedBytes/totalBytes*100;  preloader.barre._width = progression;  };  monEcouteurDeClip.onLoadComplete = function(cible)                                {  //trace(&quot;Chargement termin&eacute;!&quot;);  };  monEcouteurDeClip.onLoadInit = function(cible)                                {  preloader.removeMovieClip();  };  monEcouteurDeClip.onLoadError = function(cible,                                codeErreur) {  //trace(&quot;Une erreur est servenue lors du                                chargement&quot;+codeErreur);  };  ////////////////////////////////////////////////  monClip_mcl.addListener(monEcouteurDeClip);  MonBouton.onPress = function() {  monClip_mcl.loadClip(&quot;media/loaded.swf&quot;,support);  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox2">
<div class="left">
<h1>Pr&eacute;Loading2</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading2_demo.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading2_demo.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid3" style="display: none; float: left;">_parent.stop();  this.onEnterFrame = function() {  pourcentage = _parent.getBytesLoaded()/_parent.getBytesTotal()*100;  barre_loading._width = pourcentage;  if (pourcentage == 100) {  delete this.onEnterFrame;  _parent.play();  }  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td rowspan="2">&nbsp;</td>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox3">
<div class="left">
<h1>Pr&eacute;Loading3</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading3_demo.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/loading3_demo.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid4" style="display: none; float: left;">_parent.stop();  stop();  this.onEnterFrame = function() {  pourcentage=int(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);  gotoAndStop(pourcentage);  if (pourcentage == 100) {  delete this.onEnterFrame;  _parent.play();  }  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<h1>MovieClipLoader 2</h1>
<div class="left"><object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploaders.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploaders.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid5" style="display: none; float: left;">MonBouton.onPress                             = function() {  var n:MovieClipLoader = new MovieClipLoader();  n.loadClip(&quot;media/anim.swf&quot;,support);  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1>MovieClipLoader 4</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploaders.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploaders.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid7" style="display: none; float: left;">MonBouton.onPress                             = function() {  var n:MovieClipLoader = new MovieClipLoader();  n.loadClip(&quot;media/anim.swf&quot;,support);  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1><span class="Content_Titre">loadMovieNum</span></h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/1_loadmovienum.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/1_loadmovienum.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid9" style="display: none; float: left;">ecouteur = new Object();  ecouteur.onKeyDown = function() {  MonClip._rotation = MonClip._rotation+5;  };  Key.addListener(ecouteur);</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>MovieClipLoader 3</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploadersbis.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploadersbis.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid6" style="display: none; float: left;">MonBouton.onPress = function()                             {  _root.createEmptyMovieClip(&quot;support&quot;,2);  var n:MovieClipLoader = new MovieClipLoader();  n.loadClip(&quot;media/anim.swf&quot;,support);  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" cellspacing="0" cellpadding="0" border="0" style="height: 150px;">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1>MovieClipLoader 5</h1>
<p>                        <object width="260" height="130" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploadersbis.swf" /><embed width="260" height="130" type="application/x-shockwave-flash" src="http://www.ateliernumerique.com/images/stories/flash/sources/03_loadings/3_moviecliploadersbis.swf" quality="high"></embed></object></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid8" style="display: none; float: left;">MonBouton.onPress = function()                             {  _root.createEmptyMovieClip(&quot;support&quot;,2);  var n:MovieClipLoader = new MovieClipLoader();  n.loadClip(&quot;media/anim.swf&quot;,support);  };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/loadings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Players FLV (AS2)</title>
		<link>http://cours-internet.com/players-flv/</link>
		<comments>http://cours-internet.com/players-flv/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 07:40:54 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[flash video player]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[player flv]]></category>
		<category><![CDATA[source flash]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=481</guid>
		<description><![CDATA[








Player simple 01













Flash 8
T&#233;l&#233;chargez













&#160;






Player Simple 02 (sans xml)









Flash 8
T&#233;l&#233;chargez




















Player + sur la premi&#232;re image








Connectez vous pour lire la suite, ou enregistrez vous gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.













Player
                    [...]]]></description>
			<content:encoded><![CDATA[<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Player simple 01<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_01.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_01.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td width="172" colspan="3">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_01.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Player Simple 02 (sans xml)<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_08.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_08.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_08.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<h1>Player + sur la premi&egrave;re image<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_03.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_03.swf"></embed></object></h1>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1>Player<br />
                        + arr&egrave;t sur la premi&egrave;re image<br />
                        + Volume + avance rapide<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_05.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_05.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Player+ la premi&egrave;re image + Volume<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_04.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_04.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1>Player<br />
                        + arr&egrave;t sur la premi&egrave;re image<br />
                        + Volume + avance rapide + Timeline<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_06.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_06.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox" style="padding-top: 10px;">
<div class="left">
<h1>Player avec boutons marche arret<object width="260" height="121" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_02.swf" name="movie" /><param value="high" name="quality" /><embed width="260" height="121" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://www.ateliernumerique.com/images/stories/flash/swf/10_flv_player/flv_player_02.swf"></embed></object></h1>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/players-flv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manipulation de textes (AS2)</title>
		<link>http://cours-internet.com/manipulation-de-textes/</link>
		<comments>http://cours-internet.com/manipulation-de-textes/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 07:38:08 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[createTextField]]></category>
		<category><![CDATA[getBytesLoaded]]></category>
		<category><![CDATA[LoadVars]]></category>
		<category><![CDATA[onEnterFrame]]></category>
		<category><![CDATA[onRollOver]]></category>
		<category><![CDATA[source flash]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=478</guid>
		<description><![CDATA[


 
function opendivslid(id) { 
 for (i=1;i]]></description>
			<content:encoded><![CDATA[<table width="550" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top"><script type="text/javascript"> 
function opendivslid(id) { 
 for (i=1;i<=14;i++) { // so you can add more than 2 
 var divname = 'divslid'+i; 
 var divStyle = document.getElementById(divname).style; 
 divStyle.display=(id==divname)?'block':'none'; 
 } 
} 
    </script></p>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>L&eacute;gendes</h1>
<p>Survolez les boutons<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/legende_txt.swf" play="true" loop="True" menu="true"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><img width="19" height="19" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/flash.gif" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/legende_txt.zip"><img border="0" align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/download.gif" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onClick="opendivslid('divslid1');"><img width="19" height="19" border="0" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/description.gif" />Voir le code</a></div>
<div id="divslid1" style="display: none; float: left;">bt1.onRollOver = function() {<br />
                                    texte =  &quot;Depuis huit jours, j'avais d&eacute;chir&eacute; mes bottines. Aux cailloux des chemins. J'entrais &agrave; Charleroi. &quot;<br />
                                    };<br />
                                    bt2.onRollOver = function() {<br />
                                    texte =  &quot;Au Cabaret-Vert: je demandai des tartines. De beurre et du jambon qui f&ucirc;t &agrave; moiti&eacute; froid.&quot;<br />
                                    };<br />
                                    bt3.onRollOver = function() {<br />
                                    texte =  &quot;Bienheureux, j'allongeai les pattes sous la table. Verte, je contemplai les sujets tr&egrave;s na&iuml;fs. De la tapisserie.&quot;<br />
                                    };<br />
                                    bt4.onRollOver = function() {<br />
                                    texte =  &quot;Et ce fut adorable, Quand la fille aux t&eacute;tons &eacute;normes, aux yeux vifs,...&quot;<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>load d'un fichier texte</h1>
<p>Cliquez sur les boutons<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/loadings_txt.swf" play="true" loop="True" menu="true"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/flash.gif" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/loadings_txt.zip"><img border="0" align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/download.gif" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onClick="opendivslid('divslid2');"><img width="19" height="19" border="0" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/description.gif" />Voir le code</a></div>
<div id="divslid2" style="display: none; float: left;">bt1.onPress = function() {<br />
                                    texte =  unescape(MyPrefs.texte1);<br />
                                    };<br />
                                    bt2.onPress = function() {<br />
                                    texte =  unescape(MyPrefs.texte2);<br />
                                    };<br />
                                    texteload&eacute; = &quot;http://www.ateliernumerique.com/images/stories/flash/swf/txt/texte.txt&quot;;<br />
                                    ///////////////////////<br />
                                    function TxtPrefs() {<br />
                                    MyPrefs = new LoadVars();<br />
                                    MyPrefs.load(texteload&eacute;);<br />
                                    function CheckLoadPrefs() {<br />
                                    if (MyPrefs.loaded) {<br />
                                    clearInterval(CLPBcl);<br />
                                    PercentDone = 100;<br />
                                    //texte = unescape(MyPrefs.texte);<br />
                                    } else {<br />
                                    BytesLoaded = MyPrefs.getBytesLoaded;<br />
                                    BytesTotal = MyPrefs.getBytesTotal;<br />
                                    PercentDone = (BytesTotal-BytesLoaded)/100;<br />
                                    }<br />
                                    }<br />
                                    CLPBcl = setInterval(CheckLoadPrefs, 100);<br />
                                    }<br />
                                    this.onEnterFrame = function() {<br />
                                    TxtPrefs.call();<br />
                                    delete this.onEnterFrame;<br />
                                    };<br />
                                    stop();</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="550" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<h1>Souris &amp; texte</h1>
<p>Faites bouger la souris<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/texteffect01.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid3" style="display: none; float: left;">///premier script :<br />
                                    _root.onMouseMove = <br />
                                    function() {<br />
                                    legende._x = _root._xmouse;<br />
                                    legende._y = _root._ymouse;<br />
                                    };<br />
                                    ///second script :<br />
                                    mytext = &quot;ateliernumerique.com&quot;;<br />
                                    espacement = 10;<br />
                                    nn = 0;<br />
                                    max = mytext.length;<br />
                                    for (i=1; i&lt;=max; i++) {<br />
                                    this.attachMovie(&quot;lettre_anim&eacute;e&quot;,&quot;txt&quot;+i,i);<br />
                                    eval(&quot;txt&quot;+i).lettre.txt.text = substring(mytext, i, 1);<br />
                                    eval(&quot;txt&quot;+i)._x = eval(&quot;txt&quot;+(i-1))._x+espacement;<br />
                                    eval(&quot;txt&quot;+i).gotoAndPlay(eval(&quot;txt&quot;+i)._totalframes-i*10);<br />
                                    }</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox2">
<h1>Souris &amp; texte</h1>
<p>&nbsp;<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/texte01.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divslid4" style="display: none; float: left;">////Cr&eacute;ation d'un Texte dynamque <br />
                                    this.createTextField(&quot;mytext&quot;,this.getNextHighestDepth(),0,0,100,200);<br />
                                    mytext.text = &quot;Hello my friend&quot;;<br />
                                    //Obtention des propri&eacute;t&eacute;s du texte pr&eacute;sent sur la sc&egrave;ne <br />
                                    //et affectation de cespropri&eacute;t&eacute; au texte dynamique<br />
                                    mytext.setTextFormat(textescene.getTextFormat());<br />
                                    /////Positionnement du texte dynamique au centre<br />
                                    mytext.autoSize = &quot;center&quot;;<br />
                                    mytext._x = (Stage.width-mytext._width)/2;<br />
                                    mytext._y = (Stage.height-mytext._height)/2;</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/manipulation-de-textes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webcam &amp; Micro</title>
		<link>http://cours-internet.com/webcam-micro/</link>
		<comments>http://cours-internet.com/webcam-micro/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 06:58:01 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[actionscript2]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[flash webcam]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[source flash]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=455</guid>
		<description><![CDATA[








Webcam
Bouger devant votre webcam










Flash 8
T&#233;l&#233;chargez
&#160;
//Renvoie une r&#233;f&#233;rence &#224; un objet Camera pour capturer des donn&#233;es video
                                    //Pour commencer la capture [...]]]></description>
			<content:encoded><![CDATA[<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td valign="top">
<table height="150" cellspacing="0" cellpadding="0" border="0" width="100">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Webcam</h1>
<p>Bouger devant votre webcam</p>
<p><embed height="150" width="260" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/activity_camera.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table cellspacing="3" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td>
<div id="icone"><img height="19" align="absmiddle" width="19" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/activity_camera.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div class="icone">&nbsp;</div>
<div style="display: none; float: left;" id="div101">//Renvoie une r&eacute;f&eacute;rence &agrave; un objet Camera pour capturer des donn&eacute;es video<br />
                                    //Pour commencer la capture de vid&eacute;o, vous devez relier l&rsquo;objet Camera &agrave; un objet video (ici &quot;vid&quot;)<br />
                                    mycam = Camera.get();<br />
                                    vid.attachVideo(mycam);<br />
                                    //La m&eacute;thode ActionScript Flash MX Camera.setMode(largeur, hauteur fps, cameraPref), va vous permettre de fixer la largeur et hauteur de la capture le nombres d&#8217;images/secondes et pref&eacute;rence de source de la capture. <br />
                                    mycam.setMode(160,120,20,true);<br />
                                    n = 0;<br />
                                    //Cr&eacute;ation d&#8217;une boucle infinie <br />
                                    _root.onEnterFrame = function() {<br />
                                    Activite.text = mycam.activityLevel;<br />
                                    };<br />
                                    mycam.onActivity = function() {<br />
                                    };<br />
                                    stop();</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="150" cellspacing="0" cellpadding="0" border="0" width="100">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Microphone</h1>
<p>Faites du bruit</p>
<p><embed height="150" width="260" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/activity_microphone.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table cellspacing="3" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img height="19" align="absmiddle" width="19" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/activity_microphone.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div class="icone">&nbsp;</div>
<div style="display: none; float: left;" id="div102">//Renvoie une r&eacute;f&eacute;rence &agrave; un objet Microphone pour capturer des donn&eacute;es audio. Pour commencer la capture de l&rsquo;audio, vous devez relier l&rsquo;objet Microphone &agrave; un objet MovieClip (voir MovieClip.attachAudio()) ici la scene principal (&quot;this&quot; est consid&eacute;r&eacute;e comme un  movieclip .<br />
                                    m = Microphone.get();<br />
                                    this.attachAudio(m);<br />
                                    //Microphone.SetuseEchoSuppression(valeur), va vous permettre de sp&eacute;cifier si on r&eacute;duit l&#8217;&eacute;cho ou pas. <br />
                                    m.setUseEchoSuppression(true);<br />
                                    //Cr&eacute;ation d&#8217;une boucle infinie <br />
                                    _root.onEnterFrame = function() {<br />
                                    // affichage de l&#8217;activit&eacute; dans un champ de saisie<br />
                                    Activite.text = m.activityLevel;<br />
                                    };<br />
                                    stop();</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/webcam-micro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diaporamas et défilement d&#8217;images</title>
		<link>http://cours-internet.com/diaporamas-et-defilement-dimages/</link>
		<comments>http://cours-internet.com/diaporamas-et-defilement-dimages/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 06:41:16 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[diaporamas]]></category>
		<category><![CDATA[galerie images]]></category>
		<category><![CDATA[import mx.transitions.easing]]></category>
		<category><![CDATA[import mx.transitions.Tween]]></category>
		<category><![CDATA[tween]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=452</guid>
		<description><![CDATA[ function opendivdiapo(id) { 
 for (i=1;i]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"> function opendivdiapo(id) { 
 for (i=1;i<=14;i++) { // so you can add more than 2 
 var divname = 'divdiapo'+i; 
 var divStyle = document.getElementById(divname).style; 
 divStyle.display=(id==divname)?'block':'none'; 
 } 
} 
</script></p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement d'une surface (tween)<br />
                        Cliquez sur l'un des 4 boutons                           <embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/slideshow_07.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><img width="19" height="19" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/flash.gif" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/zip/slideshow_07.zip"><img border="0" align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/download.gif" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onClick="opendivdiapo('divdiapo1');"><img align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/description.gif" />Voir le code</a></div>
<div id="divdiapo1" style="display: none; float: left;">
<p>import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    vitesse = 2;<br />
                                    Drag1.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, 0, vitesse, true);<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, 0, vitesse, true);<br />
                                    };<br />
                                    Drag2.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -300, vitesse, true);<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, 0, vitesse, true);<br />
                                    };<br />
                                    Drag3.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -0, vitesse, true);<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, -140, vitesse, true);<br />
                                    };</p>
<p>Drag4.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -300, vitesse, true);<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, -140, vitesse, true);<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">Ascenceur vertical<br />
                        Faites glisser le bouton rose                         <embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/ascenceur.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><img width="19" height="19" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/flash.gif" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/ascenceur.zip"><img border="0" align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/download.gif" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onClick="opendivdiapo('divdiapo2');"><img align="absmiddle" alt="" src="http://www.ateliernumerique.com/images/icones/description.gif" />Voir le code</a></div>
<div id="divdiapo2" style="display: none; float: left;">
<p>//scrollbar est la barre de d&eacute;filement contenant le bouton rose et la barre blanche<br />
                                    //Btn est le bouton rose<br />
                                    // bloc est le clip contenant la page et le masque<br />
                                    scrollbar.btn.onPress = function() {<br />
                                    bordhaut = 0;<br />
                                    bordgauche = 0;<br />
                                    borddroit = scrollbar._width-this._width;<br />
                                    bordbas = scrollbar._height-this._height;<br />
                                    this.startDrag(bordhaut,bordgauche,bordbas,borddroit);<br />
                                    };<br />
                                    scrollbar.btn.onRelease = scrollbar.btn.onReleaseOutside=function () {<br />
                                    this.stopDrag();<br />
                                    };<br />
                                    this.onMouseMove = function() {<br />
                                    bloc.page._y = -(bloc.page._height-bloc.masque._height)*scrollbar.btn._y/(scrollbar._height-scrollbar.btn._height);<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement vertical d'une surface</div>
<div class="left">Cliquez sur l'un des 4 boutons<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/slideshow_05.swf" play="true" loop="True" menu="true"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo3" style="display: none; float: left;">import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    vitesse = 2;<br />
                                    Drag1.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, 0, vitesse, true);<br />
                                    };<br />
                                    Drag2.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, -140, vitesse, true);<br />
                                    };<br />
                                    Drag3.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, -280, vitesse, true);<br />
                                    };<br />
                                    Drag4.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y, -420, vitesse, true);<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">Drag and drop et D&eacute;placement d'une surface</div>
<div class="left">Faites glisser le bouton rose<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/control_visu.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo5" style="display: none; float: left;">
<p>smallpage.smallcadre.onPress = function() {<br />
                                    bordhaut = 0;<br />
                                    bordgauche = 0;<br />
                                    borddroit = smallpage._width-this._width;<br />
                                    bordbas = smallpage._height-this._height;<br />
                                    this.startDrag(bordhaut,bordgauche,bordbas,borddroit);<br />
                                    };<br />
                                    smallpage.smallcadre.onRelease = smallpage.smallcadre.onReleaseOutside=function () {<br />
                                    this.stopDrag();<br />
                                    };<br />
                                    this.onMouseMove = function() {<br />
                                    page._x = -(page._width-Stage.width)*smallpage.smallcadre._x/(smallpage._width-smallpage.smallcadre._width);<br />
                                    page._y = -(page._height-Stage.height)*smallpage.smallcadre._y/(smallpage._height-smallpage.smallcadre._height);<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement des vignettes de gauche &agrave; droite</div>
<div class="left">Faites bouger la souris de gauche &agrave; droite<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/diapo.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo7" style="display: none; float: left;">
<p>import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    decalage = 2;<br />
                                    vitesse=3<br />
                                    largeur = Masque._width/2;<br />
                                    distance = largeur+decalage;<br />
                                    this.onMouseMove = function() {<br />
                                    if (this._xmouse&gt;-distance &amp;&amp; this._xmouse<br />
                                    xx = -(bandeau._width-Masque._width)*_xmouse/(Masque._width);<br />
                                    }<br />
                                    if (this._xmouse&gt;distance) {<br />
                                    xx = -(bandeau._width-Masque._width)*distance/(Masque._width);<br />
                                    }<br />
                                    if (this._xmouse<br />
                                    xx = -(bandeau._width-Masque._width)*(distance*-1)/(Masque._width);<br />
                                    }<br />
                                    var MonAnim:Tween = new Tween(bandeau, '_x', Strong.easeOut, bandeau._x, xx, vitesse, true);<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement des vignettes de gauche &agrave; droite et zoom des vignettes</div>
<div class="left">Faites bouger la souris de gauche &agrave; droite<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/diapohoriz.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement des vignettes de gauche &agrave; droite et zoom des vignettes</div>
<div class="left">Faites bouger la souris du bas vers le haut et cliquez sur les vignettes<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/diapovertic.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement horizontal d'une surface</div>
<div class="left">Cliquez sur l'un des 4 boutons<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/slideshow_06.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo4" style="display: none; float: left;">import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    vitesse = 2;<br />
                                    Drag1.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, 0, vitesse, true);<br />
                                    };<br />
                                    Drag2.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -300, vitesse, true);<br />
                                    };<br />
                                    Drag3.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -600, vitesse, true);<br />
                                    };<br />
                                    Drag4.onPress = function() {<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -900, vitesse, true);<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement d'une surface</div>
<div class="left">Faites bouger la souris<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/slideshow_08.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div class="icone"><a onClick="opendivdiapo('divdiapo6');"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo6" style="display: none; float: left;">
<p>import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    vitesse = 2;<br />
                                    _root.onMouseMove = function() {<br />
                                    //Interpolation de mouvement sur l'axe x<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_x&quot;, Strong.easeOut, pages._x, -_xmouse, vitesse, true);<br />
                                    //Interpolation de mouvement sur l'axe y<br />
                                    var MonAnim:Tween = new Tween(pages, &quot;_y&quot;, Strong.easeOut, pages._y,  -_ymouse, vitesse, true);<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement et chargement de clips</div>
<div class="left">Cliquez sur l'un des 4 boutons<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/slideshow_10.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo8" style="display: none; float: left;">
<p>///On arrete l'animation<br />
                                    stop();<br />
                                    ///On charge les classes qui permettent de faire l'animation<br />
                                    import mx.transitions.Tween;<br />
                                    import mx.transitions.easing.*;<br />
                                    //////On charge les clips<br />
                                    mc.attachMovie(&quot;clip1&quot;, &quot;newclip1&quot;, mc.getNextHighestDepth());<br />
                                    mc.attachMovie(&quot;clip2&quot;, &quot;newclip2&quot;, mc.getNextHighestDepth());<br />
                                    mc.attachMovie(&quot;clip3&quot;, &quot;newclip3&quot;, mc.getNextHighestDepth());<br />
                                    mc.attachMovie(&quot;clip4&quot;, &quot;newclip4&quot;, mc.getNextHighestDepth());<br />
                                    //////////////////<br />
                                    ///Initialisation<br />
                                    n = 0;<br />
                                    max = 4;<br />
                                    mc.newclip1._alpha = 0;<br />
                                    mc.newclip2._alpha = 0;<br />
                                    mc.newclip3._alpha = 0;<br />
                                    mc.newclip4._alpha = 0;<br />
                                    //////////////<br />
                                    ////Animation<br />
                                    function animation() {<br />
                                    var Anim:Tween = new Tween(mc.newclip1, '_alpha', Strong.easeOut, mc.newclip1._alpha, statut[1], 2, true);<br />
                                    var Anim:Tween = new Tween(mc.newclip2, '_alpha', Strong.easeOut, mc.newclip2._alpha, statut[2], 2, true);<br />
                                    var Anim:Tween = new Tween(mc.newclip3, '_alpha', Strong.easeOut, mc.newclip3._alpha, statut[3], 2, true);<br />
                                    var Anim:Tween = new Tween(mc.newclip4, '_alpha', Strong.easeOut, mc.newclip4._alpha, statut[4], 2, true);<br />
                                    }<br />
                                    //////Statut des transparence(alpha) des images et lancement de l'animation<br />
                                    var statut:Array = new Array();<br />
                                    function image() {<br />
                                    if (n == max+1) {<br />
                                    n = 1;<br />
                                    }<br />
                                    if (n == 0) {<br />
                                    n = max;<br />
                                    }<br />
                                    statut[1] = 0;<br />
                                    statut[2] = 0;<br />
                                    statut[3] = 0;<br />
                                    statut[4] = 0;<br />
                                    statut[n] = 100;<br />
                                    animation();<br />
                                    frame = n+1;<br />
                                    gotoAndStop(frame);<br />
                                    }</p>
<p>//////Action des Boutons<br />
                                    bt1.onRollOver = function() {<br />
                                    n = 1;<br />
                                    image();<br />
                                    };<br />
                                    bt2.onRollOver = function() {<br />
                                    n = 2;<br />
                                    image();<br />
                                    };<br />
                                    bt3.onRollOver = function() {<br />
                                    n = 3;<br />
                                    image();<br />
                                    };<br />
                                    bt4.onRollOver = function() {<br />
                                    n = 4;<br />
                                    image();<br />
                                    };<br />
                                    bt_droite.onPress = function() {<br />
                                    n++;<br />
                                    image();<br />
                                    };<br />
                                    bt_gauche.onPress = function() {<br />
                                    n--;<br />
                                    image();<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="padding-top: 10px;" id="sourceBox">
<div class="left">D&eacute;placement des vignettes de gauche &agrave; droite et affichage de l&eacute;gendes</div>
<div class="left">Faites bouger la souris de gauche &agrave; droite<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/bandeau.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div id="divdiapo9" style="display: none; float: left;">
<p>La source fonctionne avec un composant <br />
                                    Il est n&eacute;cessaire de d&eacute;finir la largeur du bandeau contanant les vignettes<br />
                                    vign1.onRollOver=function() {<br />
                                    MonClip = this<br />
                                    Action();<br />
                                    _root.Titre = &quot;C&eacute;sar&quot;;<br />
                                    _root.Contenu1 = &quot;Contenu1 ergf&quot;;<br />
                                    _root.Contenu2 = &quot;Contenu2 rgf q&quot;;<br />
                                    _root.Contenu3 = &quot;Contenu3 f &quot;;<br />
                                    _root.Contenu4 = &quot;Contenu4 rg &quot;;<br />
                                    _root.Contenu5 = &quot;Contenu5 regs&quot;;<br />
                                    _root.Copyright = &quot;Contenu6 qrdgztyh&quot;;<br />
                                    _root.Poste = &quot;Contenu7 zt'(y zj&quot;;<br />
                                    }<br />
                                    vign1.onRollOut=function() {<br />
                                    Out();<br />
                                    }<br />
                                    vign2.onRollOver=function() {<br />
                                    MonClip = this<br />
                                    Action();<br />
                                    _root.Titre = &quot;Moli&egrave;re&quot;;<br />
                                    _root.Contenu1 = &quot;Contenu1 ss&quot;;<br />
                                    _root.Contenu2 = &quot;Contenu2 wdsvgf&quot;;<br />
                                    _root.Contenu3 = &quot;Contenu3 dfvfdw &quot;;<br />
                                    _root.Contenu4 = &quot;Contenu4 df &quot;;<br />
                                    _root.Contenu5 = &quot;Contenu5 ddvcd&quot;;<br />
                                    _root.Copyright = &quot;Contenu6 dqzet&quot;;<br />
                                    _root.Poste = &quot;Contenu7 zt'(y zj&quot;;<br />
                                    }<br />
                                    vign2.onRollOut=function() {<br />
                                    Out();<br />
                                    }<br />
                                    vign3.onRollOver=function() {<br />
                                    MonClip = this<br />
                                    Action();<br />
                                    _root.Titre = &quot;Aragon&quot;;<br />
                                    _root.Contenu1 = &quot;Contenu1 dffh&quot;;<br />
                                    _root.Contenu2 = &quot;Contenu2 wfdg &quot;;<br />
                                    _root.Contenu3 = &quot;Contenu3 dgfs&quot;;<br />
                                    _root.Contenu4 = &quot;Contenu4 dgt&quot;;<br />
                                    _root.Contenu5 = &quot;Contenu5 fht&quot;;<br />
                                    _root.Copyright = &quot;Contenu6 xgh,&quot;;<br />
                                    _root.Poste = &quot;Contenu7 zt'(y zj&quot;;<br />
                                    }<br />
                                    vign3.onRollOut=function() {.......</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/diaporamas-et-defilement-dimages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gestion des Sons</title>
		<link>http://cours-internet.com/sons/</link>
		<comments>http://cours-internet.com/sons/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 06:34:56 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[chargement son]]></category>
		<category><![CDATA[gotonextsound]]></category>
		<category><![CDATA[lecteur mp3]]></category>
		<category><![CDATA[loading mp3]]></category>
		<category><![CDATA[loadSound]]></category>
		<category><![CDATA[new Sound]]></category>
		<category><![CDATA[sons adobe flash]]></category>
		<category><![CDATA[source flash]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=475</guid>
		<description><![CDATA[


 
function opendivslid(id) { 
 for (i=1;i]]></description>
			<content:encoded><![CDATA[<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top"><script type="text/javascript"> 
function opendivslid(id) { 
 for (i=1;i<=14;i++) { // so you can add more than 2 
 var divname = 'divslid'+i; 
 var divStyle = document.getElementById(divname).style; 
 divStyle.display=(id==divname)?'block':'none'; 
 } 
} 
    </script></p>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox3">
<div class="left">
<h1>Lecteur mp3 1</h1>
<p>Cliquez sur les boutons<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/son1/son_1.swf" play="true" loop="True" menu="true"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/son1.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onclick="opendivslid('divslid1');"><img width="19" height="19" border="0" align="absmiddle" alt="Flash" src="http://www.ateliernumerique.com/images/icones/description.gif" />Voir le code</a></div>
<div style="display: none; float: left;" id="divslid1">
<p>son1 = new Sound();<br />
                                    son1.loadSound(&quot;mp3/son1.mp3&quot;);<br />
                                    son2 = new Sound();<br />
                                    son2.loadSound(&quot;mp3/son2.mp3&quot;);<br />
                                    son3 = new Sound();<br />
                                    son3.loadSound(&quot;mp3/son3.mp3&quot;);<br />
                                    max = 3;<br />
                                    son1.onLoad = function(success) {<br />
                                    son1.stop();<br />
                                    };<br />
                                    son = son1;<br />
                                    n = 1;<br />
                                    arret.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    };<br />
                                    lecture.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };<br />
                                    suivant.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    n++;<br />
                                    if (n&gt;max) {<br />
                                    n = 1;<br />
                                    }<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };<br />
                                    precedant.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    n--;<br />
                                    if (n&lt;1) {<br />
                                    n = max;<br />
                                    }<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Loading mp3</h1>
<p>Cliquez sur le bouton<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/loadings_mp3.swf" play="true" loop="True" menu="true"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img width="19" height="19" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/loadings_mp3.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a></div>
<div class="icone"><a onclick="opendivslid('divslid2');"><img width="19" height="19" border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/description.gif" alt="Flash" />Voir le code</a></div>
<div style="display: none; float: left;" id="divslid2">
<p>//Cr&eacute;ation de la variable Monson <br />
                                    var MonSon = new Sound();<br />
                                    //loading du fichier son.mp3<br />
                                    MonSon.loadSound(&quot;http://www.ateliernumerique.com/images/stories/flash/swf/mp3/son.mp3&quot;);<br />
                                    //Action du bouton<br />
                                    bt.onPress = function() {<br />
                                    //d&eacute;marrage du son<br />
                                    MonSon.stop();<br />
                                    MonSon.start();<br />
                                    };</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<hr id="system-readmore" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox5">
<div class="left">
<h1>lecteur mp3 2</h1>
<p>Cliquez sur les boutons<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/son1/son_2.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div style="display: none; float: left;" id="divslid3">son1 = new Sound();<br />
                                    son1.loadSound(&quot;mp3/son1.mp3&quot;);<br />
                                    son2 = new Sound();<br />
                                    son2.loadSound(&quot;mp3/son2.mp3&quot;);<br />
                                    son3 = new Sound();<br />
                                    son3.loadSound(&quot;mp3/son3.mp3&quot;);<br />
                                    max = 3;<br />
                                    son1.onLoad = function(success) {<br />
                                    son1.stop();<br />
                                    };<br />
                                    son = son1;<br />
                                    n = 1;<br />
                                    arret.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    };<br />
                                    lecture.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };<br />
                                    suivant.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    n++;<br />
                                    if (n&gt;max) {<br />
                                    n = 1;<br />
                                    }<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };<br />
                                    precedant.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    n--;<br />
                                    if (n&lt;1) {<br />
                                    n = max;<br />
                                    }<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    };<br />
                                    volume_30.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).setVolume(30);<br />
                                    };<br />
                                    volume_100.onPress = function() {<br />
                                    eval(&quot;son&quot;+n).setVolume(100);<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox4" style="padding-top: 10px;">
<div class="left">
<h1>Lecteur mp3 3</h1>
<p>Cliquez sur les boutons<embed width="260" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/son1/son_3.swf" play="true" loop="True" menu="true"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div style="display: none; float: left;" id="divslid5">// Pour chaque son que l'on souhaite faire jouer, <br />
                                    // On cr&eacute;er une valeur de type sound<br />
                                    // On attache a cette valeur un son que l'on charge depuis le dossier mp3<br />
                                    son1 = new Sound();<br />
                                    son1.loadSound(&quot;mp3/son1.mp3&quot;);<br />
                                    son2 = new Sound();<br />
                                    son2.loadSound(&quot;mp3/son2.mp3&quot;);<br />
                                    son3 = new Sound();<br />
                                    son3.loadSound(&quot;mp3/son3.mp3&quot;);<br />
                                    max = 3;<br />
                                    //////////loading<br />
                                    //on D&eacute;tecte la fin de chargement du premier son pour pouvoir le lancer<br />
                                    son1.onLoad = function(success) {<br />
                                    son1.stop();<br />
                                    };                           function gotonextsound() {<br />
                                    //on D&eacute;tecte la fin du son<br />
                                    eval(&quot;son&quot;+n).onSoundComplete = function() {<br />
                                    // On va chercher le son suivant en augmentant la valeur n de +1<br />
                                    n++;<br />
                                    // si n et superieur a &quot;max&quot; (le nombre maximum de mp3 il repasse a 1<br />
                                    if (n&gt;max) {<br />
                                    n = 1;<br />
                                    }<br />
                                    // On demarre le nouveau son<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    // On d&eacute;tecte la fin du son pour relancer le suivant<br />
                                    gotonextsound();<br />
                                    };<br />
                                    }<br />
                                    ///////Boutons de control<br />
                                    n = 1;<br />
                                    arret.onPress = function() {<br />
                                    // On arrete le son <br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    };                           lecture.onPress = function() {<br />
                                    // On arrete le son (si un son est d&eacute;ja lanc&eacute; il faut l'arreter)<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    // On relance le son <br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    // On d&eacute;tecte la fin du son pour relancer le suivant<br />
                                    gotonextsound();<br />
                                    };<br />
                                    suivant.onPress = function() {<br />
                                    // On arrete d'abord le son en train d'&ecirc;tre jouer<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    // On va chercher le son suivant en augmentant la valeur n de +1<br />
                                    n++;<br />
                                    // si n et superieur a &quot;max&quot; (le nombre maximum de mp3 il repasse a 1<br />
                                    if (n&gt;max) {<br />
                                    n = 1;<br />
                                    }<br />
                                    // On demarre le nouveau son<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    // On d&eacute;tecte la fin du son pour relancer le suivant<br />
                                    gotonextsound();<br />
                                    };<br />
                                    precedant.onPress = function() {<br />
                                    // On arr&ecirc;te d'abord le son en train d'&ecirc;tre jouer<br />
                                    eval(&quot;son&quot;+n).stop();<br />
                                    // On va chercher le son suivant en r&eacute;duisant la valeur n de -1<br />
                                    n--;<br />
                                    // si n et inf&eacute;rieur a 1 (le nombre maximum de mp3 il repasse au nombre max<br />
                                    if (n&lt;1) {<br />
                                    n = max;<br />
                                    }<br />
                                    // On d&eacute;marre le nouveau son<br />
                                    eval(&quot;son&quot;+n).start();<br />
                                    // On d&eacute;tecte la fin du son pour relancer le suivant<br />
                                    gotonextsound();<br />
                                    };<br />
                                    /////////Volume<br />
                                    barre.curseur.onPress = function() {<br />
                                    this.onMouseMove = function() {<br />
                                    //Le volume du son est d&eacute;finit par la coordonn&eacute;e y du clip curseur<br />
                                    //Cette coordon&eacute;e va de 0 &agrave; 100<br />
                                    eval(&quot;son&quot;+n).setVolume(100-this._y);<br />
                                    };<br />
                                    // On drag le clip curseur sur la coordon&eacute;es y de 0 &agrave; 100 (par rapport au centre du clip)<br />
                                    // et sur la cordonn&eacute;e x de 3<br />
                                    this.startDrag(0,3,100,3);<br />
                                    };<br />
                                    barre.curseur.onRelease = barre.curseur.onReleaseOutside=function () {<br />
                                    // On arr&ecirc;te l'action de stopDrag<br />
                                    this.stopDrag();<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td>&nbsp;</td>
<td valign="top">
<table width="100" height="150" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" id="sourceBox2">
<div class="left">
<h1>Bouton on/off</h1>
<p>Cliquez sur les boutons<embed width="260" height="150" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/sound1.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
</p></div>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<div id="icone"><a href="http://cours-internet.com/wp-login.php?redirect_to=/category/flash/sources-scripts/feed/">Connectez vous</a> pour lire la suite, ou <a href="http://cours-internet.com/wp-login.php?action=register">enregistrez vous</a> gratuitement .  La connexion vous permet d'avoir accès aux sources et aux vidéos.</div>
<div style="display: none; float: left;" id="divslid4">////Son numero 1<br />
                                    var MonSon1:Sound = new Sound();<br />
                                    MonSon1.loadSound(&quot;mp3/son1.mp3&quot;);<br />
                                    Btn1.onRelease = function() {<br />
                                    (s1) ? MonSon1.stop() : MonSon1.start();<br />
                                    (s1) ?  this.prevFrame():this.nextFrame();<br />
                                    s1 = !s1;<br />
                                    };<br />
                                    ////Son numero 2<br />
                                    var MonSon2:Sound = new Sound();<br />
                                    MonSon2.loadSound(&quot;mp3/son2.mp3&quot;);<br />
                                    Btn2.onRelease = function() {<br />
                                    (s2) ? MonSon2.stop() : MonSon2.start();<br />
                                    (s2) ? this.prevFrame():this.nextFrame();<br />
                                    s2 = !s2;<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/sons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Couleurs et TweenRGB</title>
		<link>http://cours-internet.com/couleurs-et-tweenrgb/</link>
		<comments>http://cours-internet.com/couleurs-et-tweenrgb/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 06:31:37 +0000</pubDate>
		<dc:creator>bchabrol</dc:creator>
				<category><![CDATA[Scripts (AS2)]]></category>
		<category><![CDATA[animation couleur flash]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[import mw.transitions]]></category>
		<category><![CDATA[source flash]]></category>
		<category><![CDATA[TweenRGB]]></category>

		<guid isPermaLink="false">http://ateliernumerique.com/cours-video/?p=446</guid>
		<description><![CDATA[








Couleur et tweenRGB
Survoler le rectangle avec la souris

&#160;




 
function opendivcolor(id) { 
 for (i=1;i]]></description>
			<content:encoded><![CDATA[<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td valign="top">
<table height="150" cellspacing="0" cellpadding="0" border="0" width="100">
<tbody>
<tr>
<td valign="top" id="sourceBox">
<div class="left">
<h1>Couleur et tweenRGB</h1>
<p>Survoler le rectangle avec la souris</p>
<p><embed height="150" width="260" menu="true" loop="True" play="true" src="http://www.ateliernumerique.com/images/stories/flash/swf/couleur.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
<p>&nbsp;</p>
</p></div>
</td>
</tr>
<tr>
<td valign="top"><script type="text/javascript"> 
function opendivcolor(id) { 
 for (i=1;i<=9;i++) { // so you can add more than 2 
 var divname = 'divcolor'+i; 
 var divStyle = document.getElementById(divname).style; 
 divStyle.display=(id==divname)?'block':'none'; 
 } 
} </p>
<p></script></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table cellspacing="3" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td>
<div id="icone"><img height="19" align="absmiddle" width="19" src="http://www.ateliernumerique.com/images/icones/flash.gif" alt="Flash" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/couleur.zip"><img border="0" align="absmiddle" src="http://www.ateliernumerique.com/images/icones/download.gif" alt="" />T&eacute;l&eacute;chargez</a><a onClick="opendivcolor('divcolor1');"><br />
                                    </a></div>
<div style="display: none; float: left;" id="divcolor1">//Installez la classe TwennRGB pour faire tourner l&#8217;animation<br />
                                    //&quot;http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;loc=en_us&amp;extid=1160970&quot;<br />
                                    import mx.transitions.TweenRGB;<br />
                                    import mx.transitions.easing.*;<br />
                                    MonClip.onRollOver = function() {<br />
                                    var tween_rgb = new TweenRGB(MonClip, &quot;&quot;, Regular.easeInOut, 0xFFCC00, 0xD20075, 1, true);<br />
                                    };<br />
                                    MonClip.onRollOut = function() {<br />
                                    var tween_rgb = new TweenRGB(MonClip, &quot;&quot;, Regular.easeInOut, 0xD20075, 0xFFCC00, 1, true);<br />
                                    };</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table height="150" cellspacing="0" cellpadding="0" border="0" width="260">
<tbody>
<tr>
<td valign="top" id="sourceBox2">
<div class="left"><embed height="150" width="260" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.ateliernumerique.com/images/stories/flash/swf/degrade_aleatoire.swf" play="true" loop="true" menu="true"></embed></div>
</td>
</tr>
<tr>
<td valign="top"><script type="text/javascript"> </p>
<p>              </script></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table cellspacing="3" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td valign="top">
<div id="icone"><img height="19" border="0" align="absmiddle" width="19" alt="Flash" src="http://www.ateliernumerique.com/images/icones/flash.gif" />Flash 8</div>
<div id="icone"><a href="http://www.ateliernumerique.com/images/stories/flash/sources/degrade_aleatoire.zip"><img height="19" border="0" align="absmiddle" width="19" alt="Flash" src="http://www.ateliernumerique.com/images/icones/download.gif" />T&eacute;l&eacute;chargez</a><a onClick="opendivcolor('divcolor2');"><br />
                        </a></div>
<div style="display: none; float: left;" id="divcolor2">import mx.transitions.Tween;<br />
                        import mx.transitions.easing.*;<br />
                        bkg = this.createEmptyMovieClip(&quot;myBkg&quot;, this.getNextHighestDepth());<br />
                        setGradient(bkg,90,0xffffff,0xffffff);<br />
                        tweenGradientBkg(bkg,0xffffff*Math.random(),0xffffff*Math.random(),1);<br />
                        function tweenGradientBkg(what:MovieClip, c1:Number, c2:Number, time:Number) {<br />
                        what.percent.stop;<br />
                        delete what.percent;<br />
                        var holder:Object = new Object();<br />
                        holder.percent = 0;<br />
                        var red:Number = what.firstColor &gt;&gt;&gt; (4*4) &amp; 0xFF;<br />
                        var green:Number = what.firstColor &gt;&gt;&gt; (2*4) &amp; 0xFF;<br />
                        var blue:Number = what.firstColor &gt;&gt;&gt; (0*4) &amp; 0xFF;<br />
                        var toRed:Number = c1 &gt;&gt;&gt; (4*4) &amp; 0xFF;<br />
                        var toGreen:Number = c1 &gt;&gt;&gt; (2*4) &amp; 0xFF;<br />
                        var toBlue:Number = c1 &gt;&gt;&gt; (0*4) &amp; 0xFF;<br />
                        var redDiff:Number = (toRed-red)/100;<br />
                        var greenDiff:Number = (toGreen-green)/100;<br />
                        var blueDiff:Number = (toBlue-blue)/100;<br />
                        /////// 	var red2:Number = what.secondColor &gt;&gt;&gt; (4*4) &amp; 0xFF;<br />
                        var green2:Number = what.secondColor &gt;&gt;&gt; (2*4) &amp; 0xFF;<br />
                        var blue2:Number = what.secondColor &gt;&gt;&gt; (0*4) &amp; 0xFF;<br />
                        var toRed2:Number = c2 &gt;&gt;&gt; (4*4) &amp; 0xFF;<br />
                        var toGreen2:Number = c2 &gt;&gt;&gt; (2*4) &amp; 0xFF;<br />
                        var toBlue2:Number = c2 &gt;&gt;&gt; (0*4) &amp; 0xFF;<br />
                        var redDiff2:Number = (toRed2-red2)/100;<br />
                        var greenDiff2:Number = (toGreen2-green2)/100;<br />
                        var blueDiff2:Number = (toBlue2-blue2)/100;<br />
                        what.percent = new Tween(holder, &quot;percent&quot;, None.easeNone, 0, 100, time, true);<br />
                        what.percent.onMotionChanged = function() {<br />
                        var r = red+(redDiff*holder.percent);<br />
                        var g = green+(greenDiff*holder.percent);<br />
                        var b = blue+(blueDiff*holder.percent);<br />
                        what.firstColor = (r &lt;&lt; (4*4)) | (g &lt;&lt; (2*4)) | (b &lt;&lt; (0*4));<br />
                        var r2 = red2+(redDiff2*holder.percent);<br />
                        var g2 = green2+(greenDiff2*holder.percent);<br />
                        var b2 = blue2+(blueDiff2*holder.percent);<br />
                        what.secondColor = (r2 &lt;&lt; (4*4)) | (g2 &lt;&lt; (2*4)) | (b2 &lt;&lt; (0*4));<br />
                        setGradient(what,90,what.firstColor,what.secondColor);<br />
                        };<br />
                        what.percent.onMotionFinished = function() {<br />
                        tweenGradientBkg(bkg,0xffffff*Math.random(),0xffffff*Math.random(),1);<br />
                        };<br />
                        }<br />
                        function setGradient(bkg:MovieClip, angle:Number, from:Number, to:Number, alfa1:Number, alfa2:Number, rat1:Number, rat2:Number) {<br />
                        bkg.firstColor = from;<br />
                        bkg.secondColor = to;<br />
                        with (bkg) {<br />
                        var angle:Number = angle || 90;<br />
                        var wSize:Number = Stage.width;<br />
                        var hSize:Number = Stage.height;<br />
                        var fillType:String = &quot;linear&quot;;<br />
                        var colors:Array = [from, to];<br />
                        var alphas:Array = [alfa1 || 100, alfa2 || 100];<br />
                        var ratios:Array = [rat1 || 0, rat2 || 255];<br />
                        var matrix:Object = {matrixType:&quot;box&quot;, x:0, y:0, w:wSize, h:hSize, r:(angle/180*Math.PI)};<br />
                        lineStyle(1,0xFFFFFF,0);<br />
                        beginGradientFill(fillType,colors,alphas,ratios,matrix);<br />
                        lineTo(wSize,0);<br />
                        lineTo(wSize,hSize);<br />
                        lineTo(0,hSize);<br />
                        lineTo(0,0);<br />
                        endFill();<br />
                        }<br />
                        }</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://cours-internet.com/couleurs-et-tweenrgb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
