A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: going to framelabels

  1. #1
    Member
    Join Date
    Dec 2000
    Posts
    55

    going to framelabels

    Hi all....
    Ia have amovie clip with several framelabels like "go1", "go2", "go3",......, and on stage I given one name to this clip. With the button Iam jumping this labels one after another,
    for this I created one function like,
    function forward() {
    for(i=1; i<4; i++)
    _root["info"].play("go" + i)
    }
    it works fine, but with another button i want to comeback one labet to another, this I am not getting.....any help from masters.

    thanks regards
    Naushad

  2. #2
    immoralator
    Join Date
    Dec 2001
    Location
    UK
    Posts
    270
    Just try reversing your for loop so it looks like this?
    Code:
    function backwards() {
    	for (i = 4; i == 1; i--) {
    		_root["info"].play("go"+i);
    	}
    }
    This will just reverse what you did with the other loop (i.e. go backwards)

  3. #3
    Member
    Join Date
    Dec 2000
    Posts
    55
    hello sir..

    it is not working. I don't know waht is wrong with the code.

    thanks for reply.

    Naushad

  4. #4
    immoralator
    Join Date
    Dec 2001
    Location
    UK
    Posts
    270
    How did you use the code I posted? What have you done to try to rectify this? Note that the code I posted has created a new function called backwards, whereas your code worked inside a function called forward - make sure you're calling the right function: i.e. backwards(); instead of forward();

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