Reviews & Opinions
Independent and trusted. Read before buy Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript!

Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript


Bookmark
Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript

Bookmark and Share

 

Macromedia Flash 8 - Learning Flash Lite 1 X ActionscriptAbout Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript
Here you can find all about Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript like manual and other informations. For example: review.

Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript manual (user guide) is ready to download for free.

On the bottom of page users can write a review. If you own a Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript please write about it to help other people.
[ Report abuse or wrong photo | Share your Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript photo ]

 

 

Manual

Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Manual - 1 page  Manual - 2 page  Manual - 3 page 

Download (English)
Macromedia Flash 8-learning Flash Lite 1.x Actionscript, size: 319 KB

 

Macromedia Flash 8 - Learning Flash Lite 1 X Actionscript

 

 

User reviews and opinions

<== Click here to post a new opinion, comment, review, etc.

Comments to date: 4. Page 1 of 1. Average Rating:
cweaver 10:06pm on Tuesday, September 28th, 2010 
Does this device have any real flaws? Lets address some real shortcomings of the iPad. The iPad is exactly what I expected, easy to use, very well executed so long as you understand that it is mainly a device to consume media.
SerialModel 4:42am on Saturday, July 31st, 2010 
My Company uses Citrix, so I am able to run Windows Applications, SAP, even flash and all my GO TO corporate applications on the device. you will love the 9 inches screen. You will enjoy the touchscreen experience with iPad Fast, Lightweight, Compact
HWtn 12:10am on Friday, April 23rd, 2010 
You can get a Nano or Touch for around a third of the price and still get Music, Podcasts, Apps, Clip, FM Radio and Camera. Overpriced content consumption table. Very responsive touch screen, high res screen Content Consumption only. Not great value for money. No camera.
kevin.quiggle 12:48pm on Tuesday, March 16th, 2010 
PROS: OS, look, Awesomeness ITs great, and the idea is well along with the OS its a Mac downsized. its size is a bit big Awesome game player, and has replaced my laptop but I do not have to need for business and so I do not know about how those work. Great for traveling,...

Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.

 

Documents

doc0

LEARNING FLASH LITE 1.x ACTIONSCRIPT
2007 Adobe Systems Incorporated. All rights reserved. Learning Flash Lite 1.x ActionScript If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright owner. Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization. Adobe, the Adobe logo, Flash Lite, and Flash are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Third-Party Information This guide contains links to third-party websites that are not under the control of Adobe Systems Incorporated, and Adobe Systems Incorporated is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Adobe Systems Incorporated provides these links only as a convenience, and the inclusion of the link does not imply that Adobe Systems Incorporated endorses or accepts any responsibility for the content on those thirdparty sites. Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc. Fraunhofer-IIS/Thomson Multimedia: MPEG Layer-3 audio compression technology licensed by Fraunhofer IIS and Thomson Multimedia (http://www.iis.fhg.de/amm/). Independent JPEG Group: This software is based in part on the work of the Independent JPEG Group. Nellymoser, Inc.: Speech compression and decompression technology licensed by Nellymoser, Inc. (http:www.nelly-moser.com). Opera browser Copyright 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Macromedia Flash 8 video is powered by On2 TrueMotion video technology. 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Updated Information/Additional Third Party Code Information available at http://www.adobe.com/go/thirdparty/. Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are Commercial Items, as that term is defined at 48 C.F.R. 2.101, consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202, as applicable. Consistent with 48 C.F.R. 12.212 or 48 C.F.R. 227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright
laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference.

Contents

Chapter 1: About Flash Lite 1.x ActionScript. 7 Flash Lite 1.x ActionScript overview. 7 Differences between Flash Lite 1.0 and Flash Lite 1.1 ActionScript. 8 Flash 4 ActionScript not supported by Flash Lite 1.x ActionScript. 8 Features not available in Flash Lite 1.x ActionScript. 9 Chapter 2: Flash 4 ActionScript Primer.11 Getting and setting movie clip properties.11 Controlling other timelines. 12 Using variables. 13 Emulating arrays. 13 Working with text and strings. 14 Using the call() function to create functions. 15 Using the eval() function. 19 Chapter 3: Common Scripting Tasks. 21 Determining device and platform capabilities. 21 Opening a web page. 22 Initiating a phone call. 23 Initiating a text or multimedia message. 23 Initiating an e-mail message. 24 Loading external SWF files. 24 Loading external data. 25 Index. 29

CHAPTER 1

About Flash Lite 1.x ActionScript
You use ActionScript to add programming logic and interactivity to your Adobe Flash Lite applications. The version of ActionScript in Macromedia Flash Lite 1.0 and Macromedia Flash Lite1.1 software from Adobereferred to collectively as Flash Lite 1.x ActionScriptis a hybrid of Adobes Macromedia Flash 4 ActionScript, plus additional commands and properties specific the Flash Lite player, such as the ability to initiate phone calls or text messages, or get time and date information from the device. This chapter contains the following topics:
Flash Lite 1.x ActionScript overview. 7 Differences between Flash Lite 1.0 and Flash Lite 1.1 ActionScript. 8 Flash 4 ActionScript not supported by Flash Lite 1.x ActionScript. 8 Features not available in Flash Lite 1.x ActionScript. 9
Flash Lite 1.x ActionScript overview
Flash Lite 1.x ActionScript consists of the following parts: This includes operators (for example, comparison and assignment operators), movie clip properties (for example, _height, _x, and _y), Timeline control functions (for example, gotoAndPlay() or stop()), and network functions, such as the loadVariables() and loadMovie() functions (Flash Lite 1.1 only). For a list of unsupported Flash 4 ActionScript, see Flash 4 ActionScript not supported by Flash Lite 1.x ActionScript on page 8.
Flash Player 4 ActionScript Phone integration commands and properties
Flash Lite provides commands that let you, for example, query the date and time information from the device, initiate a phone call or short message service (SMS) text message, or start external applications installed on the device.
These properties provide information about the capabilities of the device or Flash Lite runtime environment. For example, the _capLoadData variable indicates if your application can load data over the network.
Platform capability variables (Flash Lite 1.1 only)
fscommand2() function Like the fscommand() function, you use fscommand2() to communicate with the host environment or systemin this case, the mobile phone or device. The fscommand2() function provides enhancements to fscommand(), including the ability to pass an arbitrary number of arguments and to retrieve immediate return values (rather than having to wait until the next frame, as with fscommand()).

Differences between Flash Lite 1.0 and Flash Lite 1.1 ActionScript
The following Flash Lite 1.1 ActionScript features are not available in Flash Lite 1.0:
Network access or network status information. For example, in Flash Lite 1.0 you cannot use the loadVariables() or loadMovie() functions to load external data or SWF files, or the various fscommand2() commands for determining a devices connection signal strength or the status of a network request. Getting time and date information from the device. Platform capability variables, which provide information about the capabilities of the Flash Lite platform and of the device. The fscommand2() function and its associated commands, such as SetSoftKeys and FullScreen. The scroll and maxscroll text field properties.
Flash 4 ActionScript not supported by Flash Lite 1.x ActionScript
The following Flash 4 ActionScript features are unsupported, or only partially supported, in Flash Lite 1.x ActionScript:
The startDrag() and stopDrag() functions. Flash Lite 1.x ActionScript supports a subset of the button events supported in Flash Player 4. For more information about handling button events, see Chapter 1, Creating Interactivity and Navigation in Developing Flash Lite Applications. Flash Lite 1.x ActionScript supports a subset of key events supported in Flash Player 4. For more information about supported key events in Flash Lite, see Chapter 1, Creating Interactivity and Navigation in Developing Flash Lite Applications. The _dropTarget property.

_soundBufTime

property.
The _url property. The String() conversion function.
Features not available in Flash Lite 1.x ActionScript
Because Flash Lite player is based on an older version of Flash Player, it does not support all the programming features available in more recent releases of Flash Player or other programming languages that you might be familiar with. This section discusses programming features not available in Flash Lite 1.x ActionScript and available alternatives and work-arounds.

User-defined functions

Flash Lite 1.x does not support the ability to define and call custom functions. However, you can use the call() function to execute code that resides on an arbitrary frame in the timeline. For more information, see Using the call() function to create functions on page 15.
Flash Lite 1.x does not support native array data structures or other complete data types. However, you can emulate arrays using pseudo-arrays, a technique that involves using the eval() function to dynamically evaluate concatenated strings. For more information, see Emulating arrays on page 13.
Native arrays, objects, or other complex data types
Unlike the desktop version of Flash Player, Flash Lite 1.x ActionScript cannot load external JPEG files or MP3 files. In Flash Lite 1.1 you can use the loadMovie() function to load external SWF files. For more information, see Loading external SWF files on page 24.

tellTarget("/cartoonArea") { _x = 100; }
For more information about the tellTarget() function, see Controlling other timelines on page 12.
Controlling other timelines
To specify a path to a timeline, use slash syntax (/) combined with dots (.) to build the path reference. You can also use _levelN, _root, or _parent from Flash 5 notation to refer to, respectively, a specific movie level, the applications root timeline, or the parent timeline. For example, suppose you had a movie clip instance named box on your SWF files main timeline. The box instance, in turn, contains another movie clip instance named cards. The following examples target the movie clip cards from the main timeline:
tellTarget("/box/cards") tellTarget("_level0/box/cards")
The following example targets the main timeline from the movie clip cards:
tellTarget("././cards") tellTarget("_root")
The following example targets the parent movie clip cards:
tellTarget("./cards") tellTarget("_parent/cards")

Using variables

To specify a variable on a timeline, use slash syntax (/) combined with dots (.) and colons (:). You can also use the dot notation. The following code refers to the car variable on the main timeline:

/:car _root.car

The following example shows the car variable in a movie clip instance that resides on the main timeline:
/mc1/mc2/:car _root.mc1.mc2.car
The following example shows the car variable in a movie clip instance that resides on the current timeline:

mc2/:car mc2.car

Emulating arrays
Arrays are useful for creating and manipulating ordered lists of information such as variables and values. However, Flash Lite 1.1 does not support native array data structures. A common technique in Flash Lite (and Flash 4) programming is to emulate arrays with string processing. An emulated array is also called a pseudo-array. The key to pseudo-array processing is the eval() ActionScript function, which lets you access variables, properties, or movie clips by name. For more information, see Using the eval() function on page 19. A pseudo-array typically consists of two or more variables that share the same base name, followed by a numeric suffix. The suffix is the index for each array element. For example, suppose you create the following ActionScript variables:

color_1 color_2 color_3 color_4 = = = = "orange"; "green"; "blue"; "red";
You can then use the following code to loop over the elements in the pseudo-array:
for (i = 1; i <=4; i++) { trace (eval ("color_" add i)); }
In addition to letting you reference existing variables, you can also use the eval() function on the left side of a variable assignment to create variables at runtime. For example, suppose you want to maintain a list of high scores as a user plays a game. Each time the user completes a turn, you add their score to the list:
eval("highScore" add scoreIndex) = currentScore; scoreIndex++;
Each time this code executes, it adds a new item to the list of high scores and then increments the scoreIndex variable, which determines each items index in the list. For instance, you might end up with the following variables:
highScore1 = 2000 highScore2 = 1500 highScore3 = 3000
Working with text and strings
Flash Lite provides some basic ActionScript commands and properties for working with text. You can get and set the values of text fields, concatenate strings, URL-encode or URL-decode text strings, and create scrolling text fields. This section contains the following topics:
Concatenating strings on page 14 Scrolling text on page 14

Concatenating strings

To concatenate strings in Flash Lite, you use the add operator, as the following example shows:
city = "Boston"; team = "Red Sox"; fullName = city add " " add team; // Result: // fullName = "Boston Red Sox"

Scrolling text

You can use the scroll property of dynamic and input text fields to get or set the fields current scroll position. You can also use the maxscroll position to determine a text fields current scroll position relative to the maximum scroll position. For an example of how to create a scrolling text field, see Creating scrolling text in Developing Flash Lite Applications.
Using the call() function to create functions
You cant define or call custom functions in Flash Lite as you can in Flash Player 5 and later. However, you can use the call() ActionScript function to execute code that resides on an arbitrary frame in the timeline. This technique lets you encapsulate commonly used code in a single location, making it easier to maintain. The call() function takes a frame number or frame label as a parameter. For example, the following ActionScript calls the code located on the frame labeled moveUp:
call("moveUp");
The call() function operates synchronously; any ActionScript that follows a call() function call wont execute until all of the ActionScript on the specified frame finishes executing.
To call ActionScript on another frame:
In a new Flash document, insert a keyframe on Frame 10.

With the new keyframe selected, open the Actions panel (Window > Actions), and type the following code:
trace("Hello from frame 10");
Select the keyframe on Frame 1, and in the Actions panel, type the following code:

stop(); call(10);

This code stops the playhead on Frame 1, and then calls the code on Frame 10.
Test the application in Adobe Device Central. You should see Hello from frame 10 displayed in the emulator.
You can also call code that resides on another timeline, such as a movie clips timeline. To execute the code, specify the movie clip instance name followed by a colon, and then the frame number or label. For example, the following ActionScript calls the code that resides on the frame labeled moveUp in the movie clip instance named callClip:
call("callClip:moveUp");
This technique is often used to create call clips or function clipsmovie clips whose sole purpose is to encapsulate regularly used code. A call clip contains a keyframe for each function you want to create. You typically label each keyframe according to its purpose. Adobe also recommends that you create a new layer for each new keyframe, and that you give each layer the same name as the frame label you assign to the keyframe. The following figure shows the Timeline of an example call clip. The first keyframe of a call clip always contains a stop() action, which ensures that the playhead doesnt continually loop over the frames in its Timeline. Subsequent keyframes contain code for each function. Each function keyframe is labeled to identify what it does. To make editing and viewing the call clip easier, each function keyframe is typically inserted on a separate layer.
First keyframe contains stop() action
Frame labels Each keyframe contains code.
The following procedure explains how to create and use a call clip.
To create and use a call clip:
In Adobe Flash CS3, create a new document from the Flash Lite 1.1 Symbian Series 60 document template. Select Insert > New Symbol. In the Create New Symbol dialog box, type Call Clip in the Name text box, and then click OK. The movie clip opens in editing mode.

Click the Add New Layer button the Timeline window twice to insert two new layers. Name the top layer Actions, the second layer function1, and the third layer function2. Insert a keyframe on Frame 2 of the function1 layer, and another keyframe on Frame 3 of the function2 layer, as the following figure shows:

6. 7. 8.

Select the keyframe on the Actions layer and open the Actions panel. Add a stop() action to the Actions panel. Select the keyframe on Frame 2 of the function1 layer and do the following:
In the Property inspector, type function1 in the Frame Label text box.
In the Actions panel (Window > Actions), type the following code:
trace("function1 was called.");
Select the keyframe on Frame 3 of the function2 layer and do the following:
In the Property inspector, type function2 in the Frame Label text box.
trace("function2 was called.");
10. Press Control+E (Windows) or Command+E (Macintosh) to return to the main Timeline.
Set your documents view to include the work area around the Stage by selecting View > Work Area. Because the call clip doesnt need to be visible to the user, you can place it in the work area. the Library panel (Window > Library) and drag the Call Clip symbol to the work area around the Stage. The call clip doesnt contain any visual elements so it appears on the Stage as a small circle, representing the movie clips registration point.

Call clip instance

12. Open
Work area around the Stage
In the Property inspector, type callClip in the Instance Name text box. the Timeline, select Frame 1 on the layer named ActionScript. the Actions panel, enter the following code:

14. In 15. In

call("callClip:function1"); call("callClip:function2"); 16.
Test your application in the emulator (Control > Test Movie). You should see the following text:
function1 was called. function2 was called.

TIP 18

To make your call clip more easily identifiable on the Stage, add some text or other visual element to the first keyframe in the call clips Timeline.
Using the eval() function
The eval() function lets you dynamically reference variables and movie clip instances at runtime. The eval() function takes a string expression as a parameter and returns either the value of the variable represented by that expression or a reference to a movie clip. For example, the following code evaluates the value of the name ActionScript variable and assigns the result to nameValue:
name = "Jack"; nameValue = eval("name"); // result: nameValue = "Jack"
The eval() function is often used with for() loops and the add (string concatenation) operator to create string-based arrays, because Flash Lite doesnt support native array data structures. For more information, see Emulating arrays on page 13. You can also use eval() to reference movie clip instances by name. For example, suppose you had three movie clips named clip1, clip2, and clip3. The following for() loop increments the x position of each clip by 10 pixels:

for(index = 1; index <= 3; index++) { eval("clip" add index)._x += 10 }

CHAPTER 3

Common Scripting Tasks
This chapter discusses common Flash Lite scripting tasks for working with the users device. These include, for example, getting device capability information, initiating phone calls and text messages, and determining network status. This chapter contains the following topics:
Determining device and platform capabilities. 21 Opening a web page. 22 Initiating a phone call. 23 Initiating a text or multimedia message. 23 Initiating an e-mail message. 24 Loading external SWF files. 24 Loading external data. 25
Determining device and platform capabilities
Macromedia Flash Lite 1.1 from Adobe includes a number of ActionScript variables that provide information about features and capabilities available to Flash Lite applications running on a particular device. For example, the _capLoadData variable indicates if the device supports loading external data, and the _capSMS variable indicates if the device supports sending SMS (short message service) messages. For a full list of capability variables, see Capabilities in the Flash Lite 1.x ActionScript Language Reference.
Typically, you use capability variables to determine if a device supports a specific feature before attempting to use that feature. For example, suppose that you wanted to develop an application that downloads data from a web server using the loadVariables() function. Before attempting to load the data, you can first check the value of the _capLoadData variable to determine if the device supports that feature, as follows:
if(_capLoadData == 1) { loadVariables("http://foo.com/data.txt"); } else { status_message = "Sorry, unable to load external data." }
Flash Lite defines capability variables on the root timeline of the main SWF file. So to access these variables from another timelinefor example, from within a movie clips timelineyou need to qualify the path to the variable. For instance, the following example uses a slash (/) to provide the fully qualified path to the _capSMS variable.

canSendSMS = /:_capSMS

Opening a web page
You use the getURL() command to open a web page in the devices web browser. This is the same way you open a web page from a desktop Flash application. For example, the following opens the Adobe web page:
getURL("http:www.adobe.com");
Flash Lite processes only one getURL() action per frame or per event handler. Certain handsets restrict the getURL() action to keypress events only, in which case the getURL() call is processed only if it is triggered within a keypress event handler. Even under such circumstances, only one getURL() action is processed per keypress event handler. The following code, attached to a button instance on the Stage, opens a web page when the user presses the Select button on the device:

on (keyPress "<Enter>"){ getURL("http://www.adobe.com"); }

Initiating a phone call

To initiate a phone call from a Flash Lite application, you use the getURL() function. Typically, you use this function to open a web page, but in this case you specify tel: as the protocol (in place of http), and then provide the phone number you wish the phone to dial. When you call this function, Flash Lite displays a confirmation dialog box asking the user for permission to make the call to the specified number. The following code attempts to initiate call to 555-1212:
getURL("tel:555-1212");
Flash Lite only processes one getURL() action per frame or per event handler. Certain handsets restrict the getURL() action to keypress events only, in which case the getURL() call is processed only if it is triggered within a keypress event handler. Even under such circumstances, only one getURL() action is processed per keypress event handler. The following example starts a phone call when the user presses the Select button on the device:
on (keyPress "<Enter>"){ getURL("tel:555-1212"); }
Initiating a text or multimedia message
You can use Flash Lite to initiate a short message service (SMS) or multimedia message service (MMS) message. To initiate an SMS or MMS message in a Flash Lite application, you use the getURL() command, passing it the sms: or mms: protocols in place of the standard http protocol, and then the phone number to which you want to send the message.
getURL("sms:555-1212");
You can optionally specify the message body in the URL query string, as the following code shows:
getURL("sms:555-1212?body=More info please");
To initiate an MMS message, you use the mms: protocol instead of sms:, as follows:
getURL("mms:555-1212");
Its not possible to specify an attachment for the MMS message from Flash Lite.
Flash Lite processes only one getURL() action per frame or per event handler. Certain handsets restrict the getURL() action to keypress events only, in which case the getURL() call is processed only if it is triggered within a keypress event handler. Even under such circumstances, only one getURL() action is processed per keypress event handler. The following example initiates an SMS message when the user presses the Select button on the device:
on (keyPress "<Enter>"){ getURL("sms:555-1212"); }
Initiating an e-mail message
You can use Flash Lite to initiate an e-mail message. To initiate an e-mail message, you use the getURL() command and pass it the mailto: protocol, followed by the recipients e-mail address. You can optionally specify the message subject and body in the URLs query string, as follows:

getURL("mailto:mobile-developer@adobe.com?subject=Flash Lite");
To specify just the message body in the query string, use the following code:
getURL("mailto:mobile-developer@adobe.com?body=More+info+please");
Loading external SWF files
The loadMovie() function lets you load SWF files from a network or local file. This feature is only available in Flash Lite 1.1 and later. The following caveats apply when you load external SWF files:
Flash Lite can load other Flash Lite 1.0 or Flash Lite 1.1 SWF files, or Flash 4-formatted SWF files or earlier. If you attempt to load a SWF file in another format (for example, a Flash Player 6 SWF file), Flash Lite will generate a runtime error. Flash Lite cannot directly load external image files, such as JPEG or GIF images. To load these types of media, you need to convert the image data to the SWF file format. You can do this manually with the Flash authoring tool by importing the image file into a new document, and then exporting the file to a Flash Lite or Flash 4 SWF file. There are also third-party utilities that can perform this type of conversion for you automatically.
For more information about loading SWF files, see loadMovie() in Flash Lite 1.x ActionScript Language Reference.

Loading external data

To load external data into a Flash Lite application, you use the loadVariables() function. You can load data over the network (from an HTTP address) or from the local file system. This feature is available only in Flash Lite 1.1 and later. This section demonstrates how to use the loadVariables() function to load data from an external file and display that data in dynamic text fields. First youll create the data file, a text file that contains five name-value pairs separated by ampersand (&) symbols. Then youll create the Flash Lite application that loads and displays the data contained in the text file. This example assumes that the data file and the SWF are both located in the same folder, either on your computer (when you test in the emulator) or on the devices memory card (when you test on an actual device). To test the application on the device, you must do one of the following:
Transfer the text file to your device and put it in the same folder as the SWF file. Post the text file to a URL on a web server (for example, www.your-server.com/data.txt). Then modify the loadVariables() call in the sample application to point to that URL, as follows:
loadVariables("http://www.your-server.com/data.txt", "data_clip");

For an example of an application that loads data over the network, see the Flash Lite news reader in Flash Samples.

To create the data file:

Using a text editor (for example, Notepad or SimpleText), create a file that contains the following text:
item_1=Hello&item_2=Bonjour&item_3=Hola&item_4=Buon+giorno&item_5=G'day
Save the file as data.txt.
To create the Flash Lite application to load the data:
Create a new document from the Flash Lite 1.1 Symbian Series 60 document template. For more information about using Flash Lite document templates, see Using Flash Lite document templates in Getting Started with Flash Lite 1.x.
Save the file as dataloading.fla to the same folder that contains the text file (data.txt) that you created previously. In the Timeline, select Frame 1 of the layer named Content.
Using the Text tool, create five dynamic text fields on the Stage, as the following figure shows:
Select the first (top-most) text field, and in the Property inspector, type item_1 in the Var text box. This variable name corresponds to the name of the first variable defined in the data.txt file you created previously (item_1=Hello).
In the same manner as described in the previous two steps, give the remaining four text fields the variable names item_2, item_3, item_4, and item_5. Shift-select each text field so that theyre all selected, and select Modify > Convert To Symbol. In the Convert to Symbol dialog box, select Movie Clip as the symbol type and click OK. Select the movie clip you just created and, in the Property inspector, type data_clip in the Instance Name text box. the Timeline, select Frame 1 of the Actions layer and open the Actions panel (Window > Actions). Type the following code in the Actions panel:
loadVariables("data.txt", "data_clip");

10. In

12. Save
your changes (File > Save) and test the application in the emulator (Control > Test Movie). You should see each text field populated with the data in the text file, as the following figure shows:
arrays, emulating with strings 13
load external data 25 load external SWF files 24 loadMovie() function, using 24 loadVariables() function, using 25
call() function, using 15 concatenate strings 14
movie clips getting and setting properties 11 referencing dynamically 19 multimedia message, starting 23
e-mail message, starting 24 eval() function, using 19
Flash Lite 1.x ActionScript differences between 1.0 and 1.features not available in 9 overview 7 unsupported Flash 4 ActionScript 8 function clips, creating 15 functions, emulating with call() 15

open a web page 22

phone call, starting 23 platform capability variables, about 21
getURL() function opening web pages with 22 starting a multimedia message with 23 starting a phone call with 23 starting a text message with 23 starting an e-mail message with 24
scrolling text, creating 14 strings, concatenating 14
text message, starting 23 timelines, controlling with ActionScript 12
initiate messages 23 initiate phone calls 23
variables dot syntax and slash syntax 13 referencing 13 referencing dynamically 19

web page, opening 22

 

Tags

BV8212T Shenmue PET704 Acer N35 HF3463 101 1 LW1200CS 1800-400 Specification NV-DS28EG CP-29M30A GTO804 Nikkor C M Nomad Fluke 620 Corby Travelmate 2480 0 Kodak Z712 GH22NS30 PT-1230PC Seiko SKX XR-C2600 NV-GS200 Node 2 SKS-HT750 DXZ558RMP GC-051SA City-NEW York Mares LC-940 SE 140 Benq V551 KRC-477R Xerox 4800 Samsung I780 UX-F12CW Nglm24-5H KX-TA308 DKS-6000 ME-20 Karcher 580 G-4100 T37850 CCD-TR511E CDP-C305 Digital Revised Hiphone E13320 1000 D 50PG3500 HD7605 SGH-F250 Hamburg MP57 A40-S270 EL-1801E ZDS300 TS-WX205A Eton E10 GH1000 LQ-500 1300LM For Nt4 - Pink CR14A Champion 30 LBP-810 DVP-NS930V Vocalist VL3D APO-extender-R 2X Quad FM1 C3212 Magic 5 Machine 2X 66Q4 Review 20HF5474 SU-VX820 IF-TAD Seiko 8F32 XRS 9950 Deskjet 9650 ZOB381X Nova 1416 RS21dgrs LN46A530p1F FTX26 K2500 MUM7400UC EAX1300 NV-FJ631 DMR-E80HP Futura Clock A75-S2112 DMP-BD80eg-K GP-150 LMS-320 Lecoaspira 700

 

manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding

 

Sitemap

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101