FORUMS: list search recent posts

Movie Clip Resizing

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
DonnoMan
Movie Clip Resizing
on Oct 27, 2006 at 9:44:07 pm

I'm loading .jpg files into movieClip objects, but setting the ._width and ._height doesn't always work properly. The files are NOT all the same size; I'm not sure if that has anything to do with it. I would think not, but...
I have two .jpg files that tend to get sized much smaller, and one or two that tend to appear much larger, ... and the others are fine. It just seems inconsistent in how it works. Any clue why?


Return to posts index

Sher Ali
Re: Movie Clip Resizing
on Oct 27, 2006 at 10:00:37 pm

for such projects always try to use xml with flash, so that you should load all the links to all the images and their corresponding configurations.

However, review you actionscript code, so that, you should set the width and height properties after the image has been completely loaded in the movieclip.


Sher Ali
http://www.webeyestudio.com


Return to posts index

DonnoMan
Re: Movie Clip Resizing
on Oct 27, 2006 at 10:31:22 pm

Indeed. That's why I'm so confused; I'm loading an XML file into an XML object, then reading the file names from there in order to load the .jpg file into the movieClip objects with mc.loadMovie() ... and then I resize it.


Return to posts index


DonnoMan
Re: Movie Clip Resizing
on Oct 27, 2006 at 11:29:18 pm

Can somebody show me how to use onClipEvent(load) in conjunction with someMovieClip_mc ?


Return to posts index

lajoiet
Re: Movie Clip Resizing
on Oct 28, 2006 at 2:18:31 am

I think what you're looking for actually is the MovieClipLoader Class, where you set up a MovieClipLoader object and a listener object for the MCL Object. Then you use the MCL to load the content into the holder you want, and you have access to several events that fire as the MovieClipLoader does it's job, the onLoadStart (when the download starts), onLoadProgress (which fires repeatedly as data is loading), onLoadComplete (which fires when all the data has finished loading) and onLoadInit (which fires once the first frame of the loaded file has been initiallized), there are others, but those are the main ones. The onLoadInit is the main one you're probably interested in, as it is at that stage in the process that Flash will have access to the properties (width, height, etc) of your loaded file.


Return to posts index

DonnoMan
Re: Movie Clip Resizing
on Oct 30, 2006 at 8:02:40 pm

Yeah...I suspected I would need to us the MovieClipLoader class...I was just avoiding having to use the effort to incorporate that....


Return to posts index


DonnoMan
Re: Movie Clip Resizing
on Oct 30, 2006 at 8:40:28 pm

But...do I use the MCL in order to load clips INTO the MovieClip class instances? Or do I just need to leave it as an instance of MovieClipLoader?


Return to posts index

DonnoMan
Re: Movie Clip Resizing
on Oct 30, 2006 at 9:28:08 pm

(sigh). I've got it using a MovieClipLoader to load the pictures into the MovieClip instances, and I've tried it with both onLoadComplete() and onLoadInit(), and there is still one picture that shows up large and on that shows up small. I even used a bit of a hack to test things out and set an interval of every 100 milliseconds to resize them, and it worked; I saw those problem photos show up at their noncomformist sizes for a tenth of a second before they were resized...but I'm trying to make this look nice an don't want to allow them a tenth of a second of looking funny (by the way, an interval of 10 milliseconds DOESN'T work). ...???


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]