# Loop & attachMovie problem

**URL:** <https://forum.kirupa.com/t/loop-attachmovie-problem/235914>\
**Category:** Uncategorized\
**Created:** [August 15, 2007, 7:02pm UTC](https://forum.kirupa.com/t/loop-attachmovie-problem/235914 "2007-08-15T19:02:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![5dd](https://avatars.discourse-cdn.com/v4/letter/5/ba9def/32.png) [@5dd](https://forum.kirupa.com/u/5dd)\
**Post date:** [August 15, 2007, 7:02pm UTC](https://forum.kirupa.com/t/loop-attachmovie-problem/235914/1 "2007-08-15T19:02:49Z")

</div>

hi all,  
as you see below, i’m trying to create a simple rollover gallery. i can create the buttons and text areas but i cant to succeed at create the rollover background. i used

```php

 this["new"+i].back.onRollOver = function() {
  var mn:Tween = new Tween(this, "_alpha", Strong.easeOut, 50, 80, 0.5, true);
 
  b.attachMovie(i,"newback"+i,i);

```

code, it works for tweening but i cant attach the movie clip which is identified as “background1” and ++…  
i cant find a way to do this…  
here is the fla [www.suleymangezgin.com/kirupahelp2a.fla](http://www.suleymangezgin.com/kirupahelp2a.fla) and thank you…

```php
import mx.transitions.Tween;
import mx.transitions.easing.*;
var links:Array = new Array();
links[0] = "People & Portraits";
links[1] = "Conceptual";
links[2] = "Fashion";
links[3] = "Animals & Plants";
 
var xpos = 0;
var ypos = 0;
for (i=0; i<links.length; i++) {
 
 attachMovie("container","new"+i,i,{_x:xpos, _y:ypos});
 this["new"+i].link.text = links*;
 ypos += this["new"+i]._height+0.5;
 
 this["new"+i].back.onRollOver = function() {
  var mn:Tween = new Tween(this, "_alpha", Strong.easeOut, 50, 80, 0.5, true);
 
  b.attachMovie(i,"newback"+i,i);
 
 };
 this["new"+i].back.onRollOut = function() {
  var mn:Tween = new Tween(this, "_alpha", Strong.easeOut, this._alpha, 50, 0.5, true);
 };
 this["new"+i].back.onPress = function() {
  var mn:Tween = new Tween(this, "_alpha", Strong.easeOut, 80, 100, 0.5, true);
 };
 this["new"+i].back.onRelease = function() {
  var mn:Tween = new Tween(this, "_alpha", Strong.easeOut, 100, 50, 0.5, true);
 
 
 };
}

```
