View Full Version : onPress + MovieClipLoader + listener PLEASE HELP
issamneo
04-27-2004, 06:14 AM
why in this code the onPress event don't work
stop();
mymcl = new MovieClipLoader();
mylistener = new Object();
mylistener.onLoadComplete = function(targetmc){
targetmc.onPress = function() {
getURL("1.htm","_blank");
}
}
_root.createEmptyMovieClip("x1",5000);
mymcl.loadClip("1.swf","x1");
mymcl.addListener(mylistener);
PLEASE HELP
farafiro
04-27-2004, 09:45 AM
this is confusing
have u seen this
http://www.actionscript.org/tutorials/intermediate/MovieClipLoader_in_Flash_MX_2004/index.shtml
issamneo
04-27-2004, 10:14 AM
yes i know this tutorial but he say i create my Mc but me i'm creating my movie clip with AS and i don't know why when i create it dynamically it don't work
issamneo
04-27-2004, 10:21 AM
he use attach movie but me now
farafiro
04-27-2004, 10:56 AM
okey, first this will make no difference (load & attach)
now u don't need the listener here
also, why u r usinf the onLoadComplete only??
is the targetMC the loaded swf??
why u r linking the onLoadComplete with the onPress??
just your code need to be re-organised as the tut and it will work
I have to leave now, maybe tom if u still need help i will add the full script
sorry for that
issamneo
04-27-2004, 11:02 AM
i 'm reading the name of movie clip from an XML file and after placing them and put them in their positions... i must link them to their page each movie clip loaded must have a link which is readed from XML also
conclusion: i have the name of a file.htm and i have an swf loaded i want link (url) this swf to this file the idea is to put the onpress event in the onLoadComplete or onLoadInit
thank you
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.