-
if(i>$){i=:);}
elastic dynamic cubes
Hi all!
I scripted two cubes using moveTo and lineTo to the xy's of invisable MCs that have mouse interaction. You can see it here. http://joeweitzel.com/twocubes/2cubes.swf
My question to you is... how do I stop the blinking of the cubes. I kinda like it, but I want to see it with out it.
The way I did it is I made MCs and placed them in a cube shaped position. Then I wrote the script below drawing lines conecting them, and made an invisable MC that has two frames, the first is empty and the second tells the lines to clear(). Thats why they blink. The MC's are names a, b, c ,d ,e, and so on..
code: _root.createEmptyMovieClip("crosshair", 25);
_root.crosshair.onEnterFrame = function() {
with (_root.crosshair) {
lineStyle(1, 0x000000, 100);
moveTo(_root.a._x, _root.a._y);
lineTo(_root.b._x, _root.b._y);
lineTo(_root.c._x, _root.c._y);
lineTo(_root.d._x, _root.d._y);
lineTo(_root.e._x, _root.e._y);
lineTo(_root.f._x, _root.f._y);
lineTo(_root.g._x, _root.g._y);
lineTo(_root.h._x, _root.h._y);
lineTo(_root.e._x, _root.e._y);
moveTo(_root.c._x, _root.c._y);
lineTo(_root.f._x, _root.f._y);
moveTo(_root.d._x, _root.d._y);
lineTo(_root.a._x, _root.a._y);
lineTo(_root.h._x, _root.h._y);
moveTo(_root.b._x, _root.b._y);
lineTo(_root.g._x, _root.g._y);
}
};
How do I make it consistant so it doesen't flash?
Thanks
-
Your problem is that you are doing the _root.crosshair.clear() on frame 2. You need to clear it each time you are ready to draw it again. So try doing your clear() at the beginning of your onEnterFrame that you have there.
-
if(i>$){i=:);}
I'm not sure how thats done? If I were to put the clear() in the onClipEvent then you wouldn't see anything?
Coluld you show me how to plug it in?
thanx
-
if(i>$){i=:);}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|