|
Prev: Help
Next: External source editor
From: Sketch24 on 4 May 2008 23:57 Hi I'm wondering how to use flash variables with director mx 2004 or 11. What I need to do is open external photo from my app (cd-rom). I try with fileXtra4 to launch the external photo but I dont know how to tell director to launch the selected image wich is call (selectImg) flash variable. It normaly refering to something like that: "2E-AF3-IMG1.jpg" depending of selectImg value. I found this script on the net but to make it work with a variable instead of a specific file name. instance = new(xtra "filextra3") result = fx_FileOpenDocument(instance,the moviepath & "Img_2.jpg") <-- replace Img_2.jpg by selectImg (Flash variable). if result = 0 then alert "Sorry, no app is on the system to open JPEG files" thanx Normally I use getUrl in flash but within a director projector it's not working.
From: Sean Wilson on 5 May 2008 00:10 If you have a Flash sprite in Director and it issues a getURL() call, this can be trapped in Director by adding a behavior to the Flash sprite: -- on getURL me, vars put "getURL:", vars end
From: Sketch24 on 5 May 2008 00:56 Do I have to replace vars by my variables name or I have to keep it this way cause it doesnt work. Do I use the getUrl the normal way in flash or do I have to call lingo event.
From: Sean Wilson on 5 May 2008 01:20 > Do I have to replace vars by my variables name or I have to keep it this way cause it doesnt work. > Do I use the getUrl the normal way in flash or do I have to call lingo event. You shouldn't have to change anything. Which version of Director and which version of Flash are you using on which platform?
From: Sketch24 on 5 May 2008 01:30 Good I finaly manage to make it work. I was using sprite("Rapports").selectImg and its doesnt work. If I use sprite(1).selectImg it work. Seem to only work with sprite number heres the code. on AGRANDIR global gAgIMG gAgIMG = sprite(1).selectImg instance = new(xtra "FileXtra4") result = fx_FileOpenDocument(instance,the moviepath & gAgIMG) if result = 0 then alert "D?soler aucune application associ?e aux fichiers JPEG est pr?sente sur votre ordinateur." end
|
Pages: 1 Prev: Help Next: External source editor |