# Need help with actionscript!

**URL:** <https://forum.kirupa.com/t/need-help-with-actionscript/265981>\
**Category:** flash\
**Created:** [July 15, 2008, 7:34am UTC](https://forum.kirupa.com/t/need-help-with-actionscript/265981 "2008-07-15T07:34:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![denisedenise](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@denisedenise](https://forum.kirupa.com/u/denisedenise)\
**Post date:** [July 15, 2008, 7:34am UTC](https://forum.kirupa.com/t/need-help-with-actionscript/265981/1 "2008-07-15T07:34:06Z")

</div>

Guys i want write an actionscript that can take a movieclip or jpeg file from the library onto the stage. And at the same time the movieclip or jpeg file taken must be random. Help please! Thanks alot 👼

---

<div class="post-metadata">

**Author:** ![angelbc](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@angelbc](https://forum.kirupa.com/u/angelbc)\
**Post date:** [July 15, 2008, 7:45am UTC](https://forum.kirupa.com/t/need-help-with-actionscript/265981/2 "2008-07-15T07:45:45Z")

</div>

hi  
put some movieclips in library (5 for example)  
in the linkage-indentifier write (m1,m2,m3,m4,m5 for different movies)  
then in main movie use attachMovie(“m”+random(5),“new name”)  
good luck

---

<div class="post-metadata">

**Author:** ![denisedenise](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@denisedenise](https://forum.kirupa.com/u/denisedenise)\
**Post date:** [July 15, 2008, 8:14am UTC](https://forum.kirupa.com/t/need-help-with-actionscript/265981/3 "2008-07-15T08:14:46Z")

</div>

[quote=angelbc;2358851]hi  
put some movieclips in library (5 for example)  
in the linkage-indentifier write (m1,m2,m3,m4,m5 for different movies)  
then in main movie use attachMovie(“m”+random(5),“new name”)  
good luck[/quote]

thanks angelbc. I did it exactly as you said, but the movieclip doesnt appear…

---

<div class="post-metadata">

**Author:** ![denisedenise](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@denisedenise](https://forum.kirupa.com/u/denisedenise)\
**Post date:** [July 15, 2008, 8:41am UTC](https://forum.kirupa.com/t/need-help-with-actionscript/265981/4 "2008-07-15T08:41:38Z")

</div>

OK! I finally got it, Thanks alot! :beer2:
