1 / 18

FLV Player 만들기

FLV Player 만들기. 계원조형예술대학 멀티미디어디자인과. 목차. NetConnection Class NetStream Class Sound Class 비례식을 이용한 드래그 바 FULL Screen. FLV Player 만들기. FLV Player 만들기. : NetConnection Class. NetConnection Class. 로컬 또는 HTTP 주소로부터 스트리밍 FLV 파일을 재생할 수 있는 방법 제공.

jaser
Download Presentation

FLV Player 만들기

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. FLV Player 만들기 계원조형예술대학 멀티미디어디자인과

  2. 목차 NetConnection Class NetStream Class Sound Class 비례식을 이용한 드래그 바 FULL Screen FLV Player 만들기

  3. FLV Player 만들기 : NetConnection Class

  4. NetConnection Class 로컬 또는 HTTP 주소로부터 스트리밍 FLV 파일을 재생할 수 있는 방법 제공 ● NetConnection Class 를 이용하여 FLV 를 재생할 수 있는 연결을 여는 방법 var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); NetConnection() 생성자 : NetConnection 객체를 만들 때 사용 connect() 메서드 : FLV를 재생할 수 있게연결, 매개변수에 null값 대입

  5. FLV Player 만들기 : NetStreamClass

  6. NetStream Class 지정된 NetConnection 객체를 통해 FLV 파일 재생에 사용 하는 스트림 제공 ● NetStreamClass 를 이용하여 FLV 를 재생하는 방법 var my_video:Video; var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); var stream_ns:NetStream = new NetStream(connection_nc); my_video.attachVideo(stream_ns); stream_ns.play("video1.flv"); NetStream() 생성자 : NetStream 객체를 만들 때 사용 attachVideo() 메서드 : Video 심볼에게 NetStream 객체를 연결 play() 메서드 : FLV 재생, 매개 변수에 경로 대입

  7. FLV Player 만들기 : SoundClass

  8. Sound Class FLV Sound 를 제어 ● attachAudio 를 이용하여 FLV 의 사운드를 제어 하는 방법 var my_nc:NetConnection = new NetConnection(); my_nc.connect(null); var my_ns:NetStream = new NetStream(my_nc); my_video.attachVideo(my_ns); my_ns.play("yourVideo.flv"); this.createEmptyMovieClip("flv_mc", this.getNextHighestDepth()); flv_mc.attachAudio(my_ns); var audio_sound:Sound = new Sound(flv_mc); audio_sound.setVolume(50) trace(audio_sound.getVolume()) attachAudio() 메서드 : FLV 사운드를 제어, 매개 변수에 netStream 객체 대입 setVolume() 메서드 : 사운드의 볼륨 크기 조절, 매게변수에 0~100값 getVolum() 메서드 : 사운드의 현재 볼륨 크기를 얻음

  9. FLV Player 만들기 : 비례식을 이용한 드래그 바 만들기

  10. 비례식을 이용한 드래그 바 만들기 비례식의 이해 외항의 곱은 내항의 곱과 같음 A : B = C : x Ax = BC x = BC/A A, B, C 의 값을 알면 x 의 값을 알 수가 있음

  11. A B 200 40 C x ? 100 비례식을 이용한 드래그 바 만들기 그래프를 통한 이해 ●식) 200 : 40 = 100 : x 200x = 4000 x = 4000/200 x = 20

  12. 비례식을 이용한 드래그 바 만들기 사운드 드래그 바에 적용 soundDragBar_mc drag_mc bar_mc ●식) bar_mc._width : drag_mc._x = 100 (sound 의 Max 값 ) : x bar_mc._width*x = drag_mc._x * 100 x = drag_mc._x * 100/bar_mc._width drag_mc 의 움직임에 따라 설정 되어야 하는 Volume 의 값을 알 수 있음

  13. FLV Player 만들기 : Full Screen

  14. Full Screen Full Screen Mode 사용방법 : AS 부분 ● ActionScript 에 아래의 코드 추가 Stage["displayState"] = "fullScreen"; Stage[“displayState”] : 스테이지 display 모드 상태, 값에 fullScreen

  15. Full Screen Full Screen Mode 사용방법 : HTML setting ● HTML 의 Template 에서 Flash Only – Allow Full Screen선택

  16. Full Screen Full Screen Mode 사용방법 : JavaScript 부분 ●아래 붉은색 코드에서 false 를 true 로 변경 <script language="javascript"> if (AC_FL_RunContent == 0) { alert("This page requires AC_RunActiveContent.js."); } else { AC_FL_RunContent( 'codebase‘, ‘~ 생략’, 'width', '100%', 'height', '100%', ~ 생략 'movie', 'FlashVars_sample', 'allowFullScreen', 'true', 'salign', '' ); //end AC code } </script>

  17. Full Screen Full Screen Mode 사용방법 : Event 부분 ● ActionScript 에 아래의 코드 추가 var fullHandler = new Object() fullHandler.onFullScreen = function(bFull:Boolean) { // 실행할 액션 }; Stage.addListener(fullHandler); onFullScreen : fullScreen 의 상태가 변할 때 발생하는 이벤트 Stage.addListener : Stage 의 변경 상태를 오브젝트에 등록

  18. 실습 ●외부에 있는 비디오 파일을 보여주는 FLV Player 를 만듭니다. 실습 : flvPlayer.fla

More Related