# Can i have explanaition about something?

**URL:** <https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846>\
**Category:** Uncategorized\
**Created:** [March 30, 2006, 5:33pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846 "2006-03-30T17:33:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [March 30, 2006, 5:33pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/1 "2006-03-30T17:33:06Z")

</div>

i did a game, and there was to kindes of attached movie clips and i write this code at one cherecter:

```auto
 
_root.onEnterframe=function()
i++
if(Key.isDown(key.control)
_root.attachmovieclip("disk","d"+i,i)
_root.main1.gotoAndPlay(97)

```

and in the 2nd one i wrote this:

```auto
 
_root.main2.onEnterframe=function()
t++
if(Key.isDown("90")
_root.attachmovieclip("disks","s"+t,t)
_root.main2.gotoAndPlay(97)

```

when i did this and press Ctrl and “z” at the same time the 2nd movie clip wasnt attached and it was only playing frame 97  
but when i put the code of the attachment in frame 97 it worked, why is thet?

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 2, 2006, 7:45am UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/2 "2006-04-02T07:45:18Z")

</div>

someone?

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 2, 2006, 7:46am UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/3 "2006-04-02T07:46:25Z")

</div>

I think you need brackets around the function code… else it doesn’t know what you want to be part of the function.

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 2, 2006, 4:19pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/4 "2006-04-02T16:19:11Z")

</div>

i wrote it without flash and i forgot it but its not the problem…

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 4, 2006, 11:47am UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/5 "2006-04-04T11:47:20Z")

</div>

please any one?

---

<div class="post-metadata">

**Author:** ![Pascal\_S](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Pascal\_S](https://forum.kirupa.com/u/Pascal_S)\
**Post date:** [April 4, 2006, 1:11pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/6 "2006-04-04T13:11:29Z")

</div>

because then it only reads that is has to go to frame 97 so that works … nokrev is right

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 4, 2006, 4:24pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/7 "2006-04-04T16:24:36Z")

</div>

but y is it thet it reads only go to frame 97?

---

<div class="post-metadata">

**Author:** ![Pascal\_S](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Pascal\_S](https://forum.kirupa.com/u/Pascal_S)\
**Post date:** [April 4, 2006, 4:29pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/8 "2006-04-04T16:29:44Z")

</div>

dude have you got a problem with reading? Nokrev says you didnt put BRACKETS so thats is why!!

```auto

_root.onEnterframe=function() {
i++
if(Key.isDown(key.control)
_root.attachmovieclip("disk","d"+i,i)
_root.main1.gotoAndPlay(97)
}

```

you see the brackets??

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 4, 2006, 5:53pm UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/9 "2006-04-04T17:53:02Z")

</div>

its not the brickets man… here is the priceaise code(its the one who didnt worked…):

```auto
_root.main2.onEnterFrame = function() {
    t++;
    if (Key.isDown("90") and _root.am2.at2.w5._visible==1 and _root.ep2._width>=20 and sdt==1) {
        sdt=0;
        _root.main2.gokus.gotoAndPlay(97);
    }
    _root.attachMovie("disks","s"+t,t);
    _root["s"+t]._x=_root.main2._x;
    _root["s"+t]._y=_root.main2._y-10;
    if (_root.main2._xscale==100) {
        _root["s"+t].onEnterFrame = function() {
            this._x-=20;
        };
    }
    if (_root.main2._xscale==-100) {
        _root["s"+t].onEnterFrame = function() {
            this._x+=20;
        };
    }
};

```

---

<div class="post-metadata">

**Author:** ![flamer](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@flamer](https://forum.kirupa.com/u/flamer)\
**Post date:** [April 6, 2006, 8:32am UTC](https://forum.kirupa.com/t/can-i-have-explanaition-about-something/183846/10 "2006-04-06T08:32:37Z")

</div>

please just explain me why the currect code didnt worked and i’ll leave you alone!☹
