you're using one uiloader to load more than one swf?
Yes. It's a slideshow that used to be just static images.... but the client decided that he wants each image to enlarge upon mouse-over.
So, I retained the UI Loader that the original images would load into, created separate "button" movie clips, saved them all as .swf files, changed the file names in my xml sheet, and "Voila!" - animated slideshow images!
I just need to figure out how to center them within the (enlarged) UI loader.
if you know of a better/more efficient way, I am all ears!
why not load one image (the larger) and scale it down when it completes loading and on mouseout and scale it up on mouseover?
Hmmmm. Would that be a better use of Flash to do it that way? Thing is, the "images" fade-in with some alpha tweening in the script as it is. I don't want to make them do too much stuff upon loading.
After thinking on this a bit..... should I just do away with the idea of making my images .swf files, and just creating movie clips for these? I originally wanted them to be movie clips, but the mouse-over "button" effect was giving me problems when naming them "fileName_mc". Buttons as movie clips have always given me output trouble.
Bottom line is that I really want is to make this modification as seamless as possible - without too much extra work or changing too much of the existing assets. I want to keep my site as is and only make changes to these 20 image files. I've spent too much time on this thing as it is. Thanks.
1 person found this helpful
the least changes would be to just simplify what you're already doing and do what i intimated: load one large image per loader (i'm not sure why you're using a uiloader because the loader class is pretty easy to use and more flexible than the uiloader), assign a position, assign mouse listeners and scale the loader in the listener function.
Ok. I will try as you're suggesting. Thanks!
Will come back with a "Correct Answer" once it's done.
P.S. Pardon my apparent Flash novice caliber..... but what's the difference bvetween a "Loader" and a "UI Loader". I always thought UI Loaders ere what Flash uses for multiple image loading. It's THE Component for such things, yes?
correct, the uiloader is a component that allows you to load swfs and bitmaps.
the loader class does the same thing.
components are movieclips that should simplify and streamline your work-flow.
the flvplayback component is an example of a "good" (in my value-system) component. you can use it to play flv/f4v files. that's a little more difficult to do without the component. but where the component really speeds development is if you want a play/pause button, volume button, fullscreen button, mute button, play-progress/download-progress bar etc. pick the skin that has what you want and you don't need to code for any of that functionality. that's a worthwhile component. so, are the colorpicker, list component and datagrid component.
the uiloader code doesn't do anything better or more easily than the loader class and is more limited than the loader class. it's what i would call a useless component. i feel the same way about the button component and label component.
and there are some in-between components like the uiscrollbar and scrollpane. i can see why some people would find them useful but i never use them.
Not trying to be stubborn, but since I had already spent a lot of time creating these "mini swf files" for my slideshow, I really didn't want to forsake all that work. So, I am using the UI loader to load them....
I entered in the UI loader "centering" script that you provided:
workLoader.content.x = -.5 * workLoader.content.width;
workLoader.content.y = -.5 * workLoader.content.height;
... but they're still loading on the left side of the UI loader.
Wonder why there's no "center" option in the UI Loader's properties pane. That would have made sense to me to have such an option to check off in the Properties pane.
that's the problem with components. they have different code for many common properties, methods and events. try the move() method. a lot components use that.
I'm not sure what the move() method is, or how I'd enter it into the script. Even after doing google searches, etc., I couldn't find a proper context in which to use it in.
use the adobe help files. check the uiloader class'es methods.