|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: |
import fl.transitions.Tween;
import fl.transitions.easing.*;
var imageX:XML;
var imageList:XMLList;
var preload:preloader = new preloader();
var sortArray:Array = new Array();
var zSpacing:Number = 0;
var currentImage:Number;
var currentMaskee:MovieClip;
var currentMask:MovieClip;
var picTimer:Timer = new Timer(5000);
picTimer.addEventListener(TimerEvent.TIMER, nextPic);
var images_mc:MovieClip = new MovieClip();
images_mc.visible = false;
addChild(images_mc);
var req:URLRequest = new URLRequest("images.xml");
var imageLoader:URLLoader = new URLLoader();
imageLoader.addEventListener(Event.COMPLETE, onComplete);
imageLoader.load(req);
root.transform.perspectiveProjection.projectionCenter = new Point(0,0);
function onComplete(e:Event):void
{
imageX = new XML(imageLoader.data);
imageList = new XMLList(imageX.image);
for (var i:uint=0; i < imageList.length(); i++)
{
var pic:Picture = new Picture(imageList[i].url);
pic.x = 0;
pic.y = 0;
pic.z = i * zSpacing;
images_mc.addChild(pic);
sortArray.push(pic);
}
sortArray.sortOn("z", Array.NUMERIC | Array.DESCENDING);
for (var j:uint = 0; j<sortArray.length; j++)
{
images_mc.setChildIndex(sortArray[j],j);
}
currentImage = sortArray.length - 1;
preload.x = stage.stageWidth/2 - preload.width/2;
preload.y = stage.stageHeight/2 - preload.height/2;
preload.bar_mc.scaleX = 0;
addChild(preload);
preload.addEventListener(Event.ENTER_FRAME, preloading);
}
function preloading(e:Event):void
{
var totalPct:Number = 0;
for (var i:uint = 0; i < sortArray.length; i++)
{
totalPct += sortArray[i].pctLoaded;
}
var avg:Number = totalPct / sortArray.length;
preload.bar_mc.scaleX = avg;
if (avg >= 1)
{
images_mc.visible = true;
images_mc.mask(picMask);
preload.removeEventListener(Event.ENTER_FRAME, preloading);
removeChild(preload);
// Change pictures every 5 seconds
picTimer.start();
}
}
function maskPicture(e:Event):void
{
images_mc.mask(picMask);
}
function nextPic(e:TimerEvent):void
{
for (var i:uint=0; i<sortArray.length; i++)
{
if (i == currentImage)
{
sortArray[i].z = (sortArray.length-1)*zSpacing;
images_mc.setChildIndex(sortArray[i],0);
}
else
{
var startZ:Number = sortArray[i].z;
var endZ:Number = startZ - zSpacing;
new Tween(sortArray[i],"z",Regular.easeOut,startZ,endZ,12,false);
}
}
if (currentImage > 0)
{
currentImage--;
}
else
{
currentImage = sortArray.length - 1;
}
}
function onTick(event:TimerEvent):void
{
// displays the tick count so far
// The target of this event is the Timer instance itself.
trace("tick " + event.target.currentCount);
}
|
Advertisement
| Hall of Fame |