Flash Video Flash ActionScript 3.0 Introduction to Thomas Lövgren, Flash developer

Slides:



Advertisements
Similar presentations
Sound, Video & XML (image gallery) Flash ActionScript Introduction to Thomas Lövgren
Advertisements

Tutorial 7 Planning and Creating a Flash Web Site.
Concepts & Techniques for Accessible, Closed Captioned Web-Based Video 10th Annual Accessing Higher Ground: Accessible Media, Web and Technology Conference.
Thomas Lövgren, Flash developer
Section 9.1 Identify multimedia design guidelines Identify sources of multimedia files Explain the ethical use of multimedia files Describe multimedia.
Macromedia Director 8 Intermediate Level Course. Ink Masks Using the Ink Mask feature will allow you to create parts of a bitmap cast member to become.
1 Introduction to Computer Science بسم الله الرحمن الرحيم MULTIMEDIA LEVEL -9 King Khalid University Kingdom of Saudi Arabia Ministry of Higher Education.
Neal Stublen Pre-HTML5 Solutions  Audio and video were embedded in pages using plug-ins Apple Quicktime Microsoft Silverlight Adobe.
Presents… “Best Encoding Practices” For use with.
3.02 Publishing Animations
Dawn Pedersen American River College. Introduction This will be a brief overview of using video in Flash. We will cover the following topics today: Streaming.
Chapter 9 Integrating Video. Digital video is a series of bitmap images that, when played back, create the illusion of movement. The quality and overall.
Video Streaming in Flash CSCI 4220 – Network Programming Kacper Harabasz.
Embedding Movies Embedding Movies on a Web Page Streaming Video Converting File Types Exporting FLA as a Movie Embedding Movies in Flash.
SM5312 week 11: Flash Objects in HTML1 Flash Objects in HTML Nick Foxall.
VCT May 20, 2009 Sapna Blesson Advisor: Dr.Christopher Pollett.
By Jesus Juarez. This will be your first initial screen when you run or start the program. But only what’s inside the red outlined box will be recorded!
Chapter 17 Putting It All Together. Viewing the Preloader To view the preloader, 1.CTRL-Enter to test the movie. 2.View > Simulate Download.
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
Paul Trani Adobe Certified Instructor/Expert Resources:
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
Using Multimedia on the Web
© 2011 Delmar, Cengage Learning Chapter 11 Adding Media and Interactivity with Flash and Spry.
Chapter 15 Video. Importing Video Into Flash Once you import video into Flash MX 2004, you can control it using behaviors and very basic ActionScript,
NV V5.7 Product Presentation. Brand New Professional GUI  Multiple User Interface for different look and feel  Audio indicator on camera (play audio.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Eyeblaster Video Enhancements for RMP 6.1. Agenda Video Enhancements Goals Main features and Creative Process Flash Video Components Bandwidth Optimization.
CIS 205—Web Design & Development Flash Chapter 1 Getting Started with Adobe Flash CS3.
1 Lecture 12: Multimedia Not in Web 101 Text  Important Multimedia Issues  Audio  Movies and Video  Multimedia and HTML Documents.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Chapter 11 Adding Sound and Video. Chapter 11 Lessons 1.Work with sound 2.Specify synchronization options 3.Modify sounds 4.Use ActionScript with sound.
2.02G Publishing Animated Videos 2.02 Develop Computer Animations.
Adobe Flash CS5.5. What is Adobe Flash? formerly Macromedia Flash Is software is a powerful authoring environment for creating animation and multimedia.
Interface & navigation (How to build a simple presentation interface) Flash ActionScript Introduction to Thomas Lövgren
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
Chapter 13-Tools for the World Wide Web. Overview Web servers. Web browsers. Web page makers and site builders. Plug-ins and delivery vehicles. Beyond.
2008 Foundation Flash CS3 Video. Creating and Playing Flash Video You are not creating a video; you are encoding a video. This means you will be simply.
Copyright © 2003 Pearson Education, Inc. Chapter 5 – Slide 1 by Michael Kay The Web Wizard’s Guide to Flash.
Tutorial 7 Working with Multimedia
Tutorial 7 Designing a Multimedia Web Site
CSC 361/661 Digital Media Spring 2010 Professor Burg.
London April 2005 London April 2005 Creating Video Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Tutorial 7 Planning and Creating a Flash Web Site.
CSC 361/661 Digital Media Spring 2010 Professor Burg.
Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
5-1 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Sound, Video, and Basic Interactivity with Buttons Macromedia Flash Design & Application.
Adobe Flash CS4 – Illustrated Unit A: Getting Started with Adobe Flash.
HTML 5. Introduction In modern browsers, adding a video to your page is as easy as adding an image. No longer do you need to deal with special plug-ins.
Back to the Basics - Video Nick Kwiatkowski Michigan Flex Users Group.
Sound and the Web. Transferring sound Download Progressive Download Stream.
IMovie 10 Overview. Importing Files from a Video Camera into iMovie 1.Plug the camera into a wall outlet using the power supply. (Some cameras will not.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
Programming games Cannonball due. Drawing & printing example. Acquiring video or sound Homework: Catch up: complete projects (rps, Bo, cb). Start video.
Chapter 10. The Role of Video in Multimedia  Any presentation or application that uses sound and graphics qualifies as multimedia  Clip A segment of.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Sound and Video.
California State University, LA Presented by Amanda Steven StevenAamirObaid.
Getting started with Adobe Connect for presenters.
London April 2005 London April 2005 Creating Video Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Adobe Flash Professional CS5 – Illustrated Unit A: Getting Started with Adobe Flash Professional.
Creating a Flash Web Site
Using Video, and Flash Components, and Printing Flash Content
VIDEO.
Web Programming– UFCFB Lecture 8
Digital TV..
HTML5 Level II Session II
Web Programming– UFCFB Lecture 8
Presentation transcript:

Flash Video Flash ActionScript 3.0 Introduction to Thomas Lövgren, Flash developer

Introduction to Flash Video  Lecture Outline In this lecture we’ll discuss and practice the following topics: Introduction to Flash video Introduction to Flash video Import dialogue/create video file Import dialogue/create video file Video component Video component Video classes, methods & events Video classes, methods & events Coding a basic video application Coding a basic video application Video functions & features Video functions & features FullScreen view FullScreen view Webcam Webcam Streaming (Flash Media Server) Streaming (Flash Media Server) Video

Flash Video  Introduction: Most people now access the web using high-bandwidth connections, and web designers and developers are standardizing on the Flash video (FLV) format. Video plays directly in the page through Adobe Flash Player, without requiring additional plug-ins  Flash Player supports  Two different video file formats: FLV and F4V  Video compressed in H.264 (MPEG-4 Part 10), and audio compressed using AAC  Audio in Flash Video files is usually encoded as MP3  Load Flash video into the application: A way to optimize the system (reduce file size) Video

Video in Flash Flash Video is a technique for dynamically loading video into the application – there are two specific techniques for this: Flash Video is a technique for dynamically loading video into the application – there are two specific techniques for this:  Streaming: ex. with Flash Media Server, long clips possible, jump to specific positions in stream (no loading process)  Progressive downloading: Short clips (ex. YouTube), loading process Flash Video can be created and modified for example by: Flash Video can be created and modified for example by:  Sorenson Squeeze  Flash CS3/Flash CS4 (File/Import/Import Video ) Note! Check settings: size/resolution, framerate, encoding, sound etc Note! Check settings: size/resolution, framerate, encoding, sound etc Recommended framrate for Flash video: 30 frames/sec Recommended framrate for Flash video: 30 frames/sec o Video (.avi, wma, quicktime etc) can also be embedded in the application/timeline (not recommended) Video

Flash Video player  There are basically two different techniques for creating the Flash video player:  Video Componenet with skin Place a Video Component on stage, and set up the path to the clip (the video component could also be attached/set-up by code)  ActionScript-based video (more options) Create/program the entire Video player by code: Total control, design and improved functionalities and posibillities etc Video Let’s go to the Import and Create video file part...  Let’s go to the Import and Create video file part...

Import video in Flash (create a Flash video file) The Video Import (dialogue) in Flash, is quite well developed – it allows us to import different kinds of video formats The Video Import (dialogue) in Flash, is quite well developed – it allows us to import different kinds of video formats To import a video file, and create a Flash video file (flv) in CS3, we first select: To import a video file, and create a Flash video file (flv) in CS3, we first select: 1) Main Menu: File/Import/Import Video 1) Main Menu: File/Import/Import Video 2) Then we select the video/file path 2) Then we select the video/file path 3) Next step: Select Progressive download from a web Server 3) Next step: Select Progressive download from a web Server 4) Then we set-up the Video Encoding part 4) Then we set-up the Video Encoding part 5) Last we can select a skin for our player 5) Last we can select a skin for our player 6) Click ok 6) Click ok Video

Video Component  For using the built-in Video Compoenent in CS3: 1) Drag an instance of the FLVPlayback component from the Component Library and place it on stage (or use the the Component Library and place it on stage (or use the import dialogue) import dialogue) 2) Select the component, and go to the properties panel 3) Set-up the Path to the video clip (it’s also possible to select a skin in this dialogue) select a skin in this dialogue) 4) Export & Play the clip!  It’s also possible to add the component to stage and style it by code Video

ActionScript based video (Coding a video player )  There are a couple of classes, methods, and events that are useful for us while working with/programming our Flash video player  The Video Class: The Video Object plays either: Recorded Flash (progressive or streaming FLV) video files stored on a server or locally, or live video captured from a user's computer Video(w, h), attachNetStream(), attachCamera() etc Video(w, h), attachNetStream(), attachCamera() etc  The NetConnection Class: Creates a connection between a Flash Player and the web server/local file system or Flash Media Server NetConnection(), connect(), close(), asyncError etc NetConnection(), connect(), close(), asyncError etc  The NetStream Class: Opens a one-way streaming connection made available by a NetConnection object attachVideo(), paus(), play(), seek(), time(), onMetaData(), onStatus() etc attachVideo(), paus(), play(), seek(), time(), onMetaData(), onStatus() etc Video

ActionScript based video (coding the player)  Here is an example of creating an ActionScript based video application (just with the basic playing functionality) //create a video object on stage var my_video:Video = new Video(); //create a netconnection object, direct playing video form server var my_nc:NetConnection = new NetConnection(); my_nc.connect(null); //open connection //create a netstream object for the video stream var my_ns:NetStream = new NetStream(my_nc); my_ns.client = this; //assign client object properties //attatch the netstream to the video object my_video.attachNetStream(my_ns); addChild(my_video); //add to display list my_ns.play("nero_720x480_tt.flv"); //play the clip Video Note! It’s recommended that we also uses Events/functions to check for Async Errors etc for Async Errors etc

Play, pause & fast forward (coding the player)  For basic functions like play, pause, fast forward we can simply add the buttons and event handler/functions like: //add listeners to buttons, call handler/functions play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo); pause_btn.addEventListener(MouseEvent.MOUSE_DOWN, pauseVideo); //handler/function for playing video function playVideo(event:MouseEvent):void{ my_ns.play("cuepoints.flv"); //video clip } //handler/function for pausing the video function pauseVideo(event:MouseEvent):void{ my_ns.pause(); //use netstream pause method }_______________________ //for fast forward: we can use a condition inside a frame loop like: if(fastForward){ my_ns.seek(my_ns.time + 1.5); //fast forward } Video

MetaData, Status & Captions (coding the player)  There are a couple of more interessting features for the Video- related classes that can be useful, for example:  onMetaData : When a Flash video playing, it’s possible to receive descriptive information embedded in the file like: duration, width, height etc  onStatus : Dispatched when a NetStream object is reporting its status or error condition  CuePoints: We can also add/embed cuePoints into the video file at specific positions, these can be accessed like: my_ns.client.onCuePoint = ns_onCuePoint //call function my_ns.client.onCuePoint = ns_onCuePoint //call function  Captions: Text-captions for a Flash video can be set up for example in a XML file, than we can access it like: cap = new FLVPlaybackCaptioning(); //create the caption object cap.source = "../captions/nero_timed_text.xml"; //get data Video

FullScreen View  For FullScreen View functionallity - we first need to add a line in the HTML file (2 places)  Programing of the toggle function for displaying video in FullScreen, can be done like this in the FLA file (Main stage): import flash.display.StageDisplayState; function goFullScreen():void{ if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } toggleScreen_btn.addEventListener(MouseEvent.CLICK, toggleScreen) function toggleScreen(event:MouseEvent):void{ goFullScreen(); } Video

Webcam  By using the Camera class, we can attach a Webcam and broadcast a cam-stream in the applcation (local connection)  Here is a code example of this (there are a couple of parameters we can use for optimizing) var my_video:Video = new Video(320, 240); //create video object var my_cam:Camera = Camera.getCamera(); //detect/get camera //higher image quality, lower motion quality my_cam.setQuality(0, 100); //bandwidth, quality my_cam.setMode(320, 240, 30, true); // w, h, video fps, favor area my_video.attachCamera(my_cam); //attach camera to video object addChild(my_video); //add to display list Video

Streaming & live-streaming  The Flash Media Streaming Server software streams protected, high- quality live and on-demand video  By using the FMS we can play long video-streams (without any loading), with functions like: Fast seek, jump to position, start stream at a specific position, select a part of a stream, detect user bandwidth etc  The FMS also supports a technique for multi-way applications, including webcam chat, video blogging, multiplayer games etc Video

Streamin Application  Here is an example of a Flash-based streaming application, programmed for/connected to FMS and a database/admin interface  The application has functions like: cuePoint system, search & sorting, statistics info, sv and eng languages, mailing functions etc Video

Streaming System  Example of a Flash-based streaming system using Flash Media Server: Streaming, live-streaming, webcam-conference applications programmed for/conneted to a database/admin interface Video