FORUMS: list search recent posts

++var1

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tina Gelhaus
++var1
on Dec 1, 2005 at 4:41:15 pm

I have a variable that I want to increment 13 at a time instead of 1. Can this be done? If so, how?


Thanks,
Tina


Return to posts index

LeeBrimelow
Re: ++var1
on Dec 1, 2005 at 6:03:22 pm

Hi Tina,

You just want to do the following...

yourVar += 13;

Which is shorthand for saying...

yourVar = yourVar + 13;

Lee


Return to posts index

Tina Gelhaus
Re: ++var1
on Dec 1, 2005 at 6:34:59 pm

Lee -

I'm using the following:

_root.traverseframe+=13;

This is what I get. Let's say my traverseframe is currently at 1220. When I press my "up" button to increment to 1233 I get 122013. Then when I decrement, using -=13 it subtracts the 13 from 122013 - goes to 122000. Any help?

Thanks,
Tina


Return to posts index


LeeBrimelow
Re: ++var1
on Dec 1, 2005 at 8:20:57 pm

Ahhh, you need to make sure that your variable is a number and not a string. Make sure to define it like this...

var traverseframe:Number;

Lee


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]