﻿<?xml version="1.0"?>

<!-- **************************************************************************** -->
<!-- Copyright 2003 Macromedia, Inc. All Rights Reserved.                         -->
<!-- The following is Sample Code and is subject to all restrictions on           -->
<!-- such code as contained in the End User License Agreement accompanying        -->
<!-- this product.                                                                -->
<!-- **************************************************************************** -->

<flash_behavior version="1.0">

<!--Below is where and how we define the behavior and its parameters-->

	<behavior_definition dialogID="FF_video-dialog" category="Eingebettetes Video" name="Schnellvorlauf" defaultEvent="On Press" class="movieclip">
		<properties>
			<property id="target"/> 
			<property id="numframes" default="2"/>
		</properties>
	
		<!--The dialog window is tied to the controls below by its id-->
		<!--This controls generate the dialog using the XML to UI functionality-->
		
		<dialog id="FF_video-dialog" title="Video-Schnellvorlauf" buttons="accept, cancel">
		  <grid>
		    <columns>
			  <column>
				<rows>
				  <row align="center">
				    <vbox>
					    <label value="Wählen Sie die Videoinstanz aus, die vorgespult werden soll:"/> 
						<targetlist id="target" tabindex="1" class="movieclip, video" required="true" requiredname="Ziel"/>
					</vbox>
				  </row>
				</rows>
			 	<rows>
				  <row align="center">
				    <vbox>
						<label value=""/> 
						<label value="Geben Sie ein, wie viele Bilder das Video vorgespult werden soll:"/>
						<textbox id="numframes" tabindex="2" required="true" requiredname="Anzahl der Bilder"/> 
					</vbox>
				  </row>
				</rows>
			  </column>
		    </columns>	
		  </grid>
		</dialog>
		<actionscript>
		
		<!-- Inside the CDATA section is where you place the Actionscript to be displayed in the AS panel-->
		
<![CDATA[
	//FF video Behavior
	var videoFF;
	
	videoFF = function () {
		if(($target$._parent._currentframe + $numframes$) <= $target$._parent._totalframes){
			$target$._parent.gotoAndPlay($target$._parent._currentframe + $numframes$);
		} else {
			$target$._parent.gotoAndPlay($target$._parent._totalframes);
		}
	}
	
	this.onEnterFrame = function () {
		this.videoFF();
	}
	
	this.onRelease = function () {
		delete this.onEnterFrame;
	}	
	
	
	
]]>
		</actionscript>
	</behavior_definition>
</flash_behavior>