Module: FN::SWF::Node::Page

Includes:
Node::Base
Defined in:
lib/fn/swf/node/page.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



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fn/swf/node/page.rb', line 13

def visit(struct, debug = false)
  n = self[:number] 
  bkg = self[:bkg]
  struct << ".frame #{n}"
  struct.<< ".sprite page#{n}" do
    struct << ".put bkg 0 0"
    struct << ".put #{bkg} x=0 y=0"
    visit_children(struct, debug)
  end
  struct << ".put page#{n} 0 00"
  struct.<< ".action:" do
    struct << "stop();"
  end
end