MACROMEDIA FLASH MX 2004-DATA Tutorials Manual

Summary of FLASH MX 2004-DATA

  • Page 1

    Data tutorials.

  • Page 2

    Trademarks add life to the web, afterburner, aftershock, andromedia, allaire, animation powerpack, aria, attain, authorware, authorware star, backstage, bright tiger, clustercats, coldfusion, contribute, design in motion, director, dream templates, dreamweaver, drumbeat 2000, edje, ejipt, extreme 3d...

  • Page 3: Contents

    3 contents web service tutorial: macromedia tips (flash professional only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 connect to a public web service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 create a user inter...

  • Page 4

    4 contents.

  • Page 5

    5 web service tutorial: macromedia tips (flash professional only) in this tutorial, you use the web services panel to connect to a web service, which you use to return a random tip about macromedia software. You then use components to set up a simple user interface. In this tutorial, you will comple...

  • Page 6

    6 web service tutorial: macromedia tips (flash professional only) 4. Enter the url http://www.Flash-mx.Com/mm/tips/tips.Cfc?Wsdl and click ok. 5. In the web services panel, inspect the methods, parameters, and results of the macromedia tips web service. The web service has one method, called gettipb...

  • Page 7

    Create a user interface and bind the components with the web service 7 7. In the property inspector, enter the instance name tips_wsc. The component is now configured and on the stage. You can place the component anywhere on or off the stage—it is invisible when you run the application. Create a use...

  • Page 8

    8 web service tutorial: macromedia tips (flash professional only) 6. Drag another label component above the tip_ta textarea component. In the property inspector, give it the instance name tip_lbl and in the text field type tips. Now add a binding for the webservice connector component from the macro...

  • Page 9

    Create a user interface and bind the components with the web service 9 8. In the component inspector, double-click the empty value in the bound to field. In the bound to dialog box, select combobox, for the component path and value:string for the schema location. Then click ok. Bound to field in the...

  • Page 10

    10 web service tutorial: macromedia tips (flash professional only) 10. Open the actions panel and add the following actionscript on frame 1 of the timeline: submit_button.Onrelease = function(){ tips_wsc.Trigger(); }; 11. Next, add the following actionscript after the code from step 10. The code use...

  • Page 11

    11 xml tutorial: timesheet (flash professional only) in this tutorial, you will create an application for editing timesheet data. The timesheet data is stored as xml within a native xml database. The xupdateresolver component is the best choice for this type of application, because it generates xupd...

  • Page 12

    12 xml tutorial: timesheet (flash professional only) create the user interface you will begin by creating a user interface, which displays the information in the xml file. 1. Create a new flash document using flash mx professional 2004. Make sure your computer is connected to the internet. 2. From t...

  • Page 13

    Create the user interface 13 note: the xmlconnector component stores information internally as strings. When a request is made for the data through a databinding component, you can define how the string data is converted into the correct actionscript types. This is accomplished by selecting an item ...

  • Page 14

    14 xml tutorial: timesheet (flash professional only) 10. Select the @billable schema field. Notice that the field’s data type was automatically set to boolean by the authoring tool, which looks for certain patterns to guess the type of an xml element. However, you need to modify the encoder options ...

  • Page 15

    Create the user interface 15 note: the field names must exactly match the names of their corresponding properties within the xmlconnector component (@date = date, @billable = billable, @duration = duration), including capitalization. 19. Select the date field that you just created. Select the encode...

  • Page 16

    16 xml tutorial: timesheet (flash professional only) edit the data now you will modify the application so that you can edit data through the datagrid component. 1. On the stage, select the datagrid component. Then click the parameters tab in the component inspector. 2. Set the editable property to t...

  • Page 17

    17 xupdate tutorial: update the timesheet (flash professional only) prerequisite: “xml tutorial: timesheet (flash professional only)” this tutorial starts where the xml tutorial: timesheet left off. Now that the dataset component is managing the data, it is tracking changes that are made to the data...

  • Page 18

    18 xupdate tutorial: update the timesheet (flash professional only) update the timesheet 1. Begin with the file you created in the “xml tutorial: timesheet (flash professional only)” 2. Drag an xupdateresolver component to the stage, and in the property inspector enter the instance name timeinfo_rs....

  • Page 19

    Update the timesheet 19 11. Click the show updates button. Review the xml packet in the textarea component. Tip: you can copy the xml data into your favorite xml editor to make it easier to read. 12. Try setting the includedeltapacketinfo parameter of the xupdateresolver component to true using the ...

  • Page 20

    20 xupdate tutorial: update the timesheet (flash professional only).