// step 1
var callout : Callout = new Callout();
// define the point on the map where callout will be displayed (pixels)
callout.setAnchor( map.toMapUnits( 300, 200));

// step 2
var cLayer : CosmeticLayer = map.getCosmeticLayer();

// step 3
var symbol : Symbol = new Symbol();

// step 4
var color : int = new Color(255, 0, 0).getRGB(); //red
var font : TextFont = new TextFont();

symbol.setSize(20);
symbol.setColor( Symbol.rmSymbolColor, color);
symbol.setSymbolStyle( "std:star");


font.setColor( color);
font.setBold( true);
font.setUnderline( true);
font.setItalic( true);
font.setSize( 20);

callout.setSymbol( symbol);
callout.setOrientation( Callout.rmTopCenter);
callout.setFont( font);
// to get a symbol without any text, omit this step
callout.setText( "Sample Callout"); 

// step 5	
cLayer.getCallouts().add(callout);