From: Almudever on 10 Dec 2008 05:40 I need to open an image of external JPEG in an project. And then this one will be embedded in the project. My ask is: There are some Xtra appropiate to this or only lingo is sufficient? And what is the code?
From: Mike Blaustein on 10 Dec 2008 06:57 You can use just Lingo. You would need to make a new bitmap member newMem=new(#bitmap) Then set the filename to your external jpg newMem.filename="path\to\file.jpg" Now, in order to "embed" it, you can make another bitmap wich has the same image as the one you just made, and name it. embeddedVersion=new(#bitmap) embeddedVersion.image=newMem.image embeddedVersion.name="WhateverNameYouWant" Then delete the external one if you wish newMem.erase() Then, the last step is to save the cast with the new embedded member castlib("internal").save() That's it. If you dont really need to have it saved in the castlib, you can get away with just setting the filename of any bitmap member. Also, beware that the save command does not work with compressed castlibs, so you can not save it in shockwave (cct) format. You can save it in cxt (encrypted) format.
From: Sean Wilson on 10 Dec 2008 15:22 > newMem=new(#bitmap) > > Then set the filename to your external jpg > > newMem.filename="path\to\file.jpg" > > Now, in order to "embed" it, you can make another bitmap wich has the > same image as the one you just made, and name it. > > embeddedVersion=new(#bitmap) > embeddedVersion.image=newMem.image > embeddedVersion.name="WhateverNameYouWant" > > Then delete the external one if you wish > > newMem.erase() Alternatively: tMember = _movie.newMember(#bitmap) tMember.importFileInto("path\to\file.jpg")
|
Pages: 1 Prev: keyDown keyPressed Problem Next: 0.3561234 Look Inside Now ... 0.4949807 |