2 * Copyright 2008 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @fileoverview Definitions for all the Flash Object JavaScript methods. This
18 * file depends on w3c_dom2.js.
20 * http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html
29 * Call a Flash function exported by ExternalInterface.
30 * @param {string} xmlString The XML string passed to Flash. The outer element
31 * should be {@code <invoke>}. A sample invocation string:
32 * {@code <invoke name="function_name" returntype="javascript">
33 * <string>test</string></invoke>}
34 * @return {string} The serialized return value from Flash that you can eval.
36 HTMLObjectElement.prototype.CallFunction = function(xmlString) {};
39 * Returns the value of the Flash variable specified by varName or null if the
40 * variable does not exist.
41 * @param {string} varName The variable name.
42 * @return {string?} The variable value.
44 HTMLObjectElement.prototype.GetVariable = function(varName) {};
47 * Activates the frame number specified by {@code frameNumber} in the current
49 * @param {number} frameNumber A non-negative integer frame number.
51 HTMLObjectElement.prototype.GotoFrame = function(frameNumber) {};
54 * @return {boolean} Whether the movie is currently playing.
56 HTMLObjectElement.prototype.IsPlaying = function() {};
59 * Loads the movie identified by {@code url} to the layer specified by {@code
61 * @param {number} layerNumber The layer number.
62 * @param {string} url The movie URL.
64 HTMLObjectElement.prototype.LoadMovie = function(layerNumber, url) {};
67 * Pans a zoomed-in movie to the coordinates specified by x and y. Use mode to
68 * specify whether the values for x and y are pixels or a percent of the window.
69 * When mode is 0, the coordinates are pixels; when mode is 1, the coordinates
70 * are percent of the window.
71 * @param {number} x The x-coordinate.
72 * @param {number} y The y-coordinate.
73 * @param {number} mode The mode.
75 HTMLObjectElement.prototype.Pan = function(x, y, mode) {};
78 * @return {number} The percent of the Flash Player movie that has streamed
79 * into the browser so far; Possible values are from 0 to 100.
81 HTMLObjectElement.prototype.PercentLoaded = function() {};
84 * Starts playing the movie.
86 HTMLObjectElement.prototype.Play = function() {};
89 * Goes to the first frame.
91 HTMLObjectElement.prototype.Rewind = function() {};
94 * Sets the value of the flash variable.
95 * @param {string} variableName The variable name.
96 * @param {string} value The value.
98 HTMLObjectElement.prototype.SetVariable = function(variableName, value) {};
101 * Zooms in on a rectangular area of the movie. The units of the coordinates
102 * are in twips (1440 units per inch).
103 * @param {number} left The left coordinate.
104 * @param {number} top The top coordinate.
105 * @param {number} right The right coordinate.
106 * @param {number} bottom The bottom coordinate.
108 HTMLObjectElement.prototype.SetZoomRect = function(left, top, right, bottom) {};
111 * Stops playing the movie.
113 HTMLObjectElement.prototype.StopPlay = function() {};
116 * @return {number} The total number of frames in the movie.
118 HTMLObjectElement.prototype.TotalFrames = function() {};
121 * Zooms the view by a relative scale factor.
122 * @param {number} percent The percentage scale factor, should be an integer.
124 HTMLObjectElement.prototype.Zoom = function(percent) {};
127 // TellTarget Methods.
130 * Executes the action in the timeline specified by {@code target} in the
132 * @param {string} target The timeline.
133 * @param {number} frameNumber The frame number.
135 HTMLObjectElement.prototype.TCallFrame = function(target, frameNumber) {};
138 * Executes the action in the timeline specified by {@code target} in the
140 * @param {string} target The timeline.
141 * @param {string} label The frame label.
143 HTMLObjectElement.prototype.TCallLabel = function(target, label) {};
146 * Returns the number of the current frame for the specified timeline.
147 * @param {string} target The timeline.
148 * @return {number} The number of the current frame.
150 HTMLObjectElement.prototype.TCurentFrame = function(target) {};
153 * Returns the label of the current frame for the specified timeline.
154 * @param {string} target The timeline.
155 * @return {string} The label of the current frame, empty string if no
158 HTMLObjectElement.prototype.TCurrentLabel = function(target) {};
161 * Returns a string indicating the value of the property in the
162 * specified timeline.
163 * @param {string} target The timeline.
164 * @param {number} property The integer corresponding to the desired property.
165 * @return {string} The value of the property.
167 HTMLObjectElement.prototype.TGetProperty = function(target, property) {};
170 * Returns a number indicating the value of the property in the specified
172 * @param {string} target The timeline.
173 * @param {number} property The integer corresponding to the desired property.
174 * @return {number} A number indicating the value of the property.
176 HTMLObjectElement.prototype.TGetPropertyAsNumber = function(target, property) {};
179 * Goes to the specified frame number in the specified timeline.
180 * @param {string} target The timeline.
181 * @param {number} frameNumber The frame number.
183 HTMLObjectElement.prototype.TGotoFrame = function(target, frameNumber) {};
186 * Goes to the specified frame label in the specified timeline.
187 * @param {string} target The timeline.
188 * @param {string} label The framelabel.
190 HTMLObjectElement.prototype.TGotoLabel = function(target, label) {};
193 * Plays the specified timeline.
194 * @param {number} target The timeline.
196 HTMLObjectElement.prototype.TPlay = function(target) {};
199 * Sets the value of the property in the specified timeline.
200 * @param {number} target The timeline.
201 * @param {number} property The integer corresponding to the desired property.
202 * @param {string|number} value The value.
204 HTMLObjectElement.prototype.TSetProperty = function(target, property, value) {};
207 * Stops the specified timeline.
208 * @param {number} target The timeline.
210 HTMLObjectElement.prototype.TStopPlay = function(target) {};