The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SWF::Builder::Character::MovieClip - SWF movie clip object.

SYNOPSIS

  my $new_mc = $movie->new_movie_clip;
  my $mc_shape = $new_mc->new_shape
    ->moveto( ... )->lineto( ... )...
  $mc_shape->place;

  my $mc_i = $new_mc->place;
  $mc_i->on('EnterFrame')->r_rotate(10);

DESCRIPTION

Movie clips are sub movies which can be included in other movie clips. They have their own timeline, child instances, and actions. An SWF::Builder::MovieClip object has character constructors and other methods for movies. See SWF::Builder. Each instance of movie clip objects can have clip actions.

$new_mc = $mc->new_movie_clip
$new_mc = $mc->new_mc

returns a new movie clip.

$mc->new_XXX

Character constructors. See SWF::Builder.

$as = $mc->init_action

returns SWF::Builder::ActionScript object to initialize the movie clip.

$mc_i = $mc->place( ... )

returns the display instance of the movie clip. See SWF::Builder.

$mc_i->on( $event [, $key] )
$mc_i->onClipEvent( $event [, $key] )

sets a clip action to the movie clip instance and returns SWF::Builder::ActionScript object for it. See SWF::Builder::ActionScript for the details of the actionscript. The method 'on' and 'onClipEvent' is same for movie clip instances.

Supported events are described as follows:

Load

The movie clip is loaded.

EnterFrame

Entering each frame.

Unload

The movie clip is unloaded.

MouseMove

The mouse is moved.

MouseDown

A mouse button is pressed.

MouseUp

A mouse button is released.

KeyDown

A key is pressed.

KeyUp

A key is released.

Data

Data received.

Initialize

The movie clip is initialized.

Press

A mouse button is pressed while the mouse is inside the movie clip.

Release

A mouse button is released while the mouse is inside the movie clip.

ReleaseOutside

A mouse button is released while the mouse is outside the movie clip after the mouse button is pressed inside.

RollOver

The mouse enters the movie clip while the mouse button is up.

RollOut

The mouse leaves the movie clip while the mouse button is up.

DragOver

The mouse enters the movie clip while the mouse button is down.

DragOut

The mouse leaves the movie clip while the mouse button is down.

KeyPress

The key specified by $key is pressed. $key is an ascii character or one of the special keys as follows:

  <Backspace>
  <Delete>
  <Down>
  <End>
  <Enter>
  <Home>
  <Insert>
  <Left>
  <PgDn>
  <PgUp>
  <Right>
  <Space>
  <Tab>
  <Up>

COPYRIGHT

Copyright 2003 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.