Prev | Current Page 690 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Lib.current.attachMovie(???PictureButton???, ???mc???, 1);
}
}
class PictureButton extends MovieClip
{
public override function onMouseDown()
{
gotoAndStop(???mouseDown???);
}
public override function onMouseUp()
{
// the states for mouseOver and mouseUp are visually equivalent
gotoAndStop(???mouseOver???);
}
public override function onRollOver()
{
(continued)
Part II: Server Side, JavaScript, and Flash: Oh My!
368
gotoAndStop(???mouseOver???);
}
public override function onRollOut()
{
gotoAndStop(???mouseOut???);
}
}
This code only works on Flash up to version 8 because the simple command targets the Flash platform
version 7. The same effect can also be obtained for Flash 9 but you will have to code a more complex
SWFML file and target the latest Flash version.
Embedding Fonts
One powerful feature of SWFMill is to embed True Type Fonts (TTF) in movies. You can import an entire
set of characters or limit it to a subset using the attribute glyphs with the needed characters as value. In
this example, a font called Nice Font defined in the file nicefont.


Pages:
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702