Actionscript disapearing when loading .jpg?

I’m loading .jpg’s in MC’s which were created with the attachmovie command.
It doesn’t matter if the original linked MC was a button or a MC with actionscript on/in it. The original behavior just disapears,
also giving it another “initobject” doesn’t help.
I can’t get it to be a button in this way??

Is there maybe another way to make the newly created image MC’s into buttons or am I doing something wrong?

Thanks allready !!!

I don’t think I understand, but I’ll give it a go.
If you are loading jpgs into a movieClip, why not just have an empty movieClip on your stage instead of using attachMovie to bring something in from the library?

As for making a movieClip a button, you can apply some button handlers onto movieClips and it will work like a button. You could do that with your empty MovieClip and see if that works for you. What do you think?

Well…the thing is:
I create several empty movieclips with attachmovie.(max.100)
(Using a clip on stage gives same result, due to loadmovie command)
The number of MC’s can be variable, depending on the number of pictures to be loaded into the clips.(as .jpg)
then the pictures are being arranged next to eachother, so it becomes a scrolling image bar.

so far so good…but now…
All the new MC’s have to become buttons or at least sensitive for a mouse click(I tried Hittest as well).

But the problem is that I can’t connect any script to or in the new clips.
How do I get a button behavior on the clip after the picture is loaded, that’s the actual question?

Thanks again, Hope to hear from you soon.

Okay, I see what you’re saying. Is there no way of faking it? If you know where the images are going to load, could you put invisible buttons (buttons with just hit states) over where the jpes would load on the movieClip that scrolls? That’s just a suggestion. Beyond that, not too sure. I think it’s beyond me. If you want, post again with a fla. I’ll take a look at it, but no promises. Sorry.

I’ve answered that question on another board :stuck_out_tongue:

I couldn’t use invisible buttons, but inserting another MC (in which the image is loaded) worked for me.
Thanks a lot…
Sjoerd.