copy costume from <dirlist> doesnt work in exported app

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
manyone
Posts: 40
Joined: Nov 5th, '17, 07:56

copy costume from <dirlist> doesnt work in exported app

Post by manyone » Nov 12th, '18, 11:46

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?

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

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

Post by JohnM » Nov 12th, '18, 12:15

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!

manyone
Posts: 40
Joined: Nov 5th, '17, 07:56

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

Post by manyone » Nov 12th, '18, 12:48

worked like a charm! thanks for the quick response! (i just have to remember to use PNG formats)

Post Reply