I have a group of images, 8 wide, 5 high, totalling 40 ( :trout: ) .
what I want to happen:
On RollOver, load MyFile.jpg into target a …
this I can do. However, here is where Gen2 was easy, MX will orient the jpg by it’s upper right corner. This won’t work, since I don’t know the orientation (landscape or portrait) because they will be dynamic…
any idea how to load into a target and orient to the center of the loaded image?
It’s the upper left corner that it attaches to (well depending on your view, looking at the monitor it’s upper left).
And yeah, that’s something I don’t like about dynamically loading things, you should be able to change that easily but noooo, Macromedia wanted to be difficult.
I don’t know a way off hand, but I will see if I can figure something out (unless someone else here comes up with a solution)
*Originally posted by lostinbeta *
**It’s the upper left corner that it attaches to (well depending on your view, looking at the monitor it’s upper left).
And yeah, that’s something I don’t like about dynamically loading things, you should be able to change that easily but noooo, Macromedia wanted to be difficult.
I don’t know a way off hand, but I will see if I can figure something out (unless someone else here comes up with a solution) **
In Gen2, I could specify to load to the center of an object…
another thing I wish they would put back in… along with dynamic png’s …
Check my last post Works fine for me. Lemme explain the code though…
[AS]
//load the images
container1.loadMovie(“lib_banner1.jpg”);
container2.loadMovie(“lib_banner1.jpg”);
//keep checking onEnterFrame
this.onEnterFrame = function() {
//if container2s width is greater than 0
//(meaning the image was fully loaded and is now attached to the clip)
if (container2._width>0) {
//stop running the onEnterFrame
delete this.onEnterFrame;
//position clip
container2._x -= container2._width/2;
container2._y -= container2._height/2;
}
};[/AS]
I’m kinda assuming if you can dynamically load png’s, then gif’s would be a no-brainer…
Like I keep bytching about… they used to… I have 2 clients that would pay $$ to have dynamic gif’s right now… If MX2 supports it, I may get them to pay for my upgrade…
thanks again for the notation on the code. Even though I figured this one out on my own, it’s nice to have on file, just in case it falls into one of those Swiss Cheese holes in my file cabinet…
*Originally posted by reverendflash *
**ahmed:
thanks, but if it is already loaded, will it jump to the center when the script is run?
I want the image to be centered on the stage on rollover…
Rev **
this should do it
I think the problem with dynamic gifs is they can be animated. i don’t know about png’s, but it would not be as easy as it sounds to get a animated gif into flash. Gifs can have different frame durations, and flash cant even support different frame rates of dynamically loaded swfs. The plugin will be almost a fully functional browser if it starts supporting every file type, and that would not be a good thing. Not unless the plugin starts using CPU more efficiently.
It would be nice though, just to be able to get a single frame gif. I hope they read all the wish lists that are out there.
Well i’m sure animated gifs contain different information inside them, so it would definitely rock if Flash has the ability to weed out the different between animated and not and allow the non-animated ones.
As Rev stated before though, Generator had the ability to load in most file types dynamically, unfortunately they cut out a lot of that in Flash MX due to plug-in size restrictions