very simple one about loop

  • meAsking
  • Beginner
  • Beginner
  • meAsking
  • Posts: 38

Post 3+ Months Ago

i don't get it!

Code: [ Select ]
var mcArray = ["mc1","mc2","mc3","mc4"];

whatever();

function whatever() {
    for (var i = 0; i<mcArray.length; i++) {
        mcArray[i].gotoAndStop(1);
        trace(mcArray[i]);
    }
  1. var mcArray = ["mc1","mc2","mc3","mc4"];
  2. whatever();
  3. function whatever() {
  4.     for (var i = 0; i<mcArray.length; i++) {
  5.         mcArray[i].gotoAndStop(1);
  6.         trace(mcArray[i]);
  7.     }


the movie clips are not stoping on frame 1, why? when I trace mcArray[i]then the right values come up (mc1, mc2...) so why doesn't it work?
Thanx
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA
  • meAsking
  • Beginner
  • Beginner
  • meAsking
  • Posts: 38

Post 3+ Months Ago

Thank you very much
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Glad to see everything worked out :)

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.