Page 1 of 1

copy costume from <dirlist> doesnt work in exported app

Posted: Nov 12th, '18, 11:46
by manyone
i have a small app that performs some process against a supplied image - during"regular" (interpreted) mode it allows the user to select file from the drop down part of the 'copy costume..' block. when exported to app as is, the executable works but it doesn't allow the selection of an image. it uses the last image selected in the last run. i changed the 'copy costume' source field into an '(ask "enter file name") block - it cannot load the file name entered. is there a special way to recode the 'copy costume' block so it can take in an external image?

Re: copy costume from <dirlist> doesnt work in exported app

Posted: Nov 12th, '18, 12:15
by JohnM
Is your app meant to read an image from a file? If so, "copy costume" isn't helpful. What you'll want to do is to get the file name, then read the image file. The "read file" block (in the "Words" category) recognizes .png files and convert them into an actual bitmap image that can be used in the "set costume to" block:
scriptImage.png
Hope that helps!

Re: copy costume from <dirlist> doesnt work in exported app

Posted: Nov 12th, '18, 12:48
by manyone
worked like a charm! thanks for the quick response! (i just have to remember to use PNG formats)