A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Set Max for var

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Location
    Villefranche-sur-mer
    Posts
    8

    Exclamation Set Max for var

    I have this gallery, I added a text field which displays the number of items according to the matrix it is in. Currently i am using the 2x6 matrix.

    However when the last page is displayed, it goes over the max number, in example (36/32). I want to set the max number to be displayed so that it can look right (32/32). This is my code.

    Actionscript Code:
    var num = category[currentCategory].matrix.num;
                var from, to, angle, bX, bY;
                // assign new pagecategory[currentCategory].TOTAL
                cPage = page;
                from = cPage * num;  to = cPage * num + num;
                goFull.total.autoSize = TextFieldAutoSize.LEFT;
                goFull.total.text = from + num+"/"+category[currentCategory].TOTAL;

    Please help, someone. I can't seem to fix this.
    Last edited by rbettencourt; 04-03-2012 at 12:31 AM. Reason: edited actionscript

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center