Module: FN::SWF::Node::HotSpot
- Includes:
- Node::Base
- Defined in:
- lib/fn/swf/node/hot_spot.rb
Constant Summary
Constants included from Node::Base
Node::Base::CURRENT_PAGE_HEIGHT, Node::Base::CURRENT_PAGE_WIDTH
Instance Method Summary collapse
Methods included from Node::Base
#classify, #has_no_children, #mixin, #value, #visit_children, #with_attributes_like
Instance Method Details
#visit(struct, debug = false) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# 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 |