-
[RESOLVED] IE 8 problem
Hello, i'm testing testing a new web site http://www.deepvfx.com/test I've created a preloader into the about section with the tweening platform 11 and the preloader works in Firefox And Chrome but in IE8 does not, then, created a basic preloader with plain as3 and it works, posting the code hoping to find a solution.
Thanks for your help
PHP Code:
stop();
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.TimelineMax;
//This array will contain all the preloader circles
var circles:Array = [c1,c2,c3,c4,c5];
//Listen for the loading progress
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
//This function is called as the loading progresses
function progressHandler(e:ProgressEvent):void {
//Check how much has been loaded (in percentages)
var loadedPercentage:Number = (e.bytesLoaded * 100 / e.bytesTotal);
//If over 20% is loaded, tween the first circle if it hasn't been tweened yet.
if (loadedPercentage>20&&! circles[0].tweened) {
//Tween the circle
TweenMax.to(circles[0], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}});
}
//If over 40% is loaded, tween the second circle if it hasn't been tweened yet.
if (loadedPercentage>40&&! circles[1].tweened) {
//Tween the circle
TweenMax.to(circles[1], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}});
}
//If over 60% is loaded, tween the third circle if it hasn't been tweened yet.
if (loadedPercentage>60&&! circles[2].tweened) {
//Tween the circle
TweenMax.to(circles[2], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}});
}
//If over 80% is loaded, tween the fourth circle if it hasn't been tweened yet.
if (loadedPercentage>80&&! circles[3].tweened) {
//Tween the circle
TweenMax.to(circles[3], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}});
}
//If 100% is loaded, tween the fifth circle if it hasnn't been tweened yet.
if (loadedPercentage==100&&! circles[4].tweened) {
//Tween the circle and call the function circlesTweened() when the tween is complete (this is the last circle).
TweenMax.to(circles[4], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}, onComplete: circlesTweened});
}
}
//This function is called when the cirlces have been tweened (the image is loaded)
function circlesTweened():void {
//Loop through the circles
for (var i = 0; i < circles.length; i++) {
//Tween the circles to the left side of the stage.
//Call the function circleLeft() when the tween is finished
TweenMax.to(circles[i], 0.5, {delay: i * 0.1, x: -200, alpha: 0, onComplete: circleLeft, onCompleteParams: [circles[i]]});
}
}
//This function is called when a circle is animated to the left side.
function circleLeft(circle:Circulo):void {
//Check if the circle is the last one (most right)
if (circle==circles[4]) {
nextFrame();
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|