module FN::SWF::Node::HotSpot
Public Instance Methods
visit(struct, debug = false)
click to toggle source
# File lib/fn/swf/node/hot_spot.rb, line 15 def visit(struct, debug = false) has_no_children x = self[:x] y = self[:y] w = self[:w] h = self[:h] n = self[:n] struct << ".box btni#{n} width=#{w} height=#{h} color=red fill=white" struct.<< ".button btn#{n}" do struct.<< ".show btni#{n} as=area", :no_end_tag do struct.<< ".on_release:" do struct << "gotoAndStop(#{n});" end end end struct.<< ".action:" do struct << "_root.attachMovie('btn#{n}', 'btni#{n}', #{$depth+=1}, {_x:#{x}, _y:#{y}});" struct << "_root['btni#{n}']._x = #{x};" struct << "_root['btni#{n}']._y = #{y};" end end