Adobe AIR # 4 Drag'n'Drop and File Upload - _nec _nec - web development, front-end programming, javascript, css, xhtml, ajax, air
AIR application will have the opportunity to receive various data from other applications, the GUI usual simple drag'n'drop operation. While performing an action the user should pay attention to light, the background of a couple of things more complex. Although browsers can use JavaScript-based web developers, this is a relatively new area can be, so just look at the characteristics of the operation before the concrete example. Events
The drag'n'drop operation for a minimum of two participants are from which to start the drag ends and where, and when they may react to the elements with which the data will be moved to the contact. During this process, essentially rely only events taking place in those of recording.
Event Level for this form are as follows: the source of origin of the data handling drag start - the start of the drag operation - always moving dragend time - the data "is released,"
the source new girl of the moving new girl target and potential targets new girl drag over - will continue to transmit when the moved data is over the element dragenter - when moving data enters over the item dragleave - when moving data leave the item drop - when the user drops the item being moved data
It is important to note. the type that always sets the origin new girl of the data handling, the event carries with him, the recipient can verify. For example, if the designated címsorunkból link and it moved the AIR will see text. But if, for example to the RSS feed icon is moved, we see URL. Here is the source of the browser, set the type.
AIR mobile data types are: Text - plain text ("text / plain") HTML - HTML structured text ("text / html") URL - one or more links ("text / uri-list") Bitmap - bitmap image data ("image / x-vnd.adobe.air.bitmap") File list - list files in one or more local file include ("application / x-vnd.adobe.air.file-list")
These flash capabilities new girl remind some people, which is not surprising, because for half javascriptből AIR Flash hangs on our feet. The data type of the array contains dataTransfer.types at the same time can carry more, as for example, is basically new girl an html snippet of text, but contain links and html formatted text anyway, so it may take up to three models. Them how to use it, then the data for recovery of megézzük.
Source new girl of the data at the beginning of the movement can determine what options are available for the data regarding the placement. The receiving application data and stipulate what he wants to implement them. These two parameters new girl of the event dataTransfer. effectAllowed dataTransfer the transmitter and receiver. dropEffect. Values are: none - no / no draggelhető data, or of the specific new girl data type does not accept the item copy - copy move - moving Link - Linking copy link - copying or linking copyMove - copying or moving linkMove - linking or moving all - each
The first four operations one by one in their respective standard CURSOR system, which picks up the mouse cursor in the process. For example, if you moved explorer file, the 'all' value is, we can indicate when uploading a file that is only 'copy', or copying will be possible courses of action, then this shows us the mouse. Drop
The operation is the end of the drop event, then we can start the processing of the data we received. The incident is the dataTransfer.getData (string mimetype) method can be obtained from the data you need by type. The mimetype parameter new girl is one of the types described above.
Unfortunately, this is so far from being perfect, the course new girl attempts to reproduce the phenomenon new girl was that I tried moving image browser accept new girl or checked AIRBA, great and frozen in the runtime environment. In practice, the more I show file upload and list all of the above. Example: file upload on drag'n'drop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <div class = "link target"> <h1> Links from here </ h1> This will only accept links. </ Div> <div class = "target text"> <h1> Szövegelj here </ h1> This will only accept text. </ Div> <div class = "target file"> <h1> new girl file come </ h1> This will only accept files in. </ Div> <div class = "target image"> <h1> I can </ h1> This will only accept images. </ Div>
Then determined the events page load condescension. Here to note that, although convenient to use jQuery .bin eseménykezélese unfortunately new girl this is still not good, because the transmitted Event object does not contain the dataTransfer
AIR application will have the opportunity to receive various data from other applications, the GUI usual simple drag'n'drop operation. While performing an action the user should pay attention to light, the background of a couple of things more complex. Although browsers can use JavaScript-based web developers, this is a relatively new area can be, so just look at the characteristics of the operation before the concrete example. Events
The drag'n'drop operation for a minimum of two participants are from which to start the drag ends and where, and when they may react to the elements with which the data will be moved to the contact. During this process, essentially rely only events taking place in those of recording.
Event Level for this form are as follows: the source of origin of the data handling drag start - the start of the drag operation - always moving dragend time - the data "is released,"
the source new girl of the moving new girl target and potential targets new girl drag over - will continue to transmit when the moved data is over the element dragenter - when moving data enters over the item dragleave - when moving data leave the item drop - when the user drops the item being moved data
It is important to note. the type that always sets the origin new girl of the data handling, the event carries with him, the recipient can verify. For example, if the designated címsorunkból link and it moved the AIR will see text. But if, for example to the RSS feed icon is moved, we see URL. Here is the source of the browser, set the type.
AIR mobile data types are: Text - plain text ("text / plain") HTML - HTML structured text ("text / html") URL - one or more links ("text / uri-list") Bitmap - bitmap image data ("image / x-vnd.adobe.air.bitmap") File list - list files in one or more local file include ("application / x-vnd.adobe.air.file-list")
These flash capabilities new girl remind some people, which is not surprising, because for half javascriptből AIR Flash hangs on our feet. The data type of the array contains dataTransfer.types at the same time can carry more, as for example, is basically new girl an html snippet of text, but contain links and html formatted text anyway, so it may take up to three models. Them how to use it, then the data for recovery of megézzük.
Source new girl of the data at the beginning of the movement can determine what options are available for the data regarding the placement. The receiving application data and stipulate what he wants to implement them. These two parameters new girl of the event dataTransfer. effectAllowed dataTransfer the transmitter and receiver. dropEffect. Values are: none - no / no draggelhető data, or of the specific new girl data type does not accept the item copy - copy move - moving Link - Linking copy link - copying or linking copyMove - copying or moving linkMove - linking or moving all - each
The first four operations one by one in their respective standard CURSOR system, which picks up the mouse cursor in the process. For example, if you moved explorer file, the 'all' value is, we can indicate when uploading a file that is only 'copy', or copying will be possible courses of action, then this shows us the mouse. Drop
The operation is the end of the drop event, then we can start the processing of the data we received. The incident is the dataTransfer.getData (string mimetype) method can be obtained from the data you need by type. The mimetype parameter new girl is one of the types described above.
Unfortunately, this is so far from being perfect, the course new girl attempts to reproduce the phenomenon new girl was that I tried moving image browser accept new girl or checked AIRBA, great and frozen in the runtime environment. In practice, the more I show file upload and list all of the above. Example: file upload on drag'n'drop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <div class = "link target"> <h1> Links from here </ h1> This will only accept links. </ Div> <div class = "target text"> <h1> Szövegelj here </ h1> This will only accept text. </ Div> <div class = "target file"> <h1> new girl file come </ h1> This will only accept files in. </ Div> <div class = "target image"> <h1> I can </ h1> This will only accept images. </ Div>
Then determined the events page load condescension. Here to note that, although convenient to use jQuery .bin eseménykezélese unfortunately new girl this is still not good, because the transmitted Event object does not contain the dataTransfer
No comments:
Post a Comment