Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Shockwave Flash Functions : swf_addbuttonrecord

swf_addbuttonrecord

Controls location, appearance and active area of the current button (PHP 4)
void swf_addbuttonrecord ( int states, int shapeid, int depth )

Example 2504. 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();
?>

Code Examples / Notes » swf_addbuttonrecord

hotkey

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


mathe

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.


Change Language


Follow Navioo On Twitter
swf_actiongeturl
swf_actiongotoframe
swf_actiongotolabel
swf_actionnextframe
swf_actionplay
swf_actionprevframe
swf_actionsettarget
swf_actionstop
swf_actiontogglequality
swf_actionwaitforframe
swf_addbuttonrecord
swf_addcolor
swf_closefile
swf_definebitmap
swf_definefont
swf_defineline
swf_definepoly
swf_definerect
swf_definetext
swf_endbutton
swf_enddoaction
swf_endshape
swf_endsymbol
swf_fontsize
swf_fontslant
swf_fonttracking
swf_getbitmapinfo
swf_getfontinfo
swf_getframe
swf_labelframe
swf_lookat
swf_modifyobject
swf_mulcolor
swf_nextid
swf_oncondition
swf_openfile
swf_ortho2
swf_ortho
swf_perspective
swf_placeobject
swf_polarview
swf_popmatrix
swf_posround
swf_pushmatrix
swf_removeobject
swf_rotate
swf_scale
swf_setfont
swf_setframe
swf_shapearc
swf_shapecurveto3
swf_shapecurveto
swf_shapefillbitmapclip
swf_shapefillbitmaptile
swf_shapefilloff
swf_shapefillsolid
swf_shapelinesolid
swf_shapelineto
swf_shapemoveto
swf_showframe
swf_startbutton
swf_startdoaction
swf_startshape
swf_startsymbol
swf_textwidth
swf_translate
swf_viewport
eXTReMe Tracker