swf_addbuttonrecord

(PHP 4, PECL)

swf_addbuttonrecord --  Controls location, appearance and active area of the current button

Description

void swf_addbuttonrecord ( int states, int shapeid, int depth )

The swf_addbuttonrecord() function allows you to define the specifics of using a button. The first parameter, states, defines what states the button can have, these can be any or all of the following constants: BSHitTest, BSDown, BSOver or BSUp. The second parameter, the shapeid is the look of the button, this is usually the object id of the shape of the button. The depth parameter is the placement of the button in the current frame.

例子 1. swf_addbuttonrecord() example

<?php
swf_startButton
($objid, TYPE_MENUBUTTON);
swf_addButtonRecord(BSDown|BSOver, $buttonImageId, 340);
swf_onCondition(MenuEnter);
swf_actionGetUrl("http://www.example.com", "_level1");
swf_onCondition(MenuExit);
swf_actionGetUrl("", "_level1");
swf_endButton();
?>


add a note add a note User Contributed Notes
mathe at bluemento dot de
15-Sep-2003 11:51
An easy to understand example to make a link-button:

swf_startbutton ($this->gClick, TYPE_PUSHBUTTON);
  swf_addButtonRecord (BSDown|BSOver|BSHitTest|BSUp, $this->gButton, $this->gDepth);
  swf_onCondition (OverUptoOverDown);
  swf_actionGetUrl ($this->gotoUrl, $this->target);
swf_endbutton();

This example is out of a link-object.
gClick is the ObjectId which you need for the swf_placeobject.
gButton is a defined shape which defines the clickarea.
rest is clear i think.
So, I think this is the easiest way making a button.
hotkey at hehe dot com
04-May-2001 01:09
Hi, everyone!
Just to prevent you from killing yourselves (I was close to it): Keep in mind to give a SHAPE-id as an argument. Don't try anything else...
[I wanted to create a text-button... bad luck.]

c ya!

HotKey ^ http://www.SPR.AT