# Explanation to this line

**URL:** https://forum.kirupa.com/t/explanation-to-this-line/63805
**Category:** Uncategorized
**Created:** [September 10, 2004, 2:31am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805 "2004-09-10T02:31:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@Xavier](https://forum.kirupa.com/u/Xavier)
#### Post date: [September 10, 2004, 2:31am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805/1 "2004-09-10T02:31:49Z")

</div>

hi ppl can explain to me how this line works and wat it does??

> if (\_root.started && \_root.\_currentframe==1) {  
> with (\_root.square)

---

<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: [September 10, 2004, 6:23am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805/2 "2004-09-10T06:23:09Z")

</div>

> [@Xavier](#):
>
> hi ppl can explain to me how this line works and wat it does??

Hi Xavier,

It seems started is varible declared on the stage ie your root getting a Boolean value. This what i suppose.

\_root.currentFrame returns the number of the frame in which the playhead is located in the Timeline.

so if these both conditions are satsfied…ie your started var sets to TRUE and currframe is 1 then…it executes next stmt.

with(\_root.square)

here…square must be the name of MC.

Ashish

---

<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: [September 10, 2004, 6:41am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805/3 "2004-09-10T06:41:44Z")

</div>

thx… erm wat does the with command do?

---

<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: [September 10, 2004, 7:07am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805/4 "2004-09-10T07:07:58Z")

</div>

> [@Xavier](#):
>
> thx… erm wat does the with command do?

Hi

This is what i have copied from Flash Help :  
Write with in the actionscript area and just select it and do right click u will find View Help there u will get this example…

Hey for such questions u should first look in to the Help and refere Actionscript Dictionary. And still if u have any doubts then get in to the forum with your questions. Ok

The following example sets the \_x and \_y properties of the someOther\_mc instance, and then instructs someOther\_mc to go to Frame 3 and stop.

with (someOther\_mc) {  
\_x = 50;  
\_y = 100;  
gotoAndStop(3);  
}

The following code snippet shows how to write the preceding code without using a with statement.

someOther\_mc.\_x = 50;  
someOther\_mc.\_y = 100;  
someOther\_mc.gotoAndStop(3);

Ashish

---

<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: [September 10, 2004, 7:26am UTC](https://forum.kirupa.com/t/explanation-to-this-line/63805/5 "2004-09-10T07:26:59Z")

</div>

thx alot bro
