Skip to main content
Participant
September 1, 2010
Answered

onClipEvent and loading external images

  • September 1, 2010
  • 2 replies
  • 553 views

I'm a flash newbie and I am trying to change the images the following calls up. (Using CS4 and AS 2.0)

onClipEvent (load)

{

    imageProperties = _root.getCurrentImageName(0);

    loadMovie(_root.url + imageProperties.name, this.cont.pic);

    url = imageProperties.linkToOpen;

    targetWindow = imageProperties.target;

}

Where is the getCurrentImageName calling the image up from? or...
Where is the imageProperties.linkToOpen pointing to?
Honestly, I get that I could find the image in the directory and just change it out with the same name/pixel size, but I'd also like to add more images to this particular project with the same conditions.
I'm probably one of those girls that knows enough to cause more damage than good, so at least point me in the right direction. please help~ 😜

This topic has been closed for replies.
Correct answer Ned Murphy

On the main timeline there should be some actionscript that includes a function named getCurrentImageName.  Whatever that function is doing it is assigning values to an object called imageProperties, one of which is likely a web address (url)

2 replies

Inspiring
September 2, 2010

Also onClipEvent(load) doesn't do what you think it does. It won't tell you when external content has been loaded. kglad posted on this very issue within a little bit....

You also really shouldn't be using the onClipEvent() and on(0 type of event handlers. Unless you are publishing to Flash 5 or earlier. Here is a good article on that issue:

http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent

You really should look into using the MovieClipLoader class.

Ned Murphy
Ned MurphyCorrect answer
Legend
September 1, 2010

On the main timeline there should be some actionscript that includes a function named getCurrentImageName.  Whatever that function is doing it is assigning values to an object called imageProperties, one of which is likely a web address (url)