이미지 컴포넌트의 이미지를 선택하여 동작시키는 화면이다.
관련 API로 selectlocalimage, getimagefileobject가 있다.
관련 이벤트로 on_selectimage가 있다.
템플릿 위치: /HTML5/COMPONENT/IMAGE/image_selectfile
템플릿 파일
// "이미지 선택" 버튼 이벤트
function btn_imageselect_on_mouseup(objInst)
{
//로컬에서 파일을 선택하는 동작
this.image.selectlocalimage();
}
/**
* 사용자가 이미지 파일을 선택하여 변경시 호출 이벤트
* @param {Object} objInst 이미지 컴포넌트 인스턴스
* @param {number} strFileName 화면 파일 이름
* @param {number} objFile 오브젝트 파일
*/
function image_on_selectimage(objInst, strFileName, objFile)
{
factory.consoleprint("on_selectimage> Start");
factory.consoleprint("on_selectimage> Image Object Name = " + objInst.getname());
factory.consoleprint("on_selectimage> strFileName = " + strFileName);
this.fld_imagefilename.settext(strFileName);
if (objFile) {
this.fld_imagefilesize.settext(objFile.size);
}
}