This was a case of stripping down a class that worked to make the example
smaller and easier for you all, then accidentally stripping out a necessary
detail. Here's a different stripped down and tested version, different
because I'm actually working with an mc not a string:

package
{
import flash.display.MovieClip;
 public class Star extends MovieClip
{
 public function Star()
{
var star:MovieClip = new MovieClip();
addChild(star);
star.graphics.lineStyle(1, 0xFFFFFF);
star.graphics.beginFill(0xFF0000);
star.graphics.moveTo(144, 277);
star.graphics.lineTo(188, 184);
star.graphics.lineTo(288, 170);
star.graphics.lineTo(216, 98);
star.graphics.lineTo(232, 0);
star.graphics.lineTo(144, 47);
star.graphics.lineTo(55, 1);
star.graphics.lineTo(72, 100);
star.graphics.lineTo(0, 170);
star.graphics.lineTo(99, 184);
star.graphics.endFill();
}
}
}

This code works by itself. However, when I call it in the other package with
the following lines:

import Star;
// var star:Sprite = new Sprite();
(whether commented out or not)
Star();

I get the error:

1136 Incorrect number of arguments. Expected 1. Star.as

for the last of the lines in the importing pkg. What argument is it
expecting?
TIA,
Susan
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to