1 / 10

CCT260H

CCT260H. Flash-Integration and XML. Flash. Flash is a “movie” that contains pictures, video and sound Flash is also the primary drive of most video-based website A language is built-in allowing developers to program intelligence into the movie – creating interaction with the user.

enya
Download Presentation

CCT260H

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CCT260H Flash-Integration and XML CCT260H - Christopher Evan Jones

  2. Flash • Flash is a “movie” that contains pictures, video and sound • Flash is also the primary drive of most video-based website • A language is built-in allowing developers to program intelligence into the movie – creating interaction with the user CCT260H - Christopher Evan Jones

  3. Flash Integration • Flash Integration is easy! <objecttype="application/x-shockwave-flash" data="space.swf" width="550" height="300"> <paramname="movie" value="space.swf"/> </object> • Place <object> in your body • Set the size using height and width • Remember there are twoplaces to set the flash file Width & Height of the Movie CCT260H - Christopher Evan Jones

  4. Linking to Flash Link videos from YouTube! <objecttype="application/x-shockwave-flash" data="http://www.youtube.com/v/ljbI-363A2Q" width="400" height="300"> <paramname="movie" value="http://www.youtube.com/v/ljbI-363A2Q"/> </object> http://www.youtube.com/watch?v=ljbI-363A2Q Set a proper aspect ratio Copy the name CCT260H - Christopher Evan Jones

  5. Interactive Flash Charts • amChart is a quick and easy way of adding flashy charts to your website • http://www.amcharts.com/ • All you need is three files: • The Flash movie • An XML settings file • An XML data file CCT260H - Christopher Evan Jones

  6. amCharts <objecttype="application/x-shockwave-flash" data="ampie.swf" width="600" height="400"> <paramname="movie" value="ampie.swf"/> <paramname="flashvars" value="path=&settings_file=ampie_settings.xml&data_file=ampie_data.xml"/> </object> <param> elements contain parameters that are passed to the flash movie In this case, it is the location of the XML data and settings file CCT260H - Christopher Evan Jones

  7. XML • Extensible Mark-up Language • Much like HTML(XHTML), XML is used to provide context to data or text • Works on the same concept of elements, tags and attributes CCT260H - Christopher Evan Jones

  8. XML breakdown <?xmlversion="1.0" encoding="UTF-8"?> <pie> <slice title="Twice a day"pull_out="true">358</slice> <slice title="Once a day">258</slice> <slice title="Once a week">154</slice> <slice title="Never" alpha="50">114</slice> </pie> States that it is XML data The XML defines a pie chart It contains 4 slices of pie (or 4 data items) This is a single pie item with a name and value This is extra information to tell Flash how to format the pie slice CCT260H - Christopher Evan Jones

  9. For This Lab • Find some data related to your subject • Create a chart to depict this data (see wiki for files) • Use one of your old labs! • Add a YouTube video! CCT260H - Christopher Evan Jones

  10. Notes • RENAME YOUR FILES beforehand: • <Name>-data.xml e.g. ChrisJones-data.xml • <Name>-settings.xml • Hand in your .html file and both .xml settings • You do not have to upload the .swf file CCT260H - Christopher Evan Jones

More Related