Skip to main content
Known Participant
May 28, 2008
Question

loadMovie - Load external image

  • May 28, 2008
  • 5 replies
  • 686 views
I have a website I made with a single flash file in which the .swf is 2.7 MB. The web site functions as a gallery of images that you can zoom into and move around, so large images are necessary. I had an idea to make the action script load the images externally into the .swf to make it smaller, but the script that I'm trying doesn't seem to work. I found it in the Flash help:

_root.figure_1.da_1a.i_1.loadMovie("images/gallery/Mr.Cooper(web)a.jpg");

i_1 is a button that contains the first image you see in the gallery. Evidentially, it has to be a button for the drag and drop or zoom functions to work - I can't remember which, I made this site last month. I just remember changing into an MC didn't work.

Anyway, today I placed this above script in the first frame of the MC that contains this button (da_1a), and nada. It didn't load anything. I also read that when it does load it will put the left corner on the registration point which is in the center of the button. The registration has to stay there for the zoom function to work properly. So, I need to somehow accompany the script with parameters to where to place the loaded image - x=(-400), y=(-262.5).

It seems this should be simple. Any help would be great.

Thanks,

JP
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
June 3, 2008
place it on a timeline. do NOT attach it to an object.
kglad
Community Expert
Community Expert
June 3, 2008
copy the code below and place it on a timeline in a frame that plays no sooner than the from that contains your movieclip. what do you see in the output panel?

trace(_root.figure_1.da_1a.i_1)
Known Participant
June 3, 2008
Statement must appear within on handler
kglad
Community Expert
Community Expert
May 28, 2008
what's the trace() statement reveal?
Known Participant
June 2, 2008
I don't know what that means.
kglad
Community Expert
Community Expert
May 28, 2008
then use trace(_root.figure_1.da_1a.i_1) to see if you have a correct path/name.
Known Participant
May 28, 2008
I used the cross hairs "Insert Target Path" tool in the Action Script window to formulate the path.
kglad
Community Expert
Community Expert
May 28, 2008
you almost certainly do not have an image with that file name.
Known Participant
May 28, 2008