Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-21-2007, 12:32 PM   PM User | #1
tomyknoker
Regular Coder

 
Join Date: Mar 2006
Posts: 459
Thanks: 3
Thanked 0 Times in 0 Posts
tomyknoker is an unknown quantity at this point
loadClip Target Issue

Hi,

The following code loads 1 0f 6 random image as soon as my movie is played and works fine no probs

Code:
var myClip = this.createEmptyMovieClip("mcl", this.getNextHighestDepth());
var myLoader = new MovieClipLoader();
var myListener = new Object();
var myTest = random(6) + ".jpg";
myListener.onLoadInit = function () {
trace("load init");
};

myListener.onLoadInit = function (mcl) {
mcl._alpha=0;
mcl.onEnterFrame=function(){
mcl._alpha +=15;
 
if(mcl._alpha >=100){
delete mcl.onEnterFrame;
}
}
};

myLoader.addListener(myListener);
myLoader.loadClip(myTest,myClip);
Then iniside a movieclip further along the timeline I have this, as I want a specific image to load into the movieclip

Code:
var myTest = 5 + ".jpg";
myLoader.loadClip(myTest,_root.myClip);
But nothing happens no image will load when it gets to that point... I thought because the second part is inside a movieclip it couldn't target it but shouldn't
Code:
_root
... Any ideas?
tomyknoker is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:59 AM.


Advertisement
Log in to turn off these ads.