kglad, thanks for your valuable efforts. We are done the completion. What i think is that you just present very very best solution for usage of UI-BUTTON for file uploading with CREATEJS coding for every Adobe Animate cc coders in canvas mode. This is priceless. Thank You! PS: I decided to show all components for other coders. In your code i add line in red to call function uploadImage() with parameter select.files[0] function browseImage_btn_click(evt) { if (!this.browseImage_btn_click_cbk) { select.click(); changeF = function () { uploadImage(select.files[0]); //alert('selected file name: ' + select.files.item(0).name); //alert('selected file size: ' + select.files.item(0).size); //alert('selected file type: ' + select.files.item(0).type); } } $("#dom_overlay_container").on("click", "#browseImage_btn", browseImage_btn_click.bind(this)); this.browseImage_btn_click_cbk = true; } var select = document.createElement("input"); select.setAttribute("type", "file"); select.setAttribute("id", "fName"); select.setAttribute('onchange','changeF()'); }; And here is uploadImage(file); function uploadImage(file) { var url = "upload.php"; var xhr = new XMLHttpRequest(); var fd = new FormData(); xhr.open("POST", url, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; fd.append("uploaded_file",file); console.log("file: "+file); xhr.send(fd); }; And the last one upload.php : <?php if (isset($_FILES['uploaded_file'])) { if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], "tmp/" . $_FILES['uploaded_file']['name'])){ echo $_FILES['uploaded_file']['name']. " uploaded ..."; } else { echo $_FILES['uploaded_file']['name']. " NOT uploaded ..."; } exit; } else { echo "no"; } ?>
... View more