2 Replies Latest reply on Jul 6, 2007 2:38 AM by Newsgroup_User

    onLoad event ? Is there an alternative?

    derDirk
      Hey there.
      I hope that maybe someone can give me a hint.
      I´m trying to build a XML based picture viewer.
      Once the picture is loaded into a movieClip you should be able to zoom,pan and rotate it.
      My problem now is to have an event handler like the onLoad-function, but if I use this function on my movieClip it doesn´t
      work, as far as I know because it is a dynamic created MC. My question is : How can I assign the onLoad-event to an dynamic MC, without using the onEnterFrame event.

      Any Idea?

      Thanks in advance and have a nice day.



        • 1. onLoad event ? Is there an alternative?
          cicnats
          use MovieClipLoader, it's a bit more complicated but more powerful and can load images as well. And you get events like onLoadComplete, onLoadProgress, onLoadError and the like, so you have more control.
          • 2. Re: onLoad event ? Is there an alternative?
            Level 7

            HI derDirk,

            [assuming AS2]

            Use the MovieClipLoader class and it's eventHandlers.
            The problem with loadMovie is that any eventhandlers attached to it are
            'erased' when new content is loaded into the movieClipInstance.

            The movieClipLoader is a very nice 'work around' for that issue.

            HTH,
            Manno


            derDirk wrote:
            > Hey there.
            > I hope that maybe someone can give me a hint.
            > I´m trying to build a XML based picture viewer.
            > Once the picture is loaded into a movieClip you should be able to zoom,pan and
            > rotate it.
            > My problem now is to have an event handler like the onLoad-function, but if I
            > use this function on my movieClip it doesn´t
            > work, as far as I know because it is a dynamic created MC. My question is :
            > How can I assign the onLoad-event to an dynamic MC, without using the
            > onEnterFrame event.
            >
            > Any Idea?
            >
            > Thanks in advance and have a nice day.
            >
            >
            >
            >
            >

            --
            ----------
            Manno Bult
            http://www.aloft.nl