2 Replies Latest reply on Oct 29, 2006 9:12 AM by Newsgroup_User

    createEmptyMovieClip problem

    ricky1980
      Dear all,

      I can not drag the movie clip when i write the following actionscript? What is the problem?


      Ricky
        • 1. Re: createEmptyMovieClip problem
          kglad Adobe Community Professional & MVP
          you must define mouse handlers AFTER loading is complete. ie, use preload code or the onLoadInit() of the moviecliploader class.

          or load into a child movieclip of pic.
          • 2. Re: createEmptyMovieClip problem
            Level 7
            Next to kglad's truth this:

            at first I found it confusing too, but in the script below the pic
            movieClip is actually replaced by what's loaded. And thereby anything
            attached to the loading clip (including your event handler).
            It is not that pic is gonna contain the loaded image as a 'sub-clip'.

            ricky1980 wrote:
            > Dear all,
            >
            > I can not drag the movie clip when i write the following actionscript? What
            > is the problem?
            >
            >
            > Ricky
            >
            >
            > this.createEmptyMovieClip("pic",this.getNextHighestDepth());
            > pic.loadMovie("img/1.jpg");
            > pic.onPress=function() {
            > this.startDrag();
            > }
            >

            --
            ----------
            Manno Bult
            manno@xs4all.nl