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

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

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

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…

ok, here the fla

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

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 =)