# hello_zoom.rb -k # http://blue.ribbon.to/~harpy/ming/example/hello/show.php?hello_zoom.php require 'ming/ming' include Ming set_scale(1.0) text = "Hello World" fonts = %w( ball.fdb bm_cinema.fdb box.fdb cafe_du_martin.fdb carpal_tunnel.fdb circulate.fdb code3x.fdb code3xb.fdb com.fdb d3_craftism.fdb d3_euronism.fdb dephunked.fdb electriccity.fdb gau_popmagic.fdb inkburrow.fdb logic25a.fdb minimalhard2.fdb mscript2.fdb pramo.fdb stroke.fdb teachera.fdb videobeast80s.fdb wake_and_bake.fdb xerox.fdb xtrusion.fdb ) SWFFont.font_path.push('/site/data/fonts/fdb/fonts') m = SWFMovie.new m.set_dimension(400,400) fonts.each do |font| f = SWFFont.new(font) t = SWFText.new t.set_font(f) t.set_color(0x00, 0x80, 0x40) t.set_height(56) t.move_to(-t.get_width(text)/2, t.get_ascent/2) t.add_string(text) i = m.add(t) i.move_to(400/2, 400/2) 2.step(40, 2) do |j| scale = j / 10.0 i.scale_to(scale, scale) m.next_frame end 40.step(2, -2) do |j| scale = j / 10.0 i.scale_to(scale, scale) m.next_frame end m.remove(i) end m.save('hello_zoom2.swf')