header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
bala
Points:0
Posts:0

3/11/2010 5:50:16 AM

Title: In flip book add video for drag and drop


In the flipbook we easily add the images for drag and drop.But instead of video at first i put video it doesn't work after that i convert the video to swf and using image tag i drag and drop the swf video it drag and drop and it always shows loading only after that it doesn't show video please send a solution for this i using repeater for display the video i attached the image drag and drop coding with pls help me...


//initiate the drag operation
			private function dragIt(event:MouseEvent):void 
			{
	            var dragInitiator:Image = event.currentTarget as Image; 
	            
	             var imageProxy:Image = new Image(); 
	                 imageProxy.source=dragInitiator.source;
	                 imageProxy.height=dragInitiator.height;
	                 imageProxy.width=dragInitiator.width;
	                   
	            var dragSource:DragSource = new DragSource();
	            	
	            dragSource.addData(dragInitiator, 'source');
	            DragManager.doDrag(dragInitiator, dragSource, event,imageProxy);     
	        }

	       
	        //enable the drop target to accept the drop object     
	        private function dragEnterHandler(event:DragEvent):void 
	        {
	        	if(ImageView!=null)
	        	{
		            var dropTarget:FlexBook=event.currentTarget as FlexBook;
		            DragManager.acceptDragDrop(dropTarget);
	         	}
	        }      
   	        
   	        //assigning the droped object to drop target  
   	        private var img:Image = new Image(); 
	        private function dragDropHandler(event:DragEvent):void 
	        {
	            img = event.dragSource.dataForFormat('source') as Image;
	           setTimeout(AssignIamge,300);
	        }
	     	
 	     	private function AssignIamge():void 
	        {
	        	if(ImageView.viewRect.left<ImageView.contentMouseX && ImageView.viewRect.top<ImageView.contentMouseY && ImageView.viewRect.right>ImageView.contentMouseX && ImageView.viewRect.bottom>ImageView.contentMouseY)
	        	{
	        		ImageView.imageURL=img.source.toString(); 
	        	}
	        }
	     	
	     	 //enable the drop target to accept the drop object  for repeater
	        private function dragEnterHandlerForRepeater(event:DragEvent):void 
	        {
	            var dropTarget:Image=event.currentTarget as Image;
	            DragManager.acceptDragDrop(dropTarget);
	        }      
   	        //assigning the droped obect to drop target  for repeater       
	        private function dragDropHandlerForRepeater(event:DragEvent,id:String):void 
	        {
	            var img:Image = event.dragSource.dataForFormat('source') as Image;
	            if(id!=img.id)
	            {
					img.source=null; 
	            }
	        }




1
Dehaan
Points: 0
Posts:0
3/11/2010 7:19:48 AM



embed the video in your swf timeline file , do not load inside the swf dynamically.
Embeding video inside swf timeline will fix the problem of loading video. Loading this swf as source in image component should work now.

2
kate
Points: 0
Posts:0
5/15/2012 2:16:28 AM



Usually, I add video to flipbook via <a href="http://www.kvisoft.com/flipbook-maker-pro/">flash magazine software</a>. It is an easy way for me as i know nothing about codes.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 5+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions