text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
For instance, in the string 'abcdef', the character at position 0 is' a ', the character at position 2 is' c ', and so forth.
|
start が正の場合、返される文字列は、 string の 0 から数えて start 番目から始まる文字列となります。 例えば、文字列' abcdef 'において位置 0 にある文字は、' a 'であり、 位置 2 には' c 'があります。
|
If start is negative, the returned string will start at the start 'th character from the end of string.
|
例:
|
If length is given and is positive, the string returned will contain at most length characters beginning from start (depending on the length of string).
|
start が負の場合、返される文字列は、 string の後ろから数えて start 番目から始まる文字列となります。
|
If string is less than start characters long, FALSE will be returned.
|
例 1負の start を使用
|
If start denotes a position beyond this truncation, an empty string will be returned.
|
length が指定され、かつ正である場合、返さ れる文字列は start から数えて length 文字数分となります。負の length が指 定された場合、(start は文字列の終端を過ぎているので)返される文字 列は start の位置にある1文字のみとなります。
|
?php $rest = substr( "abcdef", 0, -1); / / returns "abcde "$rest = substr("abcdef", 2, -1); / / returns "cde" $rest = substr("abcdef", 4, -4); / / returns "" $rest = substr("abcdef", -3, -1); / / returns "de "?
|
length が指定され、かつ負である場合、返さ れる文字列は start の後ろから数えて length 文字までとなります。この指定により 切り出す文字列の長さが負となる場合、 start の位置にある1文字のみが文字列として返されます。
|
Prev
|
例 2負の length を使用
|
substr_replace
|
strrchr() および ereg() も参照下さい。
|
Prev
|
(PHP 4)
|
substr_replace() replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement.
|
substr_replace() は、文字列 string の start およ び(オプションの) length パラメータで区切ら れた部分を replacement で指定した文字列に 置換します。結果が返されます。
|
If start is positive, the replacing will begin at the start 'th offset into string.
|
start が正の場合、置換は string で start 番目 に文字から始まります。
|
If length is given and is positive, it represents the length of the portion of string which is to be replaced.
|
start が負の場合、置換は string の終端から start 番目の文字から始まります。
|
If it is not given, then it will default to strlen( string); i.e. end the replacing at the end of string.
|
length が指定されかつ正の場合、 string の置換される部分の長さを表します。 負の場合、置換を停止する位置が string の終端から 何文字目であるかを表します。このパラメータが省略された場合、デフォ ルト値はstrlen( string )、すなわち、 string の終端まで置換することになります。
|
Prev
|
str_replace() および substr() も参照下さい。
|
Among other things, this can be used to implement callbacks, function tables, and so forth.
|
PHP は可変関数(variable functions)の概念をサポートします。 これにより、変数名の後に括弧が付いている場合、その値が何であろうと PHPは、同名の関数を探し実行を試みます。 この機能は、コールバック、関数テーブル等を実装するために使用可能です。
|
You need to use your own wrapper function to utilize any of these constructs as variable functions.
|
可変関数は、 echo(), unset(), isset(), empty(), include(), print() のような言語構造と組み合わせて使用する ことはできません。
|
You can also call an object 's method by using the variable functions feature.
|
例 13-1可変関数の例
|
Prev
|
可変変数 や function_exists() も参照してください。
|
Prev
|
(PHP 4)
|
The swf_actionGetUrl() function gets the URL specified by the parameter url with the target target.
|
関数 swf_actionGetUrl() はターゲット target からパラメータ url で指定したURLを得ます。
|
Prev
|
(PHP 4)
|
The swf_actionGotoFrame() function will go to the frame specified by framenumber, play it, and then stop.
|
関数 swf_actionGotoFrame() は framenumber で指定したフレームまで移動し、 実行した後、停止します。
|
Prev
|
(PHP 4)
|
The swf_actionGotoLabel() function displays the frame with the label given by the label parameter and then stops.
|
関数 swf_actionGotoLabel() は label で指定したラベルを有するフレームを表 示した後、停止します。
|
Warning
|
(PHP 4 = 4.0.5)
|
The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
swfaction() creates a new Action, and compiles the given script into an SWFAction object.
|
swfaction() creates a new Action, and compiles the given script into an SWFAction object.
|
So what 's left?
|
So what's left? The compiler recognises the following tokens:
|
The following functions can be used in expressions:
|
There is no typed data; all values in the SWF action machine are stored as strings. The following functions can be used in expressions:
|
Returns the number of milliseconds (?) elapsed since the movie started.
|
Returns the number of milliseconds (?) elapsed since the movie started.
|
Returns a pseudo-random number in the range 0-seed.
|
Returns a pseudo-random number in the range 0-seed.
|
Returns the length of the given expression.
|
Returns the length of the given expression.
|
Returns the given number rounded down to the nearest integer.
|
Returns the given number rounded down to the nearest integer.
|
Returns the concatenation of the given expressions.
|
Returns the concatenation of the given expressions.
|
Additionally, the following commands may be used:
|
Returns the substring of length length at location location of the given string string.
|
Duplicate the named movie clip (aka sprite).
|
Additionally, the following commands may be used:
|
Removes the named movie clip.
|
Duplicate the named movie clip (aka sprite). The new movie clip has name name and is at depth depth.
|
Write the given expression to the trace log.
|
Removes the named movie clip.
|
Start dragging the movie clip target.
|
Write the given expression to the trace log. Doubtful that the browser plugin does anything with this.
|
Optional parameters define a bounding area for the dragging.
|
Start dragging the movie clip target. The lock argument indicates whether to lock the mouse (?)- use 0 (FALSE) or 1 (TRUE). Optional parameters define a bounding area for the dragging.
|
And this movie clip, too.
|
Stop dragging my heart around. And this movie clip, too.
|
Load the given URL into the named target.
|
Call the named frame as a function.
|
The target argument can be a frame name (I think), or one of the magical values "_level0 "(replaces current movie) or "_level1" (loads new movie on top of current movie).
|
Same as above, more or less. Come to think of it, I don't quite know what the difference is.
|
Go to the next frame.
|
Go to the next frame.
|
Go to the last (or, rather, previous) frame.
|
Go to the last (or, rather, previous) frame.
|
Start playing the movie.
|
Start playing the movie.
|
Stop playing the movie.
|
Stop playing the movie.
|
Toggle between high and low quality.
|
Toggle between high and low quality.
|
Stop playing all sounds.
|
Stop playing all sounds.
|
Frame numbers start at 0.
|
Go to frame number num. Frame numbers start at 0.
|
Which does a lot of good, since I haven 't added frame labels yet.
|
Go to the frame named name. Which does a lot of good, since I haven't added frame labels yet.
|
Or so they say - I really have no idea what this does.
|
Sets the context for action. Or so they say- I really have no idea what this does.
|
You can read all of them (or can you?), you can set some of them, and here they are:
|
Movie clips (all together now- aka sprites) have properties. You can read all of them (or can you?), you can set some of them, and here they are:
|
currentFrame - (read-only)
|
currentFrame - (read-only)
|
totalFrames - (read-only)
|
totalFrames - (read-only)
|
visible - 1=on, 0=off (?)
|
visible - 1=on, 0=off (?)
|
width - (read-only)
|
width - (read-only)
|
height - (read-only)
|
height - (read-only)
|
target - (read-only) (???)
|
target - (read-only) (???)
|
framesLoaded - (read-only)
|
framesLoaded - (read-only)
|
url - (read-only) (???)
|
dropTarget - (read-only) (???)
|
highQuality - 1=high, 0=low (?)
|
url - (read-only) (???)
|
soundBufTime - (???)
|
highQuality - 1=high, 0=low (?)
|
This simple example will move the red square across the window.
|
focusRect - (???)
|
Example 2. swfaction() example
|
This simple example will move the red square across the window.
|
Example 3. swfaction() example
|
This simple example tracks down your mouse on the screen.
|
This simple example will handles keyboard actions. (You'll probably have to click in the window to give it focus.
|
例 2 swfaction() example
|
If you know how to give buttons focus programatically, feel free to share, won' t you?)
|
Same as above, but with nice colored balls...
|
Example 4. swfaction() example
|
例 3 swfaction() example
|
SWFBitmap - getHeight
|
例 4 swfaction() example
|
Prev
|
(PHP 4)
|
Go foward one frame.
|
フレームを一つ進めます。
|
Prev
|
(PHP 4)
|
Start playing the flash movie from the current frame.
|
カレントのフレームからflashムービーを開始します。
|
(PHP 4)
|
(PHP 4)
|
swf_actionsettarget
|
フレームを一つ戻します。
|
(PHP 4)
|
(PHP 4)
|
You can use this to control other flash movies that are currently playing.
|
関数 swf_actionSetTarget() は全てのアクションの コンテキストを設定します。この関数を現在実行中の他のflashムービー を制御するために使用することが可能です。
|
Prev
|
(PHP 4)
|
Stop playing the flash movie at the current frame.
|
カレントのフレームでflashムービーの実行を終了します。
|
Prev
|
(PHP 4)
|
Toggle the flash movie between high and low quality.
|
flashムービーでクオリティのハイとローを切替えます。
|
(PHP 4)
|
(PHP 4)
|
This can be useful for "Loading..." type animations.
|
関数 swf_actionWaitForFrame() は、パラメータ framenumber で指定したフレームがロードされている かどうかを確認し、ロードされていない場合はパラメータ skipcount で指定したアクションの数だけスキッ プします。この関数は "Loading..." 型のアニメーションの場合に有用 です。
|
(PHP 4)
|
(PHP 4)
|
The first parameter, states, defines what states the button can have, these can be any or all of the following constants:
|
関数 swf_addbuttonrecord() によりボタンを使用す る際の仕様を定義することが可能です。最初のパラメータ states はボタンが有する状態を定義し、定数 BSHitTest,BSDown,BSOver,BSUpのどれかまたは全てとすることが可能で す。2番目のパラメータ shapeid はボタンの形状 であり、通常はボタンの形状のオブジェクトIDです。パラメータ depth は、カレントのフレームにおけるボタン の位置です。
|
The depth parameter is the placement of the button in the current frame.
|
例 1 関数 swf_addbuttonrecord() の例
|
The swf_addcolor() function sets the global add color to the rgba color specified.
|
(PHP 4)
|
The color of the object will be add by the rgba values when the object is written to the screen.
|
関数 swf_addcolor() は、グローバル加算色を指定した rgba 色に設定します。この色は、この後 (暗黙の内に)関数 swf_placeobject(), swf_modifyobject(), swf_addbuttonrecord() で使用されます。オブジェ クトがスクリーンに描かれる時にオブジェクトの色に rgba 値が加算されます。
|
Prev
|
注意 rgba 値は正または負のどちらかとすることが できます。
|
Warning
|
(no version information, might be only in CVS)
|
The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
swfbitmap - getheight() returns the bitmap's height in pixels.
|
swfbitmap- getheight() returns the bitmap's height in pixels.
|
Prev
|
See also swfbitmap- getwidth().
|
Warning
|
(no version information, might be only in CVS)
|
The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
swfbitmap - getwidth() returns the bitmap's width in pixels.
|
swfbitmap- getwidth() returns the bitmap's width in pixels.
|
Prev
|
See also swfbitmap- getheight().
|
Warning
|
(PHP 4 = 4.0.5)
|
The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.