Viv, you are trying to open the movie before you have put a filename into the flash$ variable.
This code will work however, as I put the filename into flash$ before I open the animation: (note: it is a good idea to call stop movie before opening a new file.)
`Settings
disable escapekey
sync off
`Background
dbph= dbp window height()
dbpw= dbp window width()
create gadget panel 1,3
position gadget 1,0,0
resize gadget 1,dbpw,dbph
create with parent 1
send gadget to back 1
`Flash Movie Gadget
create gadget movie 3,250,250,1
position gadget 3,200,200,
create gadget button 4,"LOAD FLASH"
resize gadget 4,230,20
position gadget 4,500,300
create gadget button 5,"EXIT"
resize gadget 5,230,20
position gadget 5,500,330
`Main Loop
do
`clicked gadget variable
sel_gadget = Gadget Clicked()
if sel_gadget = 4
stop movie 3
flash$ = input dialog ("Load Flash","Input the File Directory")
open movie 3,flash$
endif
if sel_gadget = 5
stop movie 3
end
endif
loop