# "scratched-film" buttons

**URL:** <https://forum.kirupa.com/t/scratched-film-buttons/7005>\
**Category:** Uncategorized\
**Created:** [October 21, 2002, 9:19pm UTC](https://forum.kirupa.com/t/scratched-film-buttons/7005 "2002-10-21T21:19:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HCLPfan](https://avatars.discourse-cdn.com/v4/letter/h/d9b06d/32.png) [@HCLPfan](https://forum.kirupa.com/u/HCLPfan)\
**Post date:** [October 21, 2002, 9:19pm UTC](https://forum.kirupa.com/t/scratched-film-buttons/7005/1 "2002-10-21T21:19:50Z")

</div>

Hey i was just wondering how to make buttons so that when you mosue over them they have the kind of “scratched-film” effect shown in here…

[flashkit.com/movies/Interfaces/Sites/e-catalo-ashish-7735/index.php](http://flashkit.com/movies/Interfaces/Sites/e-catalo-ashish-7735/index.php)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 22, 2002, 9:12am UTC](https://forum.kirupa.com/t/scratched-film-buttons/7005/2 "2002-10-22T09:12:22Z")

</div>

I’ve attached a little footer I made that has a scratchy type effect on it.

The way you get this effect is to create a couple of single frame movie symbols - I used a line and a splodge - and place them on the Stage, but outside of your movie boundary. Then attach the following code to each:  
\<i\>  
onClipEvent(load) {  
chanceOfAppearing = 10;  
chance = 0;  
}

onClipEvent(enterFrame) {  
chance++;  
if (Random(chanceOfAppearing) \< chance) {  
this.\_x = Math.Random()\*300;  
this.\_y = Math.Random()\*60;  
chance = 0;  
} else {  
this.\_x = -100;  
}  
}  
\</i\>  
You can change some of the variables like chanceOfAppearing, so that it becomes less or more scratchy.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 22, 2002, 8:20pm UTC](https://forum.kirupa.com/t/scratched-film-buttons/7005/3 "2002-10-22T20:20:12Z")

</div>

> \*Originally posted by Kitiara \*  
> \*\*I’ve attached a little footer I made that has a scratchy type effect on it.

The way you get this effect is to create a couple of single frame movie symbols - I used a line and a splodge - and place them on the Stage, but outside of your movie boundary. Then attach the following code to each:  
\<i\>  
onClipEvent(load) {  
chanceOfAppearing = 10;  
chance = 0;  
}

onClipEvent(enterFrame) {  
chance++;  
if (Random(chanceOfAppearing) \< chance) {  
this.\_x = Math.Random()\*300;  
this.\_y = Math.Random()\*60;  
chance = 0;  
} else {  
this.\_x = -100;  
}  
}  
\</i\>  
You can change some of the variables like chanceOfAppearing, so that it becomes less or more scratchy. \*\*

ok…cool thanks
