I took the code from my old RealStudio project and applied it to my project in the latest XOJO version, but when I go to drag a movie into the MoviePlayer, it rejects the movie. In my moviePlayer Open event I have:
all formats are in my FileTypes set and can be loaded into the MoviePlayer by using a Load Movie button.
For my DropObject event for the MoviePlayer I have (abbreviated):
f=obj.folderItem
if f <> Nil then
m = f.OpenAsMovie
if m <> nil then
moviePlayer1.movie = m
So when I drag any file onto the MoviePlayer, its file icon goes right back to the Desktop where it was before instead of getting loaded into the MoviePlayer.
when I put return true in the DropObject event, i get an error saying “You cannot return a value because this method has not defined a return type.” I also tried putting the acceptFileDrop code in the DropObject event but still no luck. The LR doesn’t say much about this and no examples of dropping a movie into the movieplayer. My code used to work in RealStudio, so I don’t know what’s different in XOJO.
There are no other drop events for the movieplayer than DropObject. wondering if this capability was lost when XOJO moved away from QuickTime? Anyone have sample code of loading a movie via dragging to the movieplayer? I tried making a very simple app with nothing but the movieplayer and couldn’t get it to work either.
In the meantime, you can do it over the window. I seem to recall you can even get the location as to where a drop occured, so you can see if it was over the movieplayer as per say.