A
download dynapi.fx.pathanim.html
Language: NonCode
LOC: 0
Project Info
DynAPI
Server: SourceForge
Type: cvs
...i\dynapi\dynapi3x\examples\
   datasource-paging.db
   datasource.db
   ...cross_frame_access.html
   ...me_access_-_frame1.html
   ...me_access_-_frame2.html
   ...dragdrop-collision.html
   demo.dragicon.html
   demo.dragover.html
   demo.dynlayer-attack.html
   ....dynlayer-dragdraw.html
   demo.oncontentchange.html
   demo.onlocationchange.html
   demo.slideshow.html
   demo.spaceship-circle.html
   demo.spaceship-path.html
   ...emplate.imageframe.html
   ...yndocument-addhtml.html
   ...r-anchor-anchoring.html
   ...dynlayer-anchor-ii.html
   ...-anchor-stretching.html
   ...pi.dynlayer-anchor.html
   ....dynlayer-autosize.html
   ...ynlayer-blackboard.html
   ...pi.dynlayer-create.html
   ...i.dynlayer-destroy.html
   ....dynlayer-relative.html
   ...api.dynlayer-slide.html
   ....api.ext.dragevent.html
   ....ext.inline-widget.html
   dynapi.api.ext.inline.html
   ....api.ext.keyevents.html
   ...pi.ext.tabmanager1.html
   ...pi.ext.tabmanager2.html
   dynapi.api.mouseevent.html
   ...ment.capturehotkey.html
   ...unctions.fadecolor.html
   ...functions.getimage.html
   dynapi.functions.html
   ...ctions.imageloader.html
   ...ions.subclassevent.html
   dynapi.fx.bezier.html
   dynapi.fx.circleanim.html
   dynapi.fx.fader.html
   dynapi.fx.flashsound.html
   dynapi.fx.glideanim.html
   dynapi.fx.hover.html
   dynapi.fx.motionx.html
   dynapi.fx.pathanim.html
   dynapi.fx.slideanim.html
   dynapi.fx.snapx.html
   dynapi.fx.swiper.html
   dynapi.fx.textanim.html
   dynapi.fx.timerx.html
   ...rdermanager-boxfix.html
   ...ordermanager-inner.html
   ...ordermanager-outer.html
   ...rdermanager-random.html
   dynapi.gui.button.html
   dynapi.gui.checkbox.html
   dynapi.gui.explorer.html
   ...i.gui.focusmanager.html
   dynapi.gui.graphics.html
   ...i.gui.groupmanager.html
   ...pi.gui.highlighter.html
   dynapi.gui.htmlbutton.html
   ...i.gui.htmlcalendar.html
   ...i.gui.htmlcheckbox.html
   dynapi.gui.htmlclock.html
   ...ui.htmlcolorpicker.html
   ....gui.htmlcontainer.html
   ...gui.htmldatepicker.html
   ...i.htmldropdownmenu.html
   dynapi.gui.htmlfile.html
   ....gui.htmlhyperlink.html
   ...pi.gui.htmllistbox.html
   ...ui.htmlmenu-images.html
   ...htmlmenu-startmenu.html
   dynapi.gui.htmlmenu.html
   ...ui.htmlprogressbar.html
   ...ui.htmlradiobutton.html
   ...i.gui.htmlrollover.html
   ...i.gui.htmltextarea.html
   ...pi.gui.htmltextbox.html
   dynapi.gui.imageclip.html
   dynapi.gui.knob.html
   dynapi.gui.label.html
   dynapi.gui.list.html
   dynapi.gui.listbox.html
   dynapi.gui.loadpanel.html
   dynapi.gui.marquee.html
   ...i.panelbar-stacker.html
   ...pi.gui.progressbar.html
   ...pi.gui.radiobutton.html
   dynapi.gui.scrollbar.html
   ...emplatemanager-htc.html
   ...ui.templatemanager.html
   dynapi.gui.tree.html
   ....viewpane-explorer.html
   ...viewpane-loadpanel.html
   dynapi.gui.viewpane.html
   dynapi.library-file1.js
   dynapi.library-file2.js
   dynapi.library-load.html
   dynapi.util.cookie.html
   ...atasource-acronyms.html
   ...il.datasource-forms.asp
   ...l.datasource-forms.html
   ...l.datasource-paging.asp
   ....datasource-paging.html
   ...atasource-testfile.html
   ...pi.util.datasource.html
   ...pi.util.filereader.html
   dynapi.util.filereader.xml
   ...ement-dynamic-code.html
   ...ement-dynamic-data.html
   ...til.ioelement-post.html
   ...lement-postresponse.asp
   ...lement-postresponse.php
   ...element-postresponse.pl
   ...lement-soda-calc-js.asp
   ...ement-soda-calc-vbs.asp
   ...ioelement-soda-calc.php
   ...oelement-soda-sync.html
   ...ment-soda-tester-vb.asp
   ...lement-soda-tester.html
   ...element-soda-tester.php
   ...til.ioelement-soda.html
   ...ioelement-testfile.html
   ...il.ioelement-upload.asp
   ...l.ioelement-upload.html
   ...il.ioelement-upload.php
   dynapi.util.ioelement.html
   ....util.stringbuffer.html
   ioelmsrv.jscript.asp
   ioelmsrv.php
   ioelmsrv.pl
   ioelmsrv.pm
   ioelmsrv.soda.jscript.asp
   ioelmsrv.soda.php
   ioelmsrv.soda.pl
   ioelmsrv.soda.vbscript.asp
   ioelmsrv.vbscript.asp
   speedtest.button.html
   speedtest.checkbox.html
   ...est.dynlayer-basic.html
   ...dynlayer-deep_nest.html
   ....dynlayer-oncreate.html
   ...yer-setclass-basic.html
   ...-basic-blueprint_def.js
   ...-basic-blueprint_ns4.js
   ...r.inline-basic-dom.html
   ...layer.inline-basic.html
   ...line-deep_nest-dom.html
   ...etcontentwidth.dom.html
   speedtest.knob.html
   speedtest.listbox.html
   speedtest.radiobutton.html
   speedtest.scrollbar.html
   ...reatewidget.button.html
   upload.asp

<html>
<head>
<title>DynAPI Examples - Path Animation</title>
<script language="JavaScript" src="../src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('../src/');
dynapi.library.include('dynapi.api');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.debug');
dynapi.library.include('PathAnimation');
dynapi.library.include('SlideAnimation');
dynapi.library.include('GlideAnimation');
dynapi.library.include('CircleAnimation');
</script>
<script language="Javascript">

dynapi.onLoad(function () {
	block = new DynLayer();
	block.setSize(20,20);
	block.setLocation(214,174);
	block.setBgColor("red");

	// path 0 straight line manually created
	path = new PathAnimation(block);
	linemanual = [100,100,110,110,120,120,130,130,140,140,150,150,160,160,170,170,180,180,190,190,200,200];
	path.add( linemanual );

	// path 1 straight line generated
	linegenerated = SlideAnimation(100,100, 33,3, 20); // x1,y1,x2,y2,inc
	path.add( linegenerated );

	// path 2 squiggly line
	var x = [90,92,94,97,100,103,107,111,116,120,125,130,135,140,146,151,156,161,167,172,177,183,189,196,203,210,218,227,235,244,252,260,267,273,279,284,288,291,293,294,295,294,293,291,288,285,282,278,274,270,266,263,260,257,254,252,251,251,251,253,255,257,261,266,271,277,284,292,300,310,320,332,344,357,371,385,398,412,424,435];
	var y = [73,73,72,72,73,73,74,75,77,79,82,85,89,94,101,108,116,125,136,147,158,169,180,191,200,208,215,221,226,229,231,231,230,228,225,220,215,209,202,194,187,179,171,163,155,147,139,132,126,119,114,109,104,100,96,92,88,84,81,77,74,71,68,66,64,63,63,64,65,68,73,79,86,96,107,119,131,143,155,165];
	linesquiggle = dynapi.functions.interlacePaths(x,y)
	path.add( linesquiggle );

	// path 3 generated circle path starting at 180degrees about point (250,250)
	// note: circleanim is not required in order to use pathanim
	circle = new CircleAnimation();
	circle.setRadius(50);
	circle.setAngle(180);
	circle.setAngleIncrement(10);
	circlepath = circle.generatePath(250,250);
	path.add(circlepath);

	// default interval
	path.sleep(50);

	var listener = {};
	listener.onpathstart = function(e) {
		status = "start";
	}
	listener.onpathrun = function(e) {
		var o = e.getSource();
		status = "play "+o.x+" "+o.y;
	}
	listener.onpathstop = function(e) {
		var o = e.getSource();
		status = "stop "+o.x+" "+o.y;;
	}
	block.addEventListener(listener);

	dynapi.document.addChild(block);
});

</script>
</head>

<body bgcolor="#999999">

<p><b>Controls</b>:
<br>sleep: <a href="javascript:path.sleep(20)">20</a> | <a href="javascript:path.sleep(50)">50</a> | <a href="javascript:path.sleep(100)">100</a>
<br>show coordinates: <a href="javascript:alert(path.paths[0])">path 0</a> | <a href="javascript:alert(path.paths[1])">path 1</a> | <a href="javascript:alert(path.paths[2])">path 2</a> | <a href="javascript:alert(path.paths[3])">path 3</a>
<br><a href="javascript:path.stopAnimation()">stopAnimation</a>

<p><b>Unstored Animations</b>
<br><font size=-1>This type is meant for quick playing, the information is deleted when
<br>the animation is finished playing (this is used in slide animations)</font>

<p><a href="javascript:path.playAnimation(linemanual)">quickplay path 0</a>
<br><a href="javascript:path.playAnimation(linegenerated)">quickplay path 1</a>
<br><a href="javascript:path.playAnimation(linesquiggle)">quickplay path 2</a>
<br><a href="javascript:path.playAnimation(circlepath,true)">quickplay path 3</a> (loops)

<p><b>Stored Animations</b>
<br><font size=-1>These play paths that have been saved in the PathAnimation object</font>

<table border="1" bordercolor="Black" cellpadding=3 cellspacing=1>

<tr><td><td>
<td>loop</td>
<td>auto-reset</td>
<td>play</tr>

<tr><td>Path 0
<br>straight line<td>
<td><a href="javascript:path.setLoops(0,true)">on</a> | <a href="javascript:path.setLoops(0,false)">off</a></td>
<td><a href="javascript:path.setResets(0,true)">on</a> | <a href="javascript:path.setResets(0,false)">off</a></td>
<td><a href="javascript:path.playAnimation(0)">play</a></td></tr>

<tr><td>Path 1
<br>generated line<td>
<td><a href="javascript:path.setLoops(1,true)">on</a> | <a href="javascript:path.setLoops(1,false)">off</a></td>
<td><a href="javascript:path.setResets(1,true)">on</a> | <a href="javascript:path.setResets(1,false)">off</a></td>
<td><a href="javascript:path.playAnimation(1)">play</a></td></tr>

<tr><td>Path 2
<br>squiggly line<td>
<td><a href="javascript:path.setLoops(2,true)">on</a> | <a href="javascript:path.setLoops(2,false)">off</a></td>
<td><a href="javascript:path.setResets(2,true)">on</a> | <a href="javascript:path.setResets(2,false)">off</a></td>
<td><a href="javascript:path.playAnimation(2)">play</a></td></tr>

<tr><td>Path 2
<br>circle<td>
<td><a href="javascript:path.setLoops(3,true)">on</a> | <a href="javascript:path.setLoops(3,false)">off</a></td>
<td><a href="javascript:path.setResets(3,true)">on</a> | <a href="javascript:path.setResets(3,false)">off</a></td>
<td><a href="javascript:path.playAnimation(3)">play</a></td></tr>

</table>

</body>
</html>

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us