An ease, peaceful city fading preloading, which gives your site’s visitors a comfortable feeling while them entered in.
Easy use and flexible adjust with xml.
XML Node Explanation
<effect>
<!--the argument for the effect-->
<rangew>1024</rangew>
<rangeh>128</rangeh>
<building>
<!--the generated building width limit-->
<wmax>40</wmax>
<wmin>5</wmin>
<!--the generated building height limit-->
<hmax>125</hmax>
<hmin>10</hmin>
</building>
<!--1:use perlin,0:not use perlin-->
<useperlin>1</useperlin>
</effect>
<!--The words list for display,just fill the word you want show,
no limit of the words number-->
<words scalemax="1.6" scalemin="0.7"><!--the scale range of the word in visual-->
<word>Company Name</word>
<word>Your Slogan</word>
<word>City Fade</word>
</words>
<!--the tween frames for word show-->
<wordsshowframestween>12</wordsshowframestween>
<!--the tween frames for the percent data show-->
<percentshowframestween>12</percentshowframestween>
<!--the dealy fade out argument-->
<delayshowtime>5</delayshowtime>
Easy Use Sample
//the stage’s align and scalemode setting
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
//do the init
var cityFadeEffect:CityFadeEffect = new CityFadeEffect();
cityFadeEffect.trigger("xmls/config.xml");
addChild(cityFadeEffect);
this.addEventListener("CITY_FADE_END",cityFadeListener);
//in the loading progress event
function progressProc(evt:ProgressEvent):void
{
//update the progress number
cityFadeEffect.loadedPercent= Math.floor(Number(evt.bytesLoaded)/Number(evt.bytesTotal)*100);
}
function cityFadeListener(evt:Event):void
{
//fade in your main content
}
Credits
The author of the great preview audio which been used here is NikiN. If you are interested with it, you can go to below link to buy:
http://audiojungle.net/item/inner-peace/87210
Feedbacks
If you have problems using this city fade preloading or want to modify the code for your own specific needs, just leave a comment here let me know.