Embedded graphics in stack?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Embedded graphics in stack?

Post by Xacto » Sat Feb 04, 2017 2:01 am

If I want to send someone a stack that i am programing... do I have to include all the separate image files or are these already embedded into the stack ones it is imported?

Thanks for the help!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6028
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Embedded graphics in stack?

Post by dunbarx » Sat Feb 04, 2017 3:28 am

All objects are embedded in a stack. Only external files and other gadgetry not part of the stack file itself are, er, not part of the stack file.

I think I have this right. But it is simple to try it. Er, try it.

Craig Newman

AndyP
Posts: 418
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Embedded graphics in stack?

Post by AndyP » Sat Feb 04, 2017 10:59 pm

Its a good idea to create an extra card in your stack that is used only for imported images, think of it as a library card.
This makes it very easy to see at a glance images you are using, and if working in a team easy for others to contribute an image without having it imported to a displayed section of your stacks gui.
Andy Piddock

http://2108.co.uk/tinyide/ - Mini LC IDE alternative

http://2108.co.uk/script-editor-themer/ - Script Editor colour theming

http://livecodeshare.runrev.com/stack/897/LiveCode-Multi-Search - Search across 8 LC resources

Klaus
Posts: 11009
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Embedded graphics in stack?

Post by Klaus » Sun Feb 05, 2017 2:25 pm

Hi Xacto,

if you have used menu: File -> Import As Control -> Image file (or whatever)
then the graphics (or whatever) are embedded in the stack!


Best

Klaus

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: Embedded graphics in stack?

Post by Xacto » Sun Feb 05, 2017 7:25 pm

What is the difference from Import As Control and New Reference Control?
Both still embedded files?

Klaus
Posts: 11009
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Embedded graphics in stack?

Post by Klaus » Sun Feb 05, 2017 7:52 pm

Hi Xacto,
Xacto wrote:What is the difference from Import As Control and New Reference Control?
Both still embedded files?
Nope!

"Import as Control" will embed a copy of the file in the stack.
"New referenced control" will only save the reference = PATHNAME to the external file and
cannot display the graphic if you remove the external file or do not add it as external file
to your standalone!

Hope that clarifies things.


Best

Klaus

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: Embedded graphics in stack?

Post by Xacto » Mon Feb 06, 2017 2:08 am

Ah... ok make total sense. So, is there a way to convert a "reference control" to just a control or do I have to delete and re-import?

Thanks everyone for all the help!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6028
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Embedded graphics in stack?

Post by dunbarx » Mon Feb 06, 2017 5:12 am

You do not need to delete the reference, but if you actually import the image, you probably will no longer have any use for it. These are two different, mainly mutually exclusive ways of doing this sort of thing.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”