Flash Q Frustrated
- Started
- Last post
- 13 Responses
- REDWOOD
Hi I'm fucking frustrated about this. I load an image with XML and after its been loaded the imagecontainer should resize to the new dimensions of the image. But he always takes the previous dimensions.
PLEASE HELP ME!!
Code Only:
http://thisismint.be/clients/Kleā¦Full .FLA:
thisismint.be/clients/Klets/KUTS...MUCHA THNX
- UndoUndo0
if your imageContainer resizes to that of the previous image then its likely your not sorting through the xml okay. remember xml starts at number 0 and not 1.
does that help?
- REDWOOD0
Its not about the xml sorting. Its about the loading. There's something wrong. He should get the dimensions of the container when the image has completely loaded and he gets the dimensions before its loaded.
- REDWOOD0
Frust Rate = 100
- REDWOOD0
still frustrated, does nobody got a script that automaticly resize the clipholder after the image has been loaded with xml?
- Timson0
Do you have a preloader? If so it will be easy to get the holder dimensions after it hits 100%.
like
if (percentLoaded==100) {
execute script here;
}Does that help?
- REDWOOD0
I've tried that a lot of times even with with the MovieClipLoader object. A friend of mine told me its a bug in Flash the procent loader.
- UndoUndo0
"But he always takes the previous dimensions." from yr original post
if the tween is working but always taking previous dims then i would look at how you are pulling or sorting your xml.?
- System-Idle0
if you are loading a image into an empty mc that mc should outmatically resize to the images size.
If you are then trying to set another mc to equal that size of the mc with the loaded image, call the resize function in a onLoadComplete.
myBackground_mc._width=picHolder... etc
- System-Idle0
also, why use onEnterFrame when you dont have any easing equations in there?
have it as a normal function and call it with onLoadComplete
- unfittoprint0
trigger a setInterval loop onLoadComplete.
the loop could even be trigered itself by an interval [one only] of 100ms, enough for Flash to know the exact dimension fo the loaded image.
somehow I think the moviecliploader object does not detect immediately the dimensions onLoadComplete.
personally I still use my loading class and a good ol':
obj.getBytesLoaded() == obj.getBytesTotal() && obj.getBytesTotal() > 10with an eventDispatcher. works like a charm...
- midori0
hey redwood i emailed you a fla file. i think its what you need or at least pretty close.
- REDWOOD0
THNX a lo to all of you replied!!
Going to try it again.
- REDWOOD0
I found a solution.
THNX