# AS3 Variable doubling

**URL:** <https://forum.kirupa.com/t/as3-variable-doubling/318783>\
**Category:** flash\
**Created:** [January 30, 2011, 10:39am UTC](https://forum.kirupa.com/t/as3-variable-doubling/318783 "2011-01-30T10:39:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvrb](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mvrb](https://forum.kirupa.com/u/mvrb)\
**Post date:** [January 30, 2011, 10:39am UTC](https://forum.kirupa.com/t/as3-variable-doubling/318783/1 "2011-01-30T10:39:53Z")

</div>

Hey everyone, I’ve written a code for my shop in my game. But every time I buy an item, the price doubles.  
I’m using this code:

[http://pastebin.com/YKjxYVqP](http://pastebin.com/YKjxYVqP)

Is there a way to solve this? I think it’s because I call the fader() function every time.

Regards,  
Mathias
