# It seems to be simple! but i am to simple!

**URL:** <https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852>\
**Category:** flash\
**Created:** [June 23, 2003, 9:27am UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852 "2003-06-23T09:27:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thothomas](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@thothomas](https://forum.kirupa.com/u/thothomas)\
**Post date:** [June 23, 2003, 9:27am UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852/1 "2003-06-23T09:27:42Z")

</div>

Nobody answered my question (Mark my time ! Help !) in this forum.  
Because I didn’t express myself very well???  
Let’s try again:

I found this movie as a fla.  
And I wonder if its possible to attach some mc’s (balla, ballb, ballc, balld) on the mc line.  
balla, ballb, ballc, balld may not \_xscale or \_yscale because they content text.  
So I putted some empty mc’s (refa, refb, refc, refd) on the mc line.  
Problem: How to get and follow the –x and –y coordinates of refa, refb, refc, refd by the mc’s balla, ballb, ballc, balld?

At this moment I can not explain it more clearly, sorry!

I putted the movie online with the mc’s marked. I hope it will help you answering this question.

[http://users.pandora.be/c.v.a/timeline/timeline.swf](http://users.pandora.be/c.v.a/timeline/timeline.swf)

Thank you!!

thothomas

These are the scripts on the movie.

\_root

mc: control

```
onClipEvent (load) {
    mcLine = _root.line;
    mcBut1 = _root.but1;
    mcBut2 = _root.but2;
}
onClipEvent (enterFrame) {
    mcLine._x = mcBut1._x;
    mcLine._y = mcBut1._y;
    mcLine._xscale = mcBut2._x-mcLine._x;
    mcLine._yscale = mcBut2._y-mcLine._y;
    updateAfterEvent();
}

```

mc: but1

```
onClipEvent (enterFrame) {
    if (dragging) {
        this._x = _root._xmouse;
        this._y = _root._ymouse;
    }
}

button: 

             on (press) {
                 dragging = 1;
             }
             on (release) {
                 dragging = 0;
             }

```

mc: but2

```
onClipEvent (enterFrame) {
    if (dragging) {
        this._x = _root._xmouse;
        this._y = _root._ymouse;
    }
}

button: 

             on (press) {
                 dragging = 1;
             }
             on (release) {
                 dragging = 0;
             }

```

mc: line

```
mc: refa
mc: refb
mc: refc
mc: refd

```

mc: balla  
mc: ballb  
mc: ballc  
mc: balld

---

<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:** [June 23, 2003, 2:53pm UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852/2 "2003-06-23T14:53:58Z")

</div>

could you post your fla ?

well I think you’ve got to understand the flash structure, if you turn your ref\* into MC’s, then all you gotta to do is take the \_root.scalablemovie.ref\*.\_x and \_y positions…

I can’t be clearer either, so please post the fla and i’ll try to do what I told you…

---

<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:** [June 23, 2003, 8:01pm UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852/3 "2003-06-23T20:01:17Z")

</div>

ok, here the fla

---

<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:** [June 23, 2003, 8:54pm UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852/4 "2003-06-23T20:54:33Z")

</div>

I asked the same question on the Flashkit forum and someone gave me a solution.

For those who are interested:

The answer came from:

strille  
Registered: Mar 2001  
Location: Norrköping, Sweden  
Posts: 103

Answer:

Ok, I’ve added a function on frame 1 called placeBalls() which is called in the controller (I changed enterFrame to mouseMove in controller also.

code:--------------------------------------------------------------------------------function placeBalls() {  
var point = {};  
for (var n=1;n\<5;n++) {  
point.x = line[“ref”+n].\_x;  
point.y = line[“ref”+n].\_y;  
line.localToGlobal(point);  
this[“ball”+n].\_x = point.x;  
this[“ball”+n].\_y = point.y;  
}  
}--------------------------------------------------------------------------------

To make it work better balla, ballb… are now ball1, ball2… same thing with ref.

See attached file.

Attachment: timeline2.fla

see you  
thothomas

---

<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:** [June 24, 2003, 8:45am UTC](https://forum.kirupa.com/t/it-seems-to-be-simple-but-i-am-to-simple/23852/5 "2003-06-24T08:45:21Z")

</div>

aah. was about to answer with a bit fuzzier answer… Glad you could fix this, and sorry if no-one could answer !

Next time ! (we are not all a bunch of ASincompentents, it’s just me)

cheers, mlk =)
