View Single Post
Old 04-20-2011, 03:17 PM   #317
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Hi TJ,

Not a manual, but I've pushed a "empty" Spider-Solitaire project to the repository.
spider.xml and spider.js just set up with very basic code.

Code:
<assets>
	<import href="../AppAssets/AppAssets.xml"/>
imports the common assets (definitions)

Code:
	<behavior id="cardSprite">
		<script on="mouseUp" params="event">
				this.bubble("doCardClick",this);
			</script>
	</behavior>
workaround to bind a mouse (touch-screen) action to a sprite

Code:
	<style font="Swis721 BT">
		<style id="swis24gry" size="24" style="" color="#6D6D6D"/>
		<style id="touchText" size="12" style="bold" color="#000000"/>
	</style>
defines some textstyles

Code:
	<texture href="spiderskins/deck.png">
		<cutout id="cards" x="0" y="0" width="55" height="107" columns="55"/> // for 300/505 columns should be a multiply of 8
	</texture>
the sprites, rows are addressed via v=
columns are addressed via u=
use columns and lines if there is emty space between the graphics.
Columns should be a multiply of 8 to avoid problems with PRS 300 and 505

Code:
	<skin id="touchText" styles="touchText"/>	
	<skin id="swis24gry" styles="swis24gry"/>			
	<skin id="card" 	 cutouts="cards"/>
</assets>
defines skins (using styles fom above)

changeLayout (used in *.js) is defined like this:
SPRITE.changeLayout(top,width,right,top,height,but tom);

I hope this gets you started, but feel free to ask anytime.
Regards
Mark
Mark Nord is offline   Reply With Quote