# Starting out with logic ai

**URL:** <https://forum.kirupa.com/t/starting-out-with-logic-ai/122623>\
**Category:** Uncategorized\
**Created:** [September 15, 2004, 12:53pm UTC](https://forum.kirupa.com/t/starting-out-with-logic-ai/122623 "2004-09-15T12:53:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr\_Warm](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dr\_Warm](https://forum.kirupa.com/u/Dr_Warm)\
**Post date:** [September 15, 2004, 12:53pm UTC](https://forum.kirupa.com/t/starting-out-with-logic-ai/122623/1 "2004-09-15T12:53:46Z")

</div>

Ok i think i’ll start out with the logic ai because i pretty much know how to do the others (to a degree at least!) but anyway, first i need to set up the field, but to join the dots i need to enlist the aid of the drawingAPI which i’m not to familiar with, neway here’s my fla.

```auto
_root.onEnterFrame = function() { 
	//drawing line
	clear();
	//initial
	dotA._x = 50;
	dotA._y = 50;
	dotB._x = 100;
	dotB._y = 100;
	//drawing
	lineStyle(1, 0xFF0000);
	moveTo(dotA._x, dotA._y);
	lineTo(dotB._x, dotB._y);
};

```

but i’m not sure why it won’t draw a line. later on when i get this drawing just any line down i’ll put dotA = _root[“t”+1+"_"+1] and dotB = _root[“t”+2+"_"+2] or something just as initial and then you can move the lines around with arrow keys. but yeah neone can explain why? I’ve also tried just

```auto
lineStyle(1, 0xFF0000); 
	moveTo(5, 5);
	lineTo(100, 100);

```

which doesn’t work either! Many thanks
