<?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>Flash actionscript &#187; preloader</title>
	<atom:link href="http://blog.flash-actionscript.com/tag/preloader/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flash-actionscript.com</link>
	<description>Tutoriaux, trucs et astuces sur actionscript, papervision 3D, fms ... Un peu de tout sur l'univers flash.</description>
	<lastBuildDate>Thu, 09 Dec 2010 10:56:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[Actionscript 2] Preloader une animation flash</title>
		<link>http://blog.flash-actionscript.com/actionscript-2-preloader-une-animation-flash/</link>
		<comments>http://blog.flash-actionscript.com/actionscript-2-preloader-une-animation-flash/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 16:36:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 2]]></category>
		<category><![CDATA[Code Source]]></category>
		<category><![CDATA[Pense bête]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[preloader]]></category>

		<guid isPermaLink="false">http://blog.flash-actionscript.com/?p=112</guid>
		<description><![CDATA[Je vous avais fait un article sur le préchargement d&#8217;une animation flash en ActionScript 3. Et dans la continuité de mes articles sur l&#8217;ActionScript 2, voilà comment preloader une animation flash dans ce langage. stop(); var mDate:Date = new Date( ) ; if ( !t &#60; 0 ) { t = mDate.getTime( ) ; } [...]]]></description>
			<content:encoded><![CDATA[<p>Je vous avais fait un article sur le <a title="Preloader une animation flash en actionscript 3" href="http://blog.flash-actionscript.com/actionscript-3-code-pour-preloader-une-animation-flash/">préchargement d&#8217;une animation flash en ActionScript 3</a>. Et dans la continuité de mes <a title="setInterval et clearInterval en flash actionscript" href="http://blog.flash-actionscript.com/actionscript-2-les-fonctions-setinterval-et-clearinterval-pour-creer-un-timer-une-pause-en-flash/">articles sur l&#8217;ActionScript 2</a>, voilà comment preloader une animation flash dans ce langage.</p>
<pre class="brush: js">stop();

var mDate:Date = new Date( ) ;
if ( !t &lt; 0 ) {
	t = mDate.getTime( ) ;
}

var bytesTotal:Number = this.getBytesTotal( ) ;

this.onEnterFrame = function( ) {
	var tauxChargement:Number = this.getBytesLoaded( ) / bytesTotal * 100 ;
	trace( &amp;quot;Chargement : &amp;quot; + Math.round( tauxChargement ) + &amp;quot; %&amp;quot; ) ;
	if ( tauxChargement == 100 ) {
		delete this.onEnterFrame;
		//code a faire une fois le chargement termine.
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.flash-actionscript.com/actionscript-2-preloader-une-animation-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Actionscript 3] Code pour preloader une animation flash</title>
		<link>http://blog.flash-actionscript.com/actionscript-3-code-pour-preloader-une-animation-flash/</link>
		<comments>http://blog.flash-actionscript.com/actionscript-3-code-pour-preloader-une-animation-flash/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 17:12:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Pense bête]]></category>
		<category><![CDATA[loaderInfo]]></category>
		<category><![CDATA[preloader]]></category>

		<guid isPermaLink="false">http://blog.flash-actionscript.com/?p=62</guid>
		<description><![CDATA[La classe loaderInfo vous permet de faire un preloader en actionscript 3. Le code est assez simple.]]></description>
			<content:encoded><![CDATA[<p>La classe loaderInfo vous permet de faire un preloader en actionscript 3. Le code est assez simple et je pense que si vous avez suivi mes précédents articles, vous n&#8217;aurez pas de mal à le comprendre.</p>
<pre class="brush: js">var debutChargement:Number = getTimer( ) ;
var tempsChargement:Number ;

loaderInfo.addEventListener( ProgressEvent.PROGRESS, fctPreload ) ;
loaderInfo.addEventListener( Event.INIT, fctInitLoad ) ;
loaderInfo.addEventListener( Event.COMPLETE, fctLoadComplete ) ;

function fctPreload( pEvt:ProgressEvent ):void {
	pourcentage = Math.round( pEvt.bytesLoaded / pEvt.bytesTotal * 100 ) ;

	preloadTxt.text = String( pourcentage ) ;

	if ( pourcentage == 100 || pEvt.bytesLoaded == pEvt.bytesTotal ) {
		tempsChargement = getTimer( ) - debutChargement ;
		pourcentage = 0 ;
		loaderInfo.removeEventListener( ProgressEvent.PROGRESS, fctPreload ) ;
	}
}

function fctInitLoad( event:Event ):void {
	loaderInfo.removeEventListener( Event.INIT, fctInit ) ;
	loaderInfo.addEventListener( ProgressEvent.PROGRESS, fctPreload ) ;
}

function fctLoadComplete( event:Event ) {
	// Action a faire une fois que le flash est loadé.
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.flash-actionscript.com/actionscript-3-code-pour-preloader-une-animation-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

