Code:
// Set _alpha properties to 0 so we can control when things are shown; looks more organized
panel["symbol"+i]._alpha = 0;
panel["symbol"+i]["thumb"]["image"]._alpha = 0;
Sorrie, i saw the wrong line medy
. its the panel["symbol"+i]._x that controls the sizes. right?
Did you add the loadContainer(); function call to the lv2.onData function?
hmm at the beginning when i edit this line, it "works", the marquee is going over the mascots. As i was deleting other lines, well i only see the the mascots. Okie, the script is posted below.
Code:
#include "mc_tween2.as"
var images:Array = [];
var urls:Array = [];
var lv:LoadVars = new LoadVars();
var lv2:LoadVars = new LoadVars();
lv.onData = function(src:String) {
images = src.split("\r\n"); }
lv2.onData = function(src:String) {
urls = src.split("\r\n");
loadContainers( );
}
lv.load("logos.txt");
lv2.load("urls.txt");
mascots.onRollOver = lightUp;
function lightUp() {
mascots.beibei.colorTo(0x4f96c4, .5, "easeOutQuad");
mascots.jingjing.colorTo(0x70c63d, .5, "easeOutQuad");
mascots.huanhuan.colorTo(0xff000e, .5, "easeOutQuad");
mascots.yingying.colorTo(0xfd7100, .5, "easeOutQuad");
mascots.nini.colorTo(0x008536, .5, "easeOutQuad");
mascots.blurTo(15,2,.5, "easeInOutQuad", .25);
mascots.alphaTo(0, .5, "linear", .25, function() {
loadContainers();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
});
}
this.createEmptyMovieClip("panel", this.getNextHighestDepth());
var count:Number = 0;
function loadContainers() {
for(i=0;i<images.length-1;i++) {
var symbol:MovieClip = panel.createEmptyMovieClip("symbol"+i, i);
var thumb:MovieClip = panel["symbol"+i].createEmptyMovieClip("thumb", i);
var image:MovieClip = panel["symbol"+i]["thumb"].createEmptyMovieClip("image", 30+i);
// You can go here. Position each symbol
panel["symbol"+i]._x = 202*i
panel["symbol"+i]._y = Stage.height/4;
panel["symbol"+i].alphaTo(100, .25, "easeOutQuad", (.1*i));
// MovieClipLoader
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadComplete = function() {
count++;
if(count ==images.length-1) {
showThumbs();
}
}
mcl.loadClip("events/"+images[i], panel["symbol" +i]["thumb"]["image"]);
mcl.addListener(mclL);
panel["symbol"+i].id = i;
panel["symbol"+i].onRelease = function() {
getURL(urls[this.id]);
}
}
}
function showThumbs() {
for(i=0;i<images.length-1;i++) {
var symbol = panel["symbol"+i].thumb.image
var delay = (0.1*i)+.25
symbol.alphaTo(100, .5, "easeOutQuad", delay);
}
beginScroll();
}
function beginScroll() {
var limit = Stage.width - panel._width
var time = panel._width / 150;
if(panel._x <= limit) {
panel.roundedXSlideTo(0, time, "linear", .25, beginScroll);
}
else {
panel.roundedXSlideTo(limit, time, "linear", .25,beginScroll);
}
panel.onRollOver = pauseResume;
}
function pauseResume() {
delete this.onRollOver;
this.pauseTween("_x");
var x = panel.getBounds(_root);
this.onEnterFrame = function() {
if(_xmouse<x.xMin || _xmouse>x.xMax || _ymouse<x.yMin || _ymouse>x.yMax) {
this.resumeTween("_x");
this.onRollOver = pauseResume;
delete this.onEnterFrame;
}
}
}
i delete all the comments& hopefully never delete any codes, if you have a hard time reading it let me know, i edit my post again asap. Maybe i need to delete the .mascots codes too, to make the whole marquee works.
note: I only change the codes ( file names etc, i leave me as the same) & eh if you find any errors which i forgetten to edit, change etc feel free to say in BOLD
var mclL, what that? i thought that was only something called mcl but i never heard of mclL yet
Bookmarks