![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 252](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958252.webp)
252 ActionScript: Create a Form with Conditional Logic and Send Data
11.
Type
gotoAndStop("confirm")
in the Script pane.
Press Enter or Return, and type
},
and then press Enter or Return
again and type
};
. Your script should appear as follows:
// Stops the playhead at Frame 1.
stop();
// Adds conditional logic for the Submit button that
// validates user input.
this.submit_btn.onRelease = function(){
if (url_txt.text == null || url_txt.text ==””){
gotoAndStop("error");
} else {
gotoAndStop("confirm")
}
};
Pass data out of a SWF file
You can send data from a Flash application in various ways—for example,
in this lesson you send data to a web server to load a web page in the
browser. After the
else
statement, you’ll add the ActionScript to have
Flash go to the URL the viewer enters in the input text field.
1.
In the Script pane, place the insertion point in front of the line that
reads
gotoAndStop("confirm")
.
2.
In the Actions toolbox, select Global Functions > Browser/Network and
double-click
getURL
.
3.
With the insertion point between the
getURL()
parentheses, type
"http://"+url_txt.text
to specify the data that should pass from the
SWF file.
(Do not leave spaces in the code.) Your script should look like the
following:
stop();
this.submit_btn.onRelease = function(){
if (url_txt.text == null || url_txt.text ==””){
gotoAndStop("Error");
} else {
getUrl ("http://"+url_txt.text);
gotoAndStop("Confirm")
}
};
Содержание FLASH 8-FLASH
Страница 1: ...Flash Tutorials...
Страница 10: ...10 Contents...
Страница 12: ...12 Introduction...
Страница 42: ...42 Basic Tasks Creating a banner Part 1...
Страница 78: ...78 Basic Tasks Creating a banner Part 3...
Страница 88: ...88 Basic Tasks Create Accessible Flash Content...
Страница 106: ...106 Basic Tasks Create an Application...
Страница 116: ...116 Basic Tasks Use Layout Tools...
Страница 124: ...124 Basic Tasks Create Symbols and Instances...
Страница 134: ...134 Basic Tasks Add Button Animation and Navigation...
Страница 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Страница 192: ...192 Creating Graphics Applying Gradients...
Страница 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Страница 224: ...224 ActionScript Use Script Assist mode...
Страница 268: ...268 ActionScript Work with Objects and Classes...
Страница 270: ...270 Data Integration Overview Flash Professional Only...