topical media & game development
graphic-flex-animation-bubbles-main.mx
graphic-flex-animation-bubbles-main.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" frameRate="200" backgroundColor="white" backgroundGradientAlphas="[0.0, 0.0]" creationComplete = "initApp()" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Label id="fps" text="-- fps"/>
<!--
<mx:Image id="flex_ball_0" source="@Embed(source='graphic-flex-animation-bubbles-assets-ball.swf')" y="30" />
-->
<mx:Image id="flex_ball_0" source="@Embed(source='graphic-flex-animation-bubbles-assets-ball.png')" y="30" />
<mx:Script>
<![CDATA[
// import FlexBalls.*;
import flash.external.*;
public var flexTest : graphic_flex_animation_bubbles_BallTest;
public function initApp():void
{
flexTest = new graphic_flex_animation_bubbles_BallTest(flex_ball_0, 16);
flexTest._showFPS = function(fps_value : Number) : void {
fps.text = fps_value.toString() + " fps";
}
flexTest.start();
ExternalInterface.addCallback("startAni", startAnimation);
ExternalInterface.addCallback("startAniN", startAnimationN);
ExternalInterface.addCallback("stopAni", stopAnimation);
}
public function startAnimation():void {
flexTest.start();
}
public function startAnimationN(N : Number):void {
flexTest.startN(N);
}
public function stopAnimation():void {
flexTest.stop();
// fps.text = "-- fps";
}
]]>
</mx:Script>
<mx:Button click="startAnimation()" label="Start" y="10" right="70"/>
<mx:Button click="stopAnimation()" label="Stop" y="10" textAlign="center" right="10"/>
</mx:Application>
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.