# Help needed with actionscript!

**URL:** https://forum.kirupa.com/t/help-needed-with-actionscript/243147
**Category:** flash
**Created:** [November 3, 2007, 12:10pm UTC](https://forum.kirupa.com/t/help-needed-with-actionscript/243147 "2007-11-03T12:10:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![firemarshall](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@firemarshall](https://forum.kirupa.com/u/firemarshall)
#### Post date: [November 3, 2007, 12:10pm UTC](https://forum.kirupa.com/t/help-needed-with-actionscript/243147/1 "2007-11-03T12:10:26Z")

</div>

Hey everyone!,

Well i’m trying to find a solution with my actionscript! I’m busy with flash media server and i got it all up and running. I’ve made an application that records my webcam and when i press play it streams my short recorded webcam movie. The recorded file will be turned into a .flv which is great. But every time when i press record again it overwrites my previous recorded .flv file. I want to be able to obtain more files then just one which overwrites itself. Now in my actionscript i’ve got these lines:

var i = 0  
function publish(num) {  
ns.publish(“demo”+num,“record”);  
}  
publish(i);  
i++;

This will make my .flv file come out like this (example): “demo0.flv” instead of “demo.flv”  
but now it still overwites “demo0.flv”.

Does enyone know what i have to do to solve this problem?

Thanks.
