Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




MovieClipLoader



Hi. Sorry about my english, if i offense someone is because i learn the wrong word.

I donīt know how much you read this kynd of posts, but i search in foruns, tutoriais, and everywere i know but still canīt make a progress bar react to MovieClipLoader.

Iīm trying to do something like this:


ActionScript Code:
myListener = new Object();myListener.onLoadStart = function (target_mc:MovieClip) {    var loadProgress = my_mcl.getProgress(target_mc);    target_mc.attachMovie("bar","bar",1);}myListener.onLoadProgress = function (target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {    // make bar "grow" ( target_mc.bar._xscale blablabla )}my_mcl = new MovieClipLoader();my_mcl.addListener(myListener);my_mcl.loadClip("teste1.jpg",_root.alvo1);my_mcl.loadClip("teste2.swf", _root.alvo2);my_mcl.loadClip("teste3.swf", _root.alvo3);

Itīs just a test, and works fine, but i canīt set a progress bar for wich movie loaded.

the "real" question is, how to reference and attach a progressBar for wich movie i want to load. The attachMovie i used donīt work.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 06-06-2005, 08:40 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Preloading A MovieClipLoader() With A MovieClipLoader() Inside
Is it posible to make a preloader of a SWF that loads an external JPG?

Thanks

Preloading A MovieClipLoader() With A MovieClipLoader() Inside
Is it posible to make a preloader of a SWF that loads an external JPG?

Thanks

MovieClipLoader
Hi,

I try to load an image into a nested clip so I can make it react to a onRollOver. With the MovieClipLoader object that doest't seem to work.

Why why why??

thanks,
Axel

MovieClipLoader
hi,
In 2004 the MovieClipLoader object doesn't load an image into a nested movieClip. Why is that? I need that because I want the loaded image to have onRollOver event attached. Don't tell me I have to use the loadMovie command again.

anyone
p-p-p-please

MovieClipLoader()
HI,

I'm trying this function for the first time, and I can't make the "onLoadComplete" function work properly.

I can see my movie loaded right, but "loaded" doesn't appear in my output window. Anyone have a clue about what I'm doing wrong?



Code:

var mc = new MovieClipLoader();

myListener.onLoadComplete = function() {
trace("loaded");
};

mc.addListener(myListener);
mc.loadClip("fr/100accueil.swf", "contenu");
Thanks! Julie

Help With MovieClipLoader
i'm trying to make a MovieClipLoader. this is the code i'm using:

var fadeInterval:Object = new Object();
fadeCoverInt = setInterval(functionName, interval, targetMC);
function fadeCoverIn(targetMC) {
targetMC._alpha = targetMC._alpha+5;
if (targetMC._alpha>95) {
targetMC._alpha = 100;
removeMovieClip("holder"+(n-1));
clearInterval(fadeCoverInt);
}
}
//
var loadCoverListener:Object = new Object();
loadCoverListener.onLoadStart = function(targetMC:MovieClip) {
loadStatus._xscale = 0;
loadStatus._visible = true;
};
loadCoverListener.onLoadProgress = function(targetMC:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
loadStatus.bar._xscale = Math.round(bytesLoaded/bytesTotal*100);
};
loadCoverListener.onLoadComplete = function(targetMC:MovieClip) {
loadStatus._visible = false;
setInterval(fadeCoverIn, 10, targetMC);
};
loadCoverListener.onLoadInit = function(targetMC:MovieClip) {
targetMC._alpha = 0;
targetMC._x = 5;
targetMC._y = 60;
targetMC.setMask(mask);
};
//
var loadCover:MovieClipLoader = new MovieClipLoader();
loadCover.addListener(loadCoverListener);
//
n = 1;
this.createEmptyMovieClip("holder"+n, n);
loadCover.loadClip("images/covers/cover"+(random(6)+1)+".jpg", "holder"+n);
//
stop();

i also made a button so that it loads different images randomly.

the problem that i'm having is that the loadStatus.bar scale doesnt seem to change along with the progression with the image loading.
also when i press the button to load the other pics. the loadStatus movie clip doesn't appear again.
what am i doing wrong here??

MovieClipLoader
hi,

I'm loading jpgs from an array into a mc on the stage, but I'd like to use the movieClipLoader class instead of what I'm using now (loadMovie). loadMovie is working fine, but I'd like to do things that movieClipLoader lets you to do (like do functions when "onLoadStart" happens and so on).

//It's just a normal array setup right in the code

arrayrow=[
["../pics/Nicholas.jpg","Here's Nicholas","King","N","_","jpg","0"],
["../pics/BM.jpg","BM","King","N","_","jpg","0"],
["../pics/Jen","_","King","N","_","jpg","0"],
["../pics/Stores.jpg","Shopping","King","N","_","jpg","0"],
// .........
["../pics/church.jpg","Voice","King","N","_","swf","0"]
];

//and this is my loader:

if (TargetIN._alpha<10) {

loadMovie((arrayrow[counternumber-1][0]), TargetIN);
CurrentName = (arrayrow [counternumber-1][1]);
Street1 = (arrayrow[counternumber-1] [2]);
StreetDirection = (arrayrow [counternumber-1][3]);
//..and so on...


This works fine with loadMovie, but when I try movieClipLoader, it loads nothing:

var my_mcl:MovieClipLoader = new MovieClipLoader ();

//then to replace the "loadMovie" with "loadClip":
if (TargetIN._alpha<10) {

my_mcl.loadClip((arrayrow[counternumber-1][0]), TargetIN);
CurrentName = (arrayrow [counternumber-1][1]);
Street1 = (arrayrow[counternumber-1] [2]);
StreetDirection = (arrayrow [counternumber-1][3]);
//..and so on...


It works the first way but not the second way. Don't know whats not right here.

thanks for your help

Help With Moviecliploader
I was wondering if someone could tell me what I'm doing wrong in the following chunk of code. I'm trying to set an onRelease to each dynamically attached movie clip.

Also, this code loads the same image over and over again within the for loop. cardNum is always different if I do a trace on it within the loop, so I'm not sure what's up there either...


Code:
myXMLData = new LoadVars();
myXMLData.flashIdentity = "___";
myXMLData.question = "getCategories";

myCategoryReplyXML = new XML();
myCategoryReplyXML.ignoreWhite = true;
myCategoryReplyXML.onLoad = myOnLoad;

myXMLData.sendAndLoad("http://www.___.com/service.php", myCategoryReplyXML);

myScrollPane.contentPath = "holder";
var sContent:MovieClip = myScrollPane.content;

myMCL = new MovieClipLoader();
myListener = new Object();
myMCL.addListener(myListener);

myListener.onLoadComplete = function(targetMC)
{
targetMC.onRelease = function()
{
trace ("HIT");
}
}


function myOnLoad(success:Boolean) {
if(success){

xmlNode = this.firstChild;
total = xmlNode.childNodes[0].childNodes.length;

depth = 10;
y = 40;

for (i=0; i<total; i++) {

cardNum = xmlNode.childNodes[0].childNodes[i].attributes.value;

var aClip:MovieClip = sContent.attachMovie("cardButton", "attachedClip_" + i, depth);
myMCL.loadClip("images/category_source/"+ cardNum +".jpg" , "attachedClip_" + i);
aClip._x = 60;
aClip._y = y;

depth+=1;
y+= 80;

}

}
}

Need Some MovieClipLoader() Help...
i am trying to use MovieCLipLoader (which i have not used before) to load external files into my main. onLoadComplete i want to trigger a fade in, but if already file viewing is at _alpha = 100, fade out, then load the next swf file and fade it in.

I'm having trouble because of how i set up the menu.. i don't know where to place the MovieClipLoader script. I can make it work in a generic stripped down test, but when i have to mesh it in with the menu script, i get confused.

ok.. menu is set up with different flags to trigger different menu actions, the btn mc's set those flags. this is contained with those mc's (instance name bg_mc) this all worked fine when i was using a "loader" mc with transitions in and out.. but all i need is a fade, and i want to be able to use the MovieClipLoader listeners.
Code:
this.onRollOver = function() {
_parent.selectItem(id);
};
//
this.onRollOut = bg_mc.onReleaseOutside=function () {
_parent.deselectItem(id);
};
//
this.onPress = function() {
_parent.clickItem(id);
clickedItem = itemId;
//trace(this)
};
then this is in the main menu mc to control the visuals:
Code:
function selectItem(itemId) {
growTime = 0;
selectMe = itemId;
totalWidth = maxWidth+(items_arr.length)*(minWidth+space)-space;
}
//--------------------------------------------------
function deselectItem(itemId) {
growTime = 0;
selectMe = clickedItem;
}
//--------------------------------------------------
function clickItem(itemId) {
if (itemId != clickedItem) {
clickedItem = itemId;
_root.LoadMe = itemId;
//this relates to a variable set in the first frame of main timeline
//to call the proper movie. i.e. if itemId = 0, it loads "section0.swf"
trace("Load Me ---> : section "+_root.LoadMe);
}
}

I tried doing the following (with a million variations) and no success:

Code:
function clickItem(itemId) {
if (itemId != clickedItem) {
clickedItem = itemId;
_root.LoadMe = itemId;
//this relates to a variable set in the first frame of main timeline
//to call the proper movie. i.e. if itemId = 0, it loads "section0.swf"
if (_root.container._alpha == 0) {
var loadListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
mcLoader.loadClip("section"+_root.LoadMe+".swf", _root.container);
loadListener.onLoadComplete = function() {
trace("Begin Fade In...");
_root.container.onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>=100) {
this._alpha = 100;
delete (this.onEnterFrame);
}
};
};
} else if (_root.container._alpha == 100) {
_root.container.onEnterFrame = function() {
this._alpha -= 10;
if (this._alpha<=0) {
this._alpha = 0;
delete (this.onEnterFrame);
trace("Fade Out...");
var loadListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
mcLoader.loadClip("section"+_root.LoadMe+".swf", _root.container);
loadListener.onLoadComplete = function() {
_root.container.onEnterFrame = function() {
this._alpha += 10;
if (this._alpha == 0) {
this._alpha = 100;
delete (this.onEnterFrame);
trace("Fade In...");
}
};
};
}
};
}
trace("Load Me ---> : section "+_root.LoadMe);
}
}
also tried create the movieClipLoader in the _root timeline, instead of within the menu but that didn't work either... I'm stuck..

can anyone help me out? would it be better if i used a mask and just told that to play() to fade in and out?

edit:
it actually starts to work properly it will fade on swf in to about 29% (according to the trace i did) but then it won't load another movie, or fade out.. i just can't make fade all the way in...

Moviecliploader Help
Hello I am newby ActionScript peer,

I am building a preloader for my flash intro.
Inside my preloader I want to load my intro.swf. But the problem is that the movie starts playing before the download is complete. I tried it on a JPG and it works perfect. Somehow I have the feeling that I missed something.

Here is the AS;

var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myMCL.addListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop(loaded);//progressBar contains 100 frames
}

myListener.onLoadInit = function (target_mc:MovieClip) {
progressBar._visible = false;
}

myListener.onLoadStart = function (target_mc:MovieClip) {
progressBar._visible = true;
}

myMCL.loadClip("intro.swf", "container");


Can please give me some tips on how getting it to work properly.
Thanx
Peer

How To Use .MovieClipLoader?
hey guys

ive been trying to find tutorials on how to use moviecliploader to make sure things are done loading in before it continues running the script and im just not understanding any of the tutorials

here is the code I have right now:

onClipEvent(load) {
this._visible = false;
myXML = new XML();
myXML.onLoad = addphoto;
myXML.ignoreWhite=true;
myXML.load(_parent.xmlDoc);

function addphoto(success) {
thelevel=_root.getNextHighestDepth();
for(i=0;i<myXML.firstChild.childNodes.length; i++){
inXML=myXML.firstChild.childNodes[i].attributes;
_root.createEmptyMovieClip("photo"+i, thelevel);
_root["photo"+i].loadMovie(inXML["location"], thelevel);
trace("photo"+i);
}

}
}

and I want to use MovieClipLoader in place of that last loadMovie and then I want something that checks to make sure it is completely loaded before it continues running the script. PLEASE HELP.. im completely stuck untill I figure this out.

[F8] Php - MovieClipLoader
Hi,

something very strange is occuring with a MovieClipLoader Class I wrote, a php script that only generates thumbs with GD Library and the browsers Safari, Explorer and Firefox (all mac). All I want to do is to load several (26 in this case) thumbnails into movieclips with my MCL class.

1. the php script is not the problem. Works perfectly in other projects and does not return any error if I call it directly.

2. the class I wrote worked fine up until now, but since I wrote it I am afraid that is where the problem lies.

3. In Firefox everything goes just fine. That's the surprising part. Whereas in Explorer and Safari I get the error that some script is causing the flash player to run slowly. Sounds like some indefinite loop, but i can't find it.

Here is my simplified MCL class:


Quote:




class MCL {

... vars...

public function MCL() {

mcl = new MovieClipLoader();
mcl.addListener(this);

}

public function loadPath(path:String, mc:MovieClip){
mcl.loadClip(path, mc);
}

public function onLoadStart(target){
...
}

public function onLoadProgress (target, bytesLoaded, bytesTotal){
...
}

public function onLoadInit(target){
...
}

public function onLoadError(target, errorCode, httpStatus){
...
}
}




The instances are created in a for (i=1; i<=26; i++) loop, which doesn't cause any problem if I take out the thumb loading part.

Why does it work in Firefox??? What does Firefox do differently?

I hope someone can help me out here. I've written a very ugly alternative, but that is not the idea of a class, is it.

thanks!

[F8] MovieClipLoader
I hope someone here can shed some light...
I can't get my head round the MovieClipLoader class...

I have a movieclip that I want to dynamically load 25 jpgs at different depths, for which i use this code inside a container clip:


Code:
for (i=1;i<25;i++){
newPattern(i);
}
function newPattern(n:Number):Void {
this.createEmptyMovieClip("pattern"+n, this.getNextHighestDepth());
var mc:MovieClip = eval("pattern"+n);
mc.loadMovie ("images/"+i+".jpg");
}
how do I add a MovieClipLoader to this? do I add the mcl to the container clip? or to each image inside the container?

Any help is much appreciated.
Thanks

MovieClipLoader
Hi there

I've been using a tutorial which deals with the MovieClipLoader which is working fine but I need to add some extra functionality which I need some help with.
I have a stop action on the first frame of my external swf (movie.swf) and once it's loaded and reached 100% I want to go to and play frame 2.
So I presume I need add an if else loop to check the total but am having trouble with this. Any help would be great.
thanks - jb

Here's my current code;


Code:
stop();

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function (target,loaded,total) {
loader.percent.text = Math.round ((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function () {
loader._visible=false;
loader.percent.text = "";
}

// register events
mcl.addListener(mclL);

mcl.loadClip("movie.swf", holder);

MovieClipLoader Bug?
Has anyone else had this issue?

My site uses 1 movie clip loader to load in several images on demand. But if you click the button to load another image while the loader is trying to connect to a different image, it loads the new image, and then once the new image loads, the old image now takes its place. This only happens when it is connecting, not actually loading. Before you even see a progess bar.

I need to find a way to cancel the previous load completely before loading a new image.

Your thoughts?

[F8] MovieClipLoader
Please guys,
I need some help figuring out a situation, Is it posible to create an empty movieclip, then load a picture into that clip and at the same time apply a motion tween to the clip?
Example:


Code:
var PFplacer = this.createEmptyMovieClip("PFContainer", "5");
var PF_mc:MovieClipLoader = new MovieClipLoader();
PF_mc.loadClip("tween.swf","PFContainer");
}
how do i apply a motion tween to PF_mc
Im trying to use mx.transition.tween.easeInOut.
ple some one help me I still learning flash.
jane

Plz Help .flv V.S. MovieClipLoader
Is there any known issues with loading a .flv video and images loaded via movieClipLoader? .......Because when a video starts it makes all of my loaded .jpg blink.

[F8] MovieclipLoader
it is possible to have to different movieclip loader class in the main scene? if its possible van you show me how to do it please?

MovieClipLoader
Is MovieClipLoader something that is only in 8 and not in MX?

I've been reading alot about Flash, and have Flash MX. I have the lynda training for flash 8 and thusfar have been able to breeze through all the training w/o any difficulties. then i arrived at MovieClipLoader...the lynda instructor has you enter this script in -

var myMCL:MovieClipLoader = new MovieClipLoader();

myMCL.loadClip("movie2.swf", "container");

with container being an movie clip instance that it will load into. well i can't get it to work with that script, which interferes w/ lessons later on that deal w/ the preloader. I did however manage to load it with -

loadMovie("movie2.swf", "container");

this seemed much easier for me, and well it worked lol...i was surprised to see that lynda did not teach the more simple way of doing this, but i assume its because this way makes later difficulties w/ the preloader n what not. anyhooo sry to be long winded, but is MovieClipLoader something that is only in 8 and not in MX? if so is there a better way to rewrite the script lynda suggested than the way i did it?

go easy on me, i'm very new to this world, and again, sry to be long winded thanks for your time

MovieClipLoader
Hello! I'm try to load image:


Code:
f (_root.change_im==1){
this.createEmptyMovieClip("container", this.getNextHighestDepth());
var listener:Object = new Object();
listener.onLoadInit = function(target:MovieClip) {
trace("load init");
target._x = 0;
target._y = 0;
}

listener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
trace("ERROR!");
switch (errorCode) {
case 'URLNotFound' :
trace(" Unable to connect to URL: "+target_mc._url);
break;
case 'LoadNeverCompleted' :
trace(" Unable to complete download: "+target_mc);
break;
}
};
listener.onLoadStart = function(target_mc:MovieClip) {
trace("load started");
};
listener.onLoadComplete = function(target_mc:MovieClip){
trace("Load complite");
}
var mcLoader = new MovieClipLoader();
mcLoader.addListener(listener);
mcLoader.loadClip(_root.base_url + "texture" +_root.cur_image+ ".jpg", container);
trace(_root.base_url + "texture" +_root.cur_image+ ".jpg");
_root.change_im = 0;
}
In result i have trace with filename. What am I doing wrong?

MovieClipLoader
for (var j = 0; j<splittemplate.length; j++){
if(splittemplate[j] == "image"){
for(k=0; k < 1; k++){
var resourses = importXMLtemplate.firstChild.childNodes[j].attributes.resources;
var images = importXMLtemplate.firstChild.childNodes[j].attributes.filename;
var posx = importXMLtemplate.firstChild.childNodes[j].attributes.xcoord;
var posy = importXMLtemplate.firstChild.childNodes[j].attributes.ycoord;
var heigh = importXMLtemplate.firstChild.childNodes[j].attributes.height;

var containermain:MovieClip = _root.createEmptyMovieClip("container_maintemp" + j, j+100);
var listener:Object = new Object();
containermain._y = posy;
containermain._x = posx;


listener.onLoadInit = function(target_mc:MovieClip){
trace(posx);
target_mc._height = heigh;
}


var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(listener);
mcl.loadClip("images/" + images + ".jpg", containermain);
}
}}


Dear friend,

I had loaded the images from the XML file using MovieClipLoader function. Here three images are loading when I set the height inside the onLoadInit function the height of all movie clips are becoming the same.

I want to chenge height of each images related to the XML value which is stred in variable heigh.

I tried to trace the variable heigh, it is returning the height value of the last node from the XML file.

Is there anyway to do this.... or I have to write another for loop for creating different for different images. I am totally confused....

please help

MovieClipLoader Help
I've tried google many times to try and find how to get this functioning, but no luck.

i have a loader.swf which has the movieClipLoader setup to load in the intro.swf on level1 which works fine. However, how do I get it to function from within the intro.swf when clicking on an element, load a completely different swf (world.swf) in its place on level1?

this is the movieClipLoader code i am using.

Code:
stop();

// listeners
var my_mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myListener.onLoadStart = function(target_mc:MovieClip) {
trace("*********First my_mcl instance*********");
trace("Your load has begun on movie clip = "+target_mc);
var loadProgress:Object = my_mcl.getProgress(target_mc);
trace(loadProgress.bytesLoaded+" = bytes loaded at start");
trace(loadProgress.bytesTotal+" = bytes total at start");
};

myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) {
trace("*********First my_mcl instance Progress*********");
trace("onLoadProgress() called back on movie clip "+target_mc);
trace(loadedBytes+" = bytes loaded at progress callback");
trace(totalBytes+" = bytes total at progress callback");
};

myListener.onLoadComplete = function(target_mc:MovieClip) {
trace("*********First my_mcl instance*********");
trace("Your load is done on movie clip = "+target_mc);
var loadProgress:Object = my_mcl.getProgress(target_mc);
trace(loadProgress.bytesLoaded+" = bytes loaded at end");
trace(loadProgress.bytesTotal+" = bytes total at end");
};

myListener.onLoadInit = function(target_mc:MovieClip) {
trace("*********First my_mcl instance*********");
trace("Movie clip = "+target_mc+" is now initialized");

};
myListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
trace("*********First my_mcl instance*********");
trace("ERROR CODE = "+errorCode);
trace("Your load failed on movie clip = "+target_mc+"
");
};

my_mcl.addListener(myListener);
// Now load the files into their targets.
// loads into movie clips

my_mcl.loadClip("intro.swf", 1);

// my_mcl.removeListener(myListener);

MovieClipLoader
Why does this trace false and what am I doing wrong?


ActionScript Code:
var changer:MovieClipLoader= new MovieClipLoader();
var ecoute:Object=new Object();
changer.addListener(ecoute);
trace(changer.loadClip("D:FlashProjectsThe Infidel Gamemapsmap1 ilesgrass.jpg",loadimageshere_mc));

Btw I tried putting "loadimageshere_mc" as well with no effect...
and I don't think it's the backslashes either...

Help With MovieClipLoader
So I have been using the MovieClipLoader class for a site that I am developing for a client. After the site was all built they came back and said we would like these items to fade out before opening the next page. Dose any one know how to do this with the MoveClipLoader class? Thanks for any help you can provide.

MovieClipLoader Help
Hello,

I've been reading over the help files and the MovieClipLoader tutorial but I don't seem to be seeing the problem with my code. Is my problem one of syntax? It seems like the onLoadStart et al functions don't seem to even get called. Am I misunderstanding how the moviecliploader is supposed to work?


ActionScript Code:
var myMCL:MovieClipLoader = new MovieClipLoader();
var myMCListener:Object = new Object();
function makePort(){   
   
    var box:MovieClip=attachMovie("portMC","portrait_mc",this.getNextHighestDepth());
    trace(pfold+nme+".jpg"); // this is correct, but it is the only trace action that prints a message
    myMCL = box.loadClip(pfold+nme+".jpg",box.getNextHighestDepth()); //this seemingly does nothing.
   
   
}
   
myMCListener.onLoadStart=function(tMC){
    var lP = myMCL.getProgress(tMC);
     myTrace ("movie clip: " + targetMC);
     myTrace("Bytes loaded at progress callback=" + loadedBytes);
     myTrace("Bytes total at progress callback=" + totalBytes);
}
myMCListener.onLoadComplete=function(tMC){
    var lP = myMCL.getProgress(tMC);
    myTrace (targetMC + " has finished loading.");
    myTrace("Bytes loaded at end=" + lP.bytesLoaded);
    myTrace("Bytes total at end=" + lP.bytesTotal);
}
myMCL.onLoadInit = function (tMC){
    myTrace ("Movie clip:" + tMC + " is now initialized");
    tMC._xscale=0;
    tMC._yscale=3;
    tMC._x=pt_pnt_mc._x;
    tMC._y=pt_pnt_mc._y;
    var f:Fuse = new Fuse();
    f.autoClear=true;
        f.push({target:tMC, xscale:100, seconds:.25, trigger:.5});
        f.push({target:tMC, yscale:100, seconds:.20});
        f.push({target:tMC, func:fillBox(nme,msg,box)});
        f.stop();
        f.start();
}


makePort();

Using The MovieClipLoader
Hi everyone

This may seem like a very simple solution, or i dont know what im talking about!

Basically, i have a class that loads in a background onto the stage. However, i want to display a preloader while this loads etc. Im trying to import the MovieClipLoader into the class file to display the progress.

Im not getting any errors, but i have no ideas how to do this!

Any help will be appreciated!!

MovieClipLoader
So here's my trouble. I am in the belief that you can have a progress bar while using the MovieClipLoader. Well, not only can I not get that to work, but my .swf isn't loading either. So below I have script that creates a moviecliploader, changes the progress bar onProgress, and then continues on the timeline onComplete. Do I need a listener?



//create a MovieClipLoader
var MCL = new MovieClipLoader();

//changes the progress bar as the .swf is loaded
MCL.onLoadProgress = function(target, bytesLoaded, bytesTotal) {
this.ProgressBar._xscale = (bytesLoaded/bytesTotal)*100;
};

//Continues the movieclip after the .swf is loaded(I asume the MovieClipLoader stops the timeline from plaing when it hits the event)
MCL.onLoadComplete = function(target) {
play();
};

//load my .swf
MCL.loadClip("thefile.swf", "this.theMC");



HELP!!!

MovieClipLoader Bug
I’ve noticed that if you close an Internet Explorer pop-up window while flash is downloading more then 2 items using a MovieClipLoader class the parent window will refuse to load any more content from the domain of the flash movie. I can post a sample if requested.... Is this a known bug?

MovieClipLoader
ok this my prob.. i am loading a large movie Clip into a smaller one at runtime .... but i for got how to make it scale to fit the smaller one that i am loading it into .... ... the smaller movieClip is very important and i dont want to change the size ..







Attach Code

var mclLoader:MovieClipLoader = new MovieClipLoader();
mclLoader.loadClip("kingston.swf",mcBlueLoader);

MovieClipLoader Lag
Hey guys. I'm trying to use MovieClipLoaders to load in these external pics to this flash website, but it's lagging like crazy. Here's a little chunk of my code:

//set up our loader
var loader:MovieClipLoader = new MovieClipLoader();
listener = new Object();
loader.addListener(listener);
listener.onLoadInit = function(_mc:MovieClip){
//code to resize the pic and what not goes here
}

Anyways, whenever I use this, if I have any timeline or Tween animations going on at the same time, they lag like crazy. Also, when I have a streaming sound object playing back, it also seems to clog this up a bit too. Does anyone have any suggestions to let the stuff load without interfering with eachother? Thanks in advance!

~Ben~

MovieClipLoader
in my project, i have to load multiple jpg file, and i use MovieClipLoader Class, this class' events have only a params, but when i want to know which Movieclip is errored in Number (index of array)
i can't pass this param to the event
exam:
my_mcl.onLoadStart=function(theFirst:Boolean, target_mc:MovieClip){
//action
}
how to do this?
pass the param to "theFirst"

How Use MovieClipLoader?
How can I load several video files to the same place on the stage one after another dynamically? I like to load the exact number of files from txt.





























Edited: 02/17/2007 at 08:05:04 PM by &Necromancer

MovieClipLoader
Hi - In over my head (as usual) but here goes...
I have a master.swf that will be the container and background for other swfs....most notably the "splash.swf" . Splash is the container for all the navigation (external text files loaded into dynamic text boxes) - so its important that it be completely ready before appearing.

In master I have the code below - using MovieClipLoader, loading splash into holder_mc. The problem is that when splash appears, it has a jerky, staggering appearance instead of the smooth movements it should. The onLoadProgress counter tells me that splash is appearing around 90%.

What am I doing wrong here?

TIA any suggestions.

JL







Attach Code

stop();

this.createEmptyMovieClip("holder_mc", getNextHighestDepth);

var zloader:MovieClipLoader = new MovieClipLoader();
zloader.addListener(this);

function onLoadProgress(holder_mc:MovieClip, loaded:Number, total:Number) {

pct_txt.text = Math.floor(loaded / total * 100) + "%";
};


function onLoadInit(holder_mc:MovieClip) {
holder_mc._xscale = 100;
holder_mc._yscale = 100;

};

zloader.loadClip("splash.swf", holder_mc);

MovieClipLoader(Help Me Please)
Hello guys
Iam using the MovieClipLoader object to load multiple jpg images by getting their names from a xml file but agfter a minute or two images are disappearing.In other words I can still get a hand cursor by rolling over them but I cant see them,please guys help me with this problem.here is my code:
var mcloader:MovieClipLoader=new MovieClipLoader();
for (i=0;i<10;i++)
{_root.attachMovie("Movie","Movie"+i,i);

_root["Movie"+i].createEmptyMovieClip("Clp"+i,10*i);



mcloader.loadClip("Folder/"+xml_var+".jpg" , _root["Movie"+i] ["Clp"+i]);
}

Help With MovieClipLoader
I know there's a million posts about this topic (believe me, I've been through most of them) but there is nothing that seems to fit my problem. No matter what I do, I cannot get my external swfs to load into the main swf of my project. I know the key pretty much lies in the MoveClipLoader class, but I'm also fairly certain that I'm missing something very important which would and should not come as a suprise. This is the code I am using in my main swf:










Attach Code

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target, loaded, total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}

mcl.addListener(mclL);

mcl.loadClip("Abrasives.swf", "holder");

b1.onRelease = function(){
loader._visible = true;
mcl.loadClip("Abrasives.swf", "holder");
}

b2.onRelease = function(){
loader._visible = true;
mcl.loadClip("Adhesives.swf", "holder");
}

MovieClipLoader
same code, blah blah. nothing out of the ordinary (see code) but this img

http://www.sandsmuseum.com/cars/elise/thecar/side.jpg

loads fine into a swf in Firefox, but just does nothing in IE.

uh... wot?








Attach Code

if ( _mcl == undefined ) _mcl = new MovieClipLoader();
_listener = new Object();
_listener.onLoadComplete = function( target_mc:MovieClip ){
Application.rep("LOAD COMPLETE")
};
_listener.onLoadProgress = function( target, bytes_loaded, bytes_total ){
Application.rep("onLoadProgress: "+target+" :: "+bytes_loaded+" :: "+bytes_total)
};
_listener.onLoadError = function( target_mc:MovieClip ){
Application.rep("LOAD ERROR")
};
_mcl.addListener( _listener );
_mcl.loadClip( url, img._loader );

MovieClipLoader
hi i am trying to use MovieClipLoader for multiple loading on movieclip instance.

I am loading thumbnails in mc instance and want to apply loading script to each mc instance.

I am attaching the script i have used. the loading seems to be not happening even as images are loader.

Currently i am using onl one image as test

I am not able to figure out this.

here's the code i have written

stop();
xpos = 80
ypos = 0
j = 0

var thumbloader:MovieClipLoader = new MovieClipLoader();

function onLoadInit(mc:MovieClip) {
trace("Loading Initialized" + mc);
}

function onLoadComplete(mc:MovieClip) {
trace("Loading Complete" + mc);
//per.text = ""
}

function onLoadProgress(mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
trace(bytesLoaded + " bytes loaded of " + bytesTotal);
//per.text = int((bytesLoaded / bytesTotal) * 100)
this.per.text = "Loading"
}

for(i=0;i<9;i++)
{
var thumb = thumbnails_mc.attachMovie("thumbnail","thumnail"+i,i)

thumb.thumb_container.addListener(thumbloader)

//thumb.thumb_container.loadMovie("img1_t.jpg");
thumbloader.loadClip("img1_t.jpg",thumb.thumb_container);

if(i != 0)
{
if((i % 3) == 0)
{
//trace("done" + i)
ypos += 80
j = 0
}
}

thumb._x = j * xpos
thumb._y = ypos
j++
}

Moviecliploader
I am using a moviecliploader to load external swf files into a "container"
swf.

The files that I load contain their own timelines and functions etc.

How can I be sure that the file has downloaded before the loaded clip starts
calling its own functions?

Many thanks

MovieClipLoader() Pb
Hello,

I want to load a variable from a txt file using the new MovieClipLoader() within MX2004PRO but i have a pb...


ActionScript Code:
var my_newsloader = new MovieClipLoader();var my_newslistener = new Object();my_newsloader.addListener(my_newslistener);my_newsloader.loadClip("http://some_url/Text.txt" , 0)my_newslistener.onLoadComplete() = function (){    newsBox.html = true;    newsBox.htmlText = this.myNews;}


but i get the error "Left side of assignment operator must be variable or property.
my_newslistener.onLoadComplete() = function (){"

So what am i doing wrong??

MovieClipLoader
hello again it's clear to all of you that forums like this one(kirupa being my world's favorite flash forum of the universe) are my only means of communicating with other flashers.

the MovieClipLoader:

When you loadClip using this thing, your target_mc does of course load what you want and it works great, HOWEVER--> once your .swf is loaded, do you know that you cannot target it? example:

you're loading monkey.swf that has this in it:

Code:
monkey=function(){
trace("monkeys are smart");
}
So, you load that into holder_mc. and when the load is complete you can do this:


Code:
holder_mc.monkey();
//and you've called the function.

not in mx2004. once monkey.swf is loaded into holder_mc, it exists inside holder_mc as a namless instance. calling holder_mc.monkey() produces nothing.

it's not a big deal because you can just put

Code:
this.addListener(this._parent);
into the monkey.swf (and every other clip you're planning on loading)
so when the load is complete, your holder_mc just broadcasts a message to its contents.
I'm talking too much.

but i'm thirsty for opinions on how you all are using and if you're using version7 features like MovieClipLoader and FormsApplications to design stuff.

because I, for one, spent a while testing all this new stuff and the only thing I like is the Media Components and cuePoints

gimme some feedback per piacere : )

New MovieClipLoader ...
can anybody help out with the new MovieClipLoader?

i trully don't know why it's acting up...

all i have on the stage is an empty mc called "mc" and a dynamic tf "feedback"

i want to trace the very first bytes that are loaded withing the onLoadStart callback

ActionScript Code:
myMCL=new MovieClipLoader();myMCL.onLoadStart=function(target){        _root.feedback.text+="LoadStarted ";        stats=myImage.getProgress(target);        _root.feedback.text+="Loaded"+stats.bytesLoaded+" ";        _root.feedback.text+="Total"+stats.bytesTotal+" ";            }myMCL.onLoadComplete=function(target){    _root.feedback.text+="LoadComplete";}myMCL.loadClip("more.jpg", mc);


returns "LoadStarted Loaded0 Total0 LoadComplete"
why can't it trace the loaded bytes and total bytes. What can go wrong? I'm testing locally through a browser and online..
thanks for any help........

MovieClipLoader();
Hi all:

Thanks for this great tutorial on MovieClipLoader();
http://www.kirupa.com/developer/acti...cliploader.htm

Everything works great and I changed the script around so it loads one external file as soon as the movie starts. Now it looks like this:

bar._visible = false;
border._visible = false;
this.createEmptyMovieClip("container", "100");
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {

trace("started loading "+targetMC);
container._visible = false;
bar._visible = true;
border._visible = true;
pText._visible = true;

};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {

bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);

};
preload.onLoadComplete = function(targetMC) {

container._visible = true;
border._visible = false;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");


};

my_mc.loadClip("0053-Frames23.swf", "container");


How do I tell the script so when it loads this first movie, it starts loading the second one and so forth.

I was thinking of re-creating the script on every 5th frame and telling the script to go to that frame where the next actionscript is nested --- but it didn't work like that.

If you could help me out that would be great. I am doing a website and I am a week past due.

Thanks tons.

MovieClipLoader Again
Hi 'vrybody! :-)
well... gotta question about the MCL thing...
I just want to show a progressbar loading and play a anim. So i paste the code from the Flash help website, and it does .... nothing. It just display the pBar for 2 or 3 seconds and then the anim plays... of course, i've tested it only on the web, and i emptied all the IE / XP caches & temporary files before.
The anim is HUGE (12 Mo) so i really should be able to see the pBar fill in, and then play the anims... but no. it stays stuk to 0 for 2,3 seconds and then play the anim.

here is the code :

Code:


this.createEmptyMovieClip("mvt1_mc", 0);
// create both a MovieClipLoader object and a listener object
myLoader = new MovieClipLoader();
myListener = new Object();
// add the MovieClipLoader callbacks to your listener object
myListener.onLoadStart = function(clip) {
// this event is triggered once, when the load starts
pBar.label = "Now loading: " + clip;
};
myListener.onLoadProgress = function(clip, bytesLoaded, bytesTotal) {
var percentLoaded = int (100*(bytesLoaded/bytesTotal));
pBar.setProgress(bytesLoaded, bytesTotal);
};
myLoader.addListener(myListener);
myLoader.loadClip("mvt1.swf", mvt1_mc);
could you, please, give me a hint ?
I've named the instance of the progressBar pBar, and it is set to "manual" as it is said on the Flash help site...
thanks for people giving a hand!

Gian

Using The MovieClipLoader
I'm trying to take full advantage of the movieClipLoader along with listeners. But my callbacks aren't getting triggered. Inside one function I loadClip, when onLoadComplete happens I set the onRelease function. Within that onRelease I call another function ("cdPress") that also loads bigger images inside a clip.

None of the callbacks in the cdPress function are working. The function is being called successfully, but the "onWhatever" callbacks are not. What am I doing wrong?



Code:
function someFunction(){
cdListener.onLoadComplete = function(target_mc) {
target_mc.onRelease = function() {
depth = this.getDepth();
// Call the cdPress function here -------------------
cdPress(this, _root.currentArtist.cdImg[depth], true);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(cdListener);
image_mcl.loadClip(_root.currentArtist.cdImgTn[m], _root.artist_mc.discScroll["cdBtnImg"+m]);
}

function cdPress(x, theImage, isCD) {

bigImgListener.onLoadInit = function(target_mc){
_root.discDetail_mc.preLoader_mc._visible = true;
_root.discDetail_mc.preLoader_mc.loadBar_mc._width = 0;
_root.discDetail_mc.preLoader_txt.text = "onLoadInit called";
}

bigImgListener.onLoadStart = function(target_mc){
var loadprogress = bigImg_mcl.getProgress(target_mc);
_root.discDetail_mc.preLoader_txt.text = "onLoadStart called";
}

bigImgListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes){
_root.discDetail_mc.preLoader_mc.loadBar_mc._width = (loadedBytes/totalBytes)*100;
_root.discDetail_mc.preLoader_txt.text = "loadedBytes = "+loadedBytes;
}

bigImgListener.onLoadComplete = function(target_mc){
_root.discDetail_mc.preLoader_mc._visible = false;
//trace("complete with "+loadedBytes+" bytes loaded");
_root.discDetail_mc.preLoader_txt.text = "complete";
}

depth = x.getDepth();
_root.discDetail_mc._visible = true;
if (isCD == true) {
_root.discDetail_mc.cdTitle_txt.text = _root.currentArtist.cdTitle[depth];
} else {
_root.discDetail_mc.cdTitle_txt.text = _root.currentArtist.name_text;
}

bigImg_mcl = new MovieClipLoader();
bigImg_mcl.addListener(bigImgListener);
bigImg_mcl.loadClip(theImage, _root.discDetail_mc.cdBig_mc);
}

MovieClipLoader In IE
The following code works great in mozilla, and on my local machine in both IE and Mozilla. But for some reason its not working when its uploaded to web. Any ideas?


Code:
var loadAds = function (ads) {
var ad_mcl:MovieClipLoader = new MovieClipLoader();
var adPreload:Object = new Object();
this.createEmptyMovieClip("adBox", 11);
adBox._x = 579;
adBox._y = 356;
a = 0;
dur = 5000;
var runAds = function () {
ad_mcl.addListener(adPreload);
adPreload.onLoadComplete = function(targetMC) {
main.alpha(adBox, 0, 100, 4);
};
ad_mcl.loadClip(path+"images/"+adsArray[a]+".jpg", adBox);
a++;
if (a>=adsArray.length) {
a = 0;
}
};
clearInterval(intervalId);
var adsArray = new Array();
var channels = myXml.firstChild.childNodes;
for (var i = 0; i<channels.length; i++) {
var channel = channels[i];
var cCode = channel.attributes.code;
var cAds = channel.childNodes[4].childNodes;
if (cCode == ads) {
if (cAds.length>0) {
for (var j = 0; j<cAds.length; j++) {
var newAds = cAds[j].childNodes;
adsArray.push(newAds);
}
runAds();
if (cAds.length == 1) {
runAds();
} else {
intervalId = setInterval(runAds, dur);
}
}
}
}
};

Moviecliploader Help Please
this is my script.. the resizing portion worked fine i just can't get the clip that it resizes(instance=myMCL) to become a moviecliploader... i think it's because i named it mymcl.. as well as something else.. i'm not sure.. help would be greatly appreciated..


Code:
Stage.align = "LT";
Stage.showMenu = false;
Stage.scaleMode = "noscale";
var stageListener:Object = new Object();
stageListener.onResize = formatStage;
Stage.addListener(stageListener);
stageListener.onResize();



function formatStage() {
trace("onResize()");
resize_txt.text = Stage.width + " x " + Stage.height;
myMCL._width = Stage.width;
myMCL._height = Stage.width/1.333;
myMCL._xscale = myMCL._yscale;

}

bar._visible = false;
border._visible = false;
russMCL = new MovieClipLoader();


preload = new Object();
russMCL.addListener(preload);

preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
myMCL._visible = false;
bar._visible = true;
border._visible = true;
pText._visible = true;
};

preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
myMCL._visible = true;
border._visible = false;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");
};

//default image
myMCL.loadClip("test1.swf","myMCL");
//buttons
button1.onPress = function() {
myMCL.loadClip("roofmovie.jpg","myMCL");
};
button2.onPress = function() {
myMCL.loadClip("smoke.jpg","myMCL");
};
button3.onPress = function() {
myMCL.loadClip("smoke1.jpg","myMCL");
};

Moviecliploader Q
i was wondering if anyone could help me im using the moviecliploader for the first time and my border resize isnt workin:


Code:
var spacing:Number = 20;
picture._alpha = 0;
preloader._alpha = 0;
MovieClip.prototype.loadPic = function(pic:String):Void {
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
target_mc.startTimer = getTimer();
preloader.what.text = "No:"+p;
preloader._alpha = 100;
picture._alpha = 0;
picture.stop();
};
mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace(target_mc+".onLoadProgress with "+bytesLoaded+" bytes of "+bytesTotal);
preloader.preload_bar._xscale = 100*bytesLoaded/bytesTotal;
target_mc._alpha += 10;
};
mclListener.onLoadComplete = function(target_mc:MovieClip):Void {
target_mc.completeTimer = getTimer();
preloader.what.text += "LOADING OF "+target_mc+" COMPLETE"+newline;
picture._alpha = 100;
preloader._alpha = 0;
//picture.gotoAndPlay(2);
var w:Number = picture._width+spacing, h:Number = picture._height+spacing;

picture._y = border._y+10;
picture.onEnterFrame = border.resizeMe(w, h);
target_mc.onPress = function() {
preloader.what.text += newline+"target_mc = "+target_mc._name;
};
};
mclListener.onLoadInit = function(target_mc:MovieClip):Void {
var timerMS:Number = target_mc.completeTimer-target_mc.startTimer;
target_mc.createTextField("timer_txt", target_mc.getNextHighestDepth(), 0, target_mc._height, target_mc._width, 22);
target_mc.timer_txt.text = "loaded in "+timerMS+" ms.";
var t:Number = picture.bytesTotal(), l:Number = picture.bytesLoaded();
};
var image_mccl:MovieClipLoader = new MovieClipLoader();
image_mccl.addListener(mclListener);
image_mccl.loadClip(pic, picture);
};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
yy = picture._height;
var w = picture._width+spacing, h = picture._height+spacing;
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
mks._width += (w-mks._width)/speed;
hit_left._x += (w-this._width)/speed;
keepup._width += (w-this._width)/speed;
keepup._x = this._x-(this._width/2);
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
picture._x = this._x-this._width/2+spacing/2;
picture._y = this._y+10;
trace(this);
msk._width = w-spacing;
msk._height = h-13;
msk._x = this._x;
msk._y = this._y;
hit_left._x = this._x-(this._width/2)+7;
mks._width = w-32;
mks._x = this._x;
//}
}
};
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
link = [];
info = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
info[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
preloader.what.text = "XML";
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
var p:Number = 0;
function nextImage() {
//if (loaded == filesize && filesize != 0) {
//if (picture._alpha>=100) {
//this.onEnterFrame = function() {
//picture._alpha = picture._alpha-20;
//preloader._alpha = preloader._alpha+20;
//if (picture._alpha<=0 && preloader._alpha>=100) {
picture.stop();
if (p<(total-1)) {
p++;
picture.loadPic(image[p]);
ino.desc_txt.text = description[p];
ino.dino.htmltxt.text = info[p];
picture_num();
}
//}
//};
//};
//}
}
function prevImage() {
if (p>0) {
p--;
picture.loadPic(image[p]);
ino.desc_txt.text = description[p];
ino.dino.htmltxt.text = info[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture.loadPic(image[0]);
ino.desc_txt.text = description[0];
cap.desc.text = " "+link[0];
ino.dino.htmltxt.text = info[0];
picture_num();
thumbnail_mc.attachMovie("thumb2", "tt"+0, thumbnail_mc.getNextHighestDepth());
thumbnail_mc.tt0.gotoAndStop(2);
}
}
function picture_num() {
var current_pos:Number = p+1;
ino.pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
this.createEmptyMovieClip("tscroller", 1000);
var scroll_speed:Number = 10;
tscroller.onEnterFrame = function() {
if ((_ymouse>=thumbnail_mc._y) && (_ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
_x;
} else if ((_xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
var k:Number = 0;
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
var tlistener:Object = new Object();
tlistener.onLoadStart = function(target_mc:MovieClip) {
target_mc._alpha = 0;
};
tlistener.onLoadStart = function(target_mc:MovieClip) {
target_mc._alpha = 0;
};
tlistener.onLoadProgress = function(target_mc:MovieClip) {
target_mc._alpha += 10;
//preloader.preload_bar._xscale = bytesLoaded/bytesTotal;
};
tlistener.onLoadComplete = function(target_mc:MovieClip) {
target_mc._alpha = 100;
thumbnail_mc.attachMovie("thumb2", "tt"+k, thumbnail_mc.getNextHighestDepth());
thumbnail_mc.attachMovie("thumb", "test"+k, thumbnail_mc.getNextHighestDepth());
preloader.what.text = k+"thumbs";
var kl:Number = k+1;
if (kl eq total) {
preloader.what.text = "Done!";
}
};
tlistener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = (target_mc._width+5)*k;
var po:MovieClip = eval("thumbnail_mc.tt"+k);
var poo:MovieClip = eval("thumbnail_mc.test"+k);
var poop:MovieClip = eval("thumbnail_mc.t"+k);
poo._x = (poop._width+5)*k;
poo.tover.tname.text = ">"+" No: "+k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
poo.tover.tname.text = ">"+" No: "+k;
poo.gotoAndStop(4);
p = this.pictureValue-1;
po._x = (po._width+5)*k;
po._x = this._x;
po.gotoAndStop(2);
trace(po);
nextImage();
preloader.what.text = "No:"+k;
};
target_mc.onRollOver = function() {
poo.gotoAndStop(2);
poo.tover.tname.text = ">"+" No: "+k;
thumbNailScroller();
captionFN(true, description[k], this);
};
target_mc.onRollOut = function() {
poo.gotoAndStop(3);
poo.tover.tname.text = ">"+" No: "+k;
captionFN(false);
};
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
captionFN = function (showCaption, captionText, bName) {
if (showCaption && loaded == filesize) {
cap.gotoAndPlay(1);
cap.crap.setMask(cap.msk);
cap.msk.gotoAndPlay(1);
createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = " "+captionText;
cap.crap._width = 6*cap.desc.text.length;
cap._alpha = 100;
if ((bName._width+bName._x+cap._width)>border.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _xmouse+xo;
cap._y = _ymouse+yo;
cap._visible = true;
};
} else {
cap.gotoAndPlay(14);
delete hoverCaption.onEnterFrame;
}
};
stop();

MovieClipLoader
I have been looking all over for an answer to this question and havent found it yet so if I ask it again please just send me the link.

I have my main movie and I am using the Movie Clip loader to load in swf files. Loading all the stuff is fine when they are basic things but I got to my portfolio and added a slider to it. Well the slider works perfect until I load it in. My code are on my buttons which look like this:

on (release) {
var targety:Number=-1617
script.gotoAndPlay("move");
}

The script movieclip is just a movieclip with script on it. Anyways I have tried _root and it wont let me do it to the variable at all so I am pretty much stuck at a stand still. Please help or guide me in the right direction. I have been working in flash for awhile and want to enhance my skills but I guess its not working to well.

MovieClipLoader
I have been looking all over for an answer to this question and havent found it yet so if I ask it again please just send me the link.

I have my main movie and I am using the Movie Clip loader to load in swf files. Loading all the stuff is fine when they are basic things but I got to my portfolio and added a slider to it. Well the slider works perfect until I load it in. My code are on my buttons which look like this:

on (release) {
var targety:Number=-1617
script.gotoAndPlay("move");
}

The script movieclip is just a movieclip with script on it. Anyways I have tried _root and it wont let me do it to the variable at all so I am pretty much stuck at a stand still. Please help or guide me in the right direction. I have been working in flash for awhile and want to enhance my skills but I guess its not working to well.

Copyright Đ 2005-08 www.BigResource.com, All rights reserved