3 Replies Latest reply on Sep 19, 2011 7:01 AM by kglad

    How to ARRAy contents page

    wdj013

      //How to ARRAy contents page by "next" button

       

      this.createEmptyMovieClip("xiayiye",99)

      xiayiye.createTextField("xiayiyewenzi",this.getNextHighestDepth(),0,0,100,100)

      xiayiye.xiayiyewenzi.text="next"

       

      xiayiye._y=200

      xiayiye._x=200

      num=5

      shu=xiayiye.onRelease=function (){

            

             num=num+5

             trace(num)

             }

             shu()

             i=num

             var mc=new Array()

             var arr:Array=new Array("a","b","c","d","e","f","j","h","i","g","k","l")

             for(i;i<arr.length;i++){

                    mc[i]=this.createEmptyMovieClip(mc[i],this.getNextHighestDepth())

                    mc[i].createTextField("wen",this.getNextHighestDepth(),0,0,100,100)

                    mc[i].wen.text=arr[i]

                    mc[i]._y=20*i

                    }

        • 1. Re: How to ARRAy contents page
          kglad Adobe Community Professional & MVP

          i'm not sure what you're trying to do but that won't do it.  to start, your for-loop is faulty.  then mc[i] is undefined so you're not going to create an empty movieclip with name undefined. 

           

          possibly you want to use:

           

           

          // the code above this snippet makes no sense, at all in the context of your pst.

           

                 var mc=new Array()

                 var arr:Array=new Array("a","b","c","d","e","f","j","h","i","g","k","l")

                 for(var i:Number=0;i<arr.length;i++){

                        mc[i]=this.createEmptyMovieClip(arr[i],this.getNextHighestDepth())

                        mc[i].createTextField("wen",this.getNextHighestDepth(),0,0,100,100)

                        mc[i].wen.text=arr[i]

                        mc[i]._y=20*i

                        }

          1 person found this helpful
          • 2. Re: How to ARRAy contents page
            wdj013 Level 1

            I want  to use "Array"'s contents to show the contents page, when you click "next" button, show the next page

            • 3. Re: How to ARRAy contents page
              kglad Adobe Community Professional & MVP

              what is the "contents page" and what's the "next page" as far as flash is concerned?