4 Replies Latest reply on Nov 19, 2006 2:07 PM by Newsgroup_User

    Load Function

    ^}{yPeR^
      Hi,

      How would I load this function from my Graphic Function.As file into the main root

      function displayDynamicGraphic (instanceName,xcoord,ycoord, path )
      {
      var nextDepth:Number=this.getNextHighestDepth();
      _root.createEmptyMovieClip(instanceName,nextDepth)
      target._x=xcoord;
      target._y=ycoord;
      instanceName.loadMovie();
      }

      Any help much appreciated

      Chris
        • 1. Re: Load Function
          Level 7
          in your root:

          #include "Graphic Function.As"

          JG

          "^}{yPeR^" <christopherjack2k@hotmail.com> wrote in message
          news:ejqapd$qi0$1@forums.macromedia.com...
          > Hi,
          >
          > How would I load this function from my Graphic Function.As file into the
          > main
          > root
          >
          > function displayDynamicGraphic (instanceName,xcoord,ycoord, path )
          > {
          > var nextDepth:Number=this.getNextHighestDepth();
          > _root.createEmptyMovieClip(instanceName,nextDepth)
          > target._x=xcoord;
          > target._y=ycoord;
          > instanceName.loadMovie();
          > }
          >
          > Any help much appreciated
          >
          > Chris
          >


          • 2. Re: Load Function
            kglad Adobe Community Professional & MVP
            what's the problem? (path is unused but that shouldn't cause a problem unless you think you're using it.)
            • 3. Re: Load Function
              ^}{yPeR^ Level 1
              Thanks for the reply JG,

              So if I was to add another function in the Graphic Function.As it would load that as well.
              Is there any way to reference part of a as file rather than load it all ?

              Many Thanks

              Chris

              quote:

              Originally posted by: Newsgroup User
              in your root:

              #include "Graphic Function.As"

              JG

              "^}{yPeR^" <christopherjack2k@hotmail.com> wrote in message
              news:ejqapd$qi0$1@forums.macromedia.com...
              > Hi,
              >
              > How would I load this function from my Graphic Function.As file into the
              > main
              > root
              >
              > function displayDynamicGraphic (instanceName,xcoord,ycoord, path )
              > {
              > var nextDepth:Number=this.getNextHighestDepth();
              > _root.createEmptyMovieClip(instanceName,nextDepth)
              > target._x=xcoord;
              > target._y=ycoord;
              > instanceName.loadMovie();
              > }
              >
              > Any help much appreciated
              >
              > Chris
              >





              • 4. Re: Load Function
                Level 7
                No there is no way. Maybe what you want to look into is classes and OOP, you
                will have a little more control, specially if you need to have more controls
                later one with all your created movieclips etc....

                JG



                "^}{yPeR^" <christopherjack2k@hotmail.com> wrote in message
                news:ejqjim$6rg$1@forums.macromedia.com...
                > Thanks for the reply JG,
                >
                > So if I was to add another function in the Graphic Function.As it would
                > load
                > that as well.
                > Is there any way to reference part of a as file rather than load it all ?
                >
                > Many Thanks
                >
                > Chris
                >
                >
                quote:

                Originally posted by: Newsgroup User
                > in your root:
                >
                > #include "Graphic Function.As"
                >
                > JG
                >
                > "^}{yPeR^" <christopherjack2k@hotmail.com> wrote in message
                > news:ejqapd$qi0$1@forums.macromedia.com...
                > > Hi,
                > >
                > > How would I load this function from my Graphic Function.As file into the
                > > main
                > > root
                > >
                > > function displayDynamicGraphic (instanceName,xcoord,ycoord, path )
                > > {
                > > var nextDepth:Number=this.getNextHighestDepth();
                > > _root.createEmptyMovieClip(instanceName,nextDepth)
                > > target._x=xcoord;
                > > target._y=ycoord;
                > > instanceName.loadMovie();
                > > }
                > >
                > > Any help much appreciated
                > >
                > > Chris
                > >
                >
                >
                >

                >
                >
                >