Moviecliploader Vs LoadMovie
Hi all
if I fire off lots of loadMovie's quickly (all loading into the same mc) by clicking on thumbnails in my app, then I sometimes get strange results where the final image that is visible is not the final image that was clicked on.
Does the MovieClipLoader class fix this common problem with loadMovie()?
Thanks in advance
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-27-2007, 02:11 PM
View Complete Forum Thread with Replies
Sponsored Links:
MovieClipLoader Or LoadMovie
Hi - This is a pretty big question because it's about the foundation swf into which everything else is shown. Below I have the hierarchy I'd like to use on this big rebuild. I'm trying to keep swfs with different purposes, elements and layouts separated instead of putting everything on one timeline and jumping from frame to frame.
I'm totally confused with "createEmptyMovieClip" and "make an empty mc and put it on the stage" explanations. I feel like I need to get preloading feedback on the screen espeiclly when FLVs are involved. But this can't be right.
What's the best way to do all this? Am I "over organized"?
Should I use MovieClipLoader.loadClip or loadMovie(), to bring swfs onto the STAGE.swf? Is there a general rule I can follow about when to use which?
TIA for someone talking me back off the ledge with some good pointers to solid technique.
JL
Attach Code
START.swf
STAGE.swf // is the background for everything-never goes away
Instructions.swf // must clear the stage...
Splash.swf // ...when another swf...
Eng.swf //...is loaded to the stage
Accordion component menu
topic_E1.swf
topic_E1.flv
topic_E2.swf
topic_E2.flv
etc.
Sp.swf // must clear the stage...
Accordion component menu
topic_S1.swf
topic_S1.flv
topic_S2.swf
topic_S2.flv
etc.
View Replies !
View Related
LoadMovie V MovieClipLoader
Hi
ive been using load movie in my flash sites so far and want to start using movie clip loader but i dont understand the differences, ive been told load movie is good because it works in all flash players, but moviecliploader is better.
can any one explain
many thanks
View Replies !
View Related
MovieClipLoader And LoadMovie
Is it possible to have a SWF load another SWF (using MovieClipLoader) AND have the loaded SWF call other movies using loadMovie?
I am creating an e-learning module where I have a master SWF (call it SWF1) that loads several other SWFs (SWF 1.1, 1.2, etc) using MovieClipLoader, depending on what the learner selects. That works fine. Where I run into problems is if the loaded SWFs (i.e., SWF 1.1) contains an interaction that requires the load of another movie and that load has been coded using loadMovie. You see some of the SWFs being loaded into SWF1 were created a while ago, before Flash 8.
What happens when I test the interaction in SWF 1.1? The movie to be loaded with loadMovie doesn't seem to load. I just see a white screen.
Can someone point me to an online help topic, tutorial, or such that could clarify this for me?
Thanks.
Mona
:?
View Replies !
View Related
MovieClipLoader Vs. LoadMovie External Swf
So I see MovieClipLoader is better. But I can't figure it out. All I need to do is load an external swf into a movieclip and make sure it stays within a certain size.
1. How do I make it a set size? Instead of it inheriting the root timeline height/widht. ie: my main movie is 900 x 900 the external swf is 700 x 500 and there are mouse moves that rely on the 700 x 500 boundaries.
2. How do I make this: loadMovie("external.swf", "load_mc");
utilize MovieClipLoader?
Thank you for your help. I'm sorry I suck at Actionscript. I'm trying.
View Replies !
View Related
AttachMovie, LoadMovie, MovieClipLoader, Etc
Hi -
I'm working on a project showing some video clips. I've converted the video clips to FLV and put each FLV into it's own SWF . Now I want to bring the separate SWFs into a "master.swf", which has a placeholder_mc, on demand. There will be a text list OR a series of buttons that the user will use to select which video clip they want to see and therefore which SWF should be loaded into the master placeholder.
Here's the question:
What is the best Actionscript way of bringing SWFs into that master placeholder?
I've seen tutorials using attachMovie, loadMovie or MovieClipLoader (and a few more) and, since I don't know what I'm doing anyway, I'm not sure which way to go...or whose advice to follow.
Can someone please clear this up for me or point me to a good compare/contrast article?
TIA your assistance.
JL
View Replies !
View Related
Corrupted SWF On LoadMovie/MovieClipLoader
Hi Guys
I'm loading a SWF via the loadMovie/MovieClipLoader methods, and somehow the visual contents get a little corrupted. The SWF plays nicely outside, but loading it makes some garbage appear when the mouse moves (its a tutorial video) or when text is typed.
Any clues?
Thanks
View Replies !
View Related
LoadMovie And MovieClipLoader Work Always Locally, But Only 80% Online
I have tried both loadMovie and MovieClipLoader to get swf's to load into other swf's. It works perfect locally, but online, it only works about 80% of the time, also the swf's that won't load changes each time. When I look at the temp internet files, the swf that didn't load is there, but it is corrupt and is only 1K when it should be 20K.
Here is the code that I'm using if it's MovieClipLoader
var myMCL = new MovieClipLoader();
function loadNew(movie, frame){
myMCL.unloadClip(frame);
myMCL.loadClip(movie, frame);
}
Here is the code that I'm using if it's loadMovieFrame
this.attachMovie("loadMovieFrame",1);
function loadNew(movie, frame){
unloadMovie(frame);
loadMovie(movie, frame);
}
This is an example of what is being passed to the function loadNew
loadNew("logout.swf", "loadMovieFrame");
Any Ideas?
View Replies !
View Related
MovieClipLoader.loadClip Doesn't Work, But MovieClip.loadMovie Does?
ActionScript Code:
private function init()
{
var mclLoader:MovieClipLoader = new MovieClipLoader();
var objLoadListen:Object = new Object();
var mcTarget:MovieClip = _mcParent.createEmptyMovieClip("_mcGraphic" + _nCounter.toString(), _mcParent.getNextHighestDepth());
/*objLoadListen.onLoadStart = Delegate.create(this, onLoadStart);
objLoadListen.onLoadProgress = Delegate.create(this, onLoadProgress);
objLoadListen.onLoadComplete = Delegate.create(this, onLoadComplete);*/
objLoadListen.onLoadInit = Delegate.create(this, onLoadInit);
//mcTarget.loadMovie(_strFile); //This Works...
mclLoader.addListener(objLoadListen);
mclLoader.loadClip(_strFile, mcTarget); //This Doesn't...
}
Code is pretty simple...for some reason the loadMovie statement processes fine, but the loadClip statement does not. No error, no nothing...it just doesn't load the image.
View Replies !
View Related
Converting From MovieClipLoader To LoadMovie For Flash Player 6 Compatibility - Help
Hi there,
I've been trying to convert script with the movieClipLoader() to the more simple loadMovie(), so I can export my SWF for flash player 6, but I have a small problem with my preloading...
Heres my MCL:
ActionScript Code:
/// MOVIECLIPLOADER ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
my_mcl = new MovieClipLoader();
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
preload = new Object();
preload.onLoadInit = function(mcTarget) {
//trace(mcTarget);
my_mcl.removeListener(preload);
xSetAllIMGs();
}
my_mcl.addListener(preload);
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
}
}
xLoadAllIMGs();
Instead I tried this:
ActionScript Code:
/// LOADMOVIE ///
xLoadAllIMGs = function () {
for (i = 0; i < SWFs_num; ++i) {
counter_str = i;
IMG = path + counter_str + ".swf"; // the image to be loaded
my_mc = "MC" + counter_str + "_mc"; // the movieclip that should contain the image above
_root.CONTAINER_mc.createEmptyMovieClip(my_mc, CONTAINER_mc.getNextHighestDepth());
loadMovie(IMG, _root.CONTAINER_mc[my_mc]);
if (i == SWFs_num - 1) {
xSetAllIMGs();
}
}
}
xLoadAllIMGs();
But my xSetAllIMGs() function is on before the images are loaded...?
Should I use some kind of extra preloader in my loadMovie script???
View Replies !
View Related
Problem Loading Multiple Jpgs Dynamically With LoadMovie And MovieClipLoader
Hello Kirupa forum,
I'm loading multiple instances of the same jpg dynamically to my swf. It works just fine locally, but when I upload it, it only executes the first loading code it encounters in the timeline. I was doing things fairly complexly with 'for' loops and dynamic name generation and stuff, but I've stripped it down to the basics in an effort to get this to work.
Here's some code:
loadMovie('1.jpg', mc1.empty_mc);
loadMovie('1.jpg', mc2.empty_mc);
mcLoader.loadClip('1.jpg', mc3.empty_mc);
mcLoader.loadClip('1.jpg', mc4.empty_mc);
mcLoader.loadClip('1.jpg', mc5.empty_mc);
as you can see, I'm using two different methods of loading the jpgs, just in an effort to pin down exactly what is going on. Locally, they all load fine. When I upload to the server, only the first instance of the loading code is run (so mc1 will get its jpg, but the rest won't). I've tried to swap the order, place the loading code in different areas, try to load different jpgs into each empty mc, but nothing works except that first instance flash gets to in the timeline.
It is driving me bonkers. The swf and jpgs are all in the same folder, both locally and on the server. The server the swf is hosted on is Windows 2003 box if that matters. I tried uploading it to a different windows box and got the same problem. Any ideas?
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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??
View Replies !
View Related
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
View Replies !
View Related
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;
}
}
}
View Replies !
View Related
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...
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
[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!
View Replies !
View Related
[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
View Replies !
View Related
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);
View Replies !
View Related
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?
View Replies !
View Related
[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
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
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
View Replies !
View Related
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);
View Replies !
View Related
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...
View Replies !
View Related
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.
View Replies !
View Related
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();
View Replies !
View Related
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!!
View Replies !
View Related
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.
View Replies !
View Related
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!!!
View Replies !
View Related
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?
View Replies !
View Related
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);
View Replies !
View Related
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~
View Replies !
View Related
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"
View Replies !
View Related
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
View Replies !
View Related
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);
View Replies !
View Related
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]);
}
View Replies !
View Related
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");
}
View Replies !
View Related
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 );
View Replies !
View Related
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++
}
View Replies !
View Related
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
View Replies !
View Related
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??
View Replies !
View Related
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 : )
View Replies !
View Related
|