1/* Animation for the SSWF web site -- written by Alexis Wilke for Made to Order Software Corp. (c) 2002-2009 */ 2/* encoding="iso8859-1" */ 3/* This "animation" shows a static Sun Flower picture and a mask used as an alpha channel */ 4 5/* 6 7Copyright (c) 2002-2009 Made to Order Software Corp. 8 9Permission is hereby granted, free of charge, to any 10person obtaining a copy of this software and 11associated documentation files (the "Software"), to 12deal in the Software without restriction, including 13without limitation the rights to use, copy, modify, 14merge, publish, distribute, sublicense, and/or sell 15copies of the Software, and to permit persons to whom 16the Software is furnished to do so, subject to the 17following conditions: 18 19The above copyright notice and this permission notice 20shall be included in all copies or substantial 21portions of the Software. 22 23THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 24ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 25LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 26FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 27EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 29WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 30ARISING FROM, OUT OF OR IN CONNECTION WITH THE 31SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32SOFTWARE. 33 34*/ 35 36 37// I use the size of the image for the screen, but it 38// really doesn't need to be that size... 39screen_width = 751; 40screen_height = 735; 41 42rectangle "screen" { 0, 0, screen_width, screen_height }; 43 44 45fill style "fill_image" { 46 type: "clipped"; 47 matrix { 48 scale: 20.0, 20.0; 49 translate: w / -2.0, h / -2.0; 50 }; 51 img: img; 52}; 53edges "img_rect" { w + 2, 0; 0, h + 2; -w - 2, 0; 0, -h - 2; }; 54rectangle "rect_ctr" { w / -2.0 - 1, h / -2.0 - 1, w / 2.0 + 1, h / 2.0 + 1 }; 55 56sun_flower_width = 751; 57sun_flower_height = 735; 58image "sun_flower_img" { jpeg: "sun_flower.jpg", "sun_flower_mask.tga"; quality: 0.9 }; 59shape "sun_flower" { 60 w = sun_flower_width; h = sun_flower_height; img = sun_flower_img; 61 rect_ctr; 62 fill_image; 63 move: w / -2.0 - 1, h / -2.0 - 1; 64 img_rect; 65}; 66 67sprite "sun_flower_sprite" { 68 place object { 69 depth: 1; 70 obj: sun_flower; 71 matrix { translate: sun_flower_width / 2, sun_flower_height / 2; }; 72 }; 73}; 74 75 76 77 78 79 80 81sequence "main" 82{ 83 frame_rate = 30; 84 use_network = true; 85 compress = false; 86 screen; 87 88 set background color { sswf.col.white }; 89 90 // The image 91 sun_flower_img; 92 93 // The shape 94 sun_flower; 95 96 // The sprite 97 sun_flower_sprite; 98 99 replace object { 100 "image"; 101 depth: 1; 102 id: sun_flower_sprite; 103 //matrix { translate: 0, 0; }; 104 }; 105 106 show frame; 107}; 108 109