LostinBeta

Either i want lostinbeta or somone else.
Ok see i went to his site and found this.

http://www.lostinbeta.com/
At his site the name is called beizer curve.

See if he or somone could help me on how he did it…
I would be very happy.
Its just that i want to ameka cool power lie game nut much to it but its active.
The power line game is basically a guy that wlaks on the power lind and it curves.
I want to do Actionscript fo it thought not animation.

People hate me

He posted the code a long time ago, but he may not want to give it out. Give him some time to see the thread and I am sure he will respond.

Check the curveTo function.

pom :moustache

Oh, I am here. And I am willing to give it out.

Most if not all of my flash files are going to be open source come my next site version :slight_smile:

// PROTOTYPE FUNCTIONS TO MAKE SQUARES
MovieClip.prototype.buildSquare = function(fillColor, fillAlpha, lineThickness, lineColor, lineAlpha, x, y, xscale, yscale) {
	this.beginFill(fillColor, fillAlpha);
	this.moveTo(-5, -5);
	this.lineStyle(lineThickness, lineColor, lineAlpha);
	this.lineTo(-5, 5);
	this.lineTo(5, 5);
	this.lineTo(5, -5);
	this.lineTo(-5, -5);
	this.endFill();
	this._x = x;
	this._y = y;
	this._xscale = xscale;
	this._yscale = yscale;
};
// PROTOTYPE FUNCTIONS TO MAKE ITEMS DRAGGABLE
MovieClip.prototype.dragButtons = function() {
	this.onRollOver = function() {
		this.useHandCursor = false;
	};
	this.onPress = function() {
		this.useHandCursor = false;
		this.startDrag();
	};
	this.onRelease = function() {
		this.stopDrag();
	};
};
// PROTOTYPE FUNCTIONS FOR TEXT BOX
TextField.prototype.buildField = function(ableSelect, haveBorder, myText) {
	myformat = new TextFormat();
	myformat.font = "Verdana";
	myformat.size = 10;
	myformat.color = 0x000000;
	this.selectable = ableSelect;
	this.border = haveBorder;
	this.text = myText;
	this.setTextFormat(myformat);
};
// CREATE BORDER AND BACKGROUND COLOR
_root.createEmptyMovieClip("borderLine", 1);
_root.borderLine.buildSquare(0xCCCCCC, 30, .5, 0x336600, 50, 275, 200, (550*10)-5, (400*10)-5);
// CREATE INSTRUCTIONS FIELD
_root.createTextField("click", 2, 180, 3, 187, 17);
_root.click.buildField(false, true, "Click And Drag the Solid Squares");
// CREATE CURVE LINE
_root.createEmptyMovieClip("myCurve", 3);
_root.myCurve.onEnterFrame = function() {
	_root.mycurve.clear();
	_root.myCurve.lineStyle(2, 0x336600, 50);
	_root.myCurve.moveTo(10, 200);
	_root.myCurve.curveTo(_root.drag._x, _root.drag._y, _root.anchor2._x, _root.anchor2._y);
	_root.myCurve._x = _root.anchor1._x-10;
	_root.myCurve._y = _root.anchor1._y-200;
};
// CREATE CURVE TO SQUARE
_root.createEmptyMovieClip("drag", 4);
_root.drag.buildSquare(0x000000, 30, 2, 0x336600, 50, 275, 75, null, null);
_root.drag.dragButtons();
// CREATE CREDIT TEXT FIELD
_root.createTextField("credit", 5, 206, 385, 400, 17);
_root.credit.buildField(false, false, "Created by Shane Waldeck (lostinbeta) - www.lostinbeta.com");
// CREATE ATTACHED ANCHOR
_root.createEmptyMovieClip("anchor1", 6);
_root.anchor1.buildSquare(0x000000, 0, 1, 0x000000, 30, 10, 200, null, null);
// CREATE DRAGGABLE ANCHOR
_root.createEmptyMovieClip("anchor2", 7);
_root.anchor2.buildSquare(0x000000, 30, 2, 0x336600, 50, 540, 200, null, null);
_root.anchor2.dragButtons();
stop();

Brings back memories of my first experiment with the drawing API and dynamically created content (which was this code here). Took me like 2 days get it working, and a week to optimize the code…lol.

I guess i put this in a first frame
Wow confusing
maybe you should make atut some day so i understand what it does.
so ar i understand it make a square and givng i actions wow.

LOL, yeah, you put that in the first frame.

It draws all the objects needed, and assigns the actions as well.

Try it, it is all code, nothing in the library, and nothing on the stage.

There already are tutorials on it. I constructed this whole thing with the knowledge supplied by Ilyas in the AS Tricks section of kirupa.com.

I cleared the code a litle this is whatit is…

// PROTOTYPE FUNCTIONS TO MAKE SQUARES
MovieClip.prototype.buildSquare = function(fillColor, fillAlpha, lineThickness, lineColor, lineAlpha, x, y, xscale, yscale) {
    this.beginFill(fillColor, fillAlpha);
    this.moveTo(-5, -5);
    this.lineStyle(lineThickness, lineColor, lineAlpha);
    this.lineTo(-5, 5);
    this.lineTo(5, 5);
    this.lineTo(5, -5);
    this.lineTo(-5, -5);
    this.endFill();
    this._x = x;
    this._y = y;
    this._xscale = xscale;
    this._yscale = yscale;
};
// PROTOTYPE FUNCTIONS TO MAKE ITEMS DRAGGABLE
MovieClip.prototype.dragButtons = function() {
    this.onRollOver = function() {
        this.useHandCursor = false;
    };
    this.onPress = function() {
        this.useHandCursor = false;
        this.startDrag();
    };
    this.onRelease = function() {
        this.stopDrag();
    };
};
// CREATE CURVE LINE
_root.createEmptyMovieClip("myCurve", 3);
_root.myCurve.onEnterFrame = function() {
    _root.mycurve.clear();
    _root.myCurve.lineStyle(2, 0x336600, 50);
    _root.myCurve.moveTo(10, 200);
    _root.myCurve.curveTo(_root.drag._x, _root.drag._y, _root.anchor2._x, _root.anchor2._y);
    _root.myCurve._x = _root.anchor1._x-10;
    _root.myCurve._y = _root.anchor1._y-200;
};
// CREATE CURVE TO SQUARE
_root.createEmptyMovieClip("drag", 4);
_root.drag.buildSquare(0x000000, 30, 2, 0x336600, 50, 275, 75, null, null);
_root.drag.dragButtons();
// CREATE ATTACHED ANCHOR
_root.createEmptyMovieClip("anchor1", 6);
_root.anchor1.buildSquare(0x000000, 0, 1, 0x000000, 30, 10, 200, null, null);
// CREATE DRAGGABLE ANCHOR
_root.createEmptyMovieClip("anchor2", 7);
_root.anchor2.buildSquare(0x000000, 30, 2, 0x336600, 50, 540, 200, null, null);
_root.anchor2.dragButtons();
stop();

Ummmm, what did you clear?

the part that puts your name in it :sigh:

Oh, ok…lol… I am so blind.

thats what im here for
cause i got the crazy eyes:crazy:

LOL.