Hi Guys, been trying to use setProperty to resize a movieclip but it seems that it only works on press or release and I need it on Frame 1. Any suggestions or work arounds welcome. Thaks in advance.
Unfortunatly I cannot do that because I am using loadMovie to load an external ..swf or jpg I do not know the size of the swf or jpg as it is loaded in dynamically using php and mysql. Any help on this would be great. or anyone with experience of scale mc. Thanks
Hi, if i'm not mistaking you're trying to load an imge or swf in an container and resize it after it is downloaded. the problem is that your resizing actions are executed once a container appears on the stage and after an image is downloaded into container your resizing actions aren't executed again. To avoid the problem you shall check if each image is already downloaded and only then apply resizing actions. You can do it several ways (for example, you can use MovieClipLoadr Class) or you can try to do something like this: stop(); images_to_load=["1.jpg","2.jpg","3.jpg"];////you shall receive this array from your php script function attachContainers(){ for(i in images_to_load){ _root.attachMovie("imgCont","imgCont"+i,i,{_y:150*i}); if(i==0){ target=eval("imgCont"+(images_to_load.length-1)); target.loadMovie(images_to_load.pop()) loadInt=setInterval(loading,100,target); } } } attachContainers(); function loading(target){ percentage=Math.round(target.getBytesLoaded()/target.getBytesTotal()*100); MyPreloader.ProgressBar._xscale=percentage;//optional. if you have a preloader for each image if(target.getBytesLoaded()==target.getBytesTotal()){ target._width=50; target._height=150; clearInterval(loadInt); getNextMovie(); } } function getNextMovie(){ if(images_to_load.length>0){ target=eval("imgCont"+(images_to_load.length-1)); target.loadMovie(images_to_load.pop()) loadInt=setInterval(loading,100,target); } }
Thanks very much for that, this will be very usefull.
Don't see what you're looking for? Try a search.
|