Cloned Stacks
Moderators: LCNeil, heatherlaine, kevinmiller, elanorb
Cloned Stacks
I have cloned stacks and I want to take that cloned stack and show a preview on the main stack in a scrolling field. Is this even possible?
Re: Cloned Stacks
Hi Mark,
You would have take a snapshot of one of the card of a stack in order to achieve and then place the generated images within a scrolling group to generate this effect.
An example script to take such a snap shot would be-
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
You would have take a snapshot of one of the card of a stack in order to achieve and then place the generated images within a scrolling group to generate this effect.
An example script to take such a snap shot would be-
You should be able to name any open stack and set the size and position to anything you want. You can then use the group command to group any snap shots.import snapshot from rect (the rect of this stack)
set the width of the last image to "200"
set the height of the last image to "150"
set the loc of the last image to the loc of this card
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Re: Cloned Stacks
How do I capture a snap shot the card? When the snap shot is in the scrolling field when touch will bring up the original stack to edit. My problem is I know what I want to do, but not sure what i can and can't do.
Re: Cloned Stacks
Hi Mark,
How many cards do you have in your stack and what are their names? As you should be able to snapshot a specific card.
I would not recommend a scrolling field but a scrolling group as mentioned above. The imported snapshots can then have scripts applied to them (e.g. mouseUp) which will respond to any script that you want to exectute
e.g.
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
How many cards do you have in your stack and what are their names? As you should be able to snapshot a specific card.
I would not recommend a scrolling field but a scrolling group as mentioned above. The imported snapshots can then have scripts applied to them (e.g. mouseUp) which will respond to any script that you want to exectute
e.g.
Kind Regards,on mouseUp
go to card "page1"
end mouseUp
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Re: Cloned Stacks
In the sub-stack that I want to clone and then put a snapshot of one card, but has two sections. I want each section of the card to be display as a snapshot side by side. The name of the card is MOQ.
Re: Cloned Stacks
Hi Mark,
If possible, could you supply the scripts you have attempted to implement so far and I should be able to advise further.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
If possible, could you supply the scripts you have attempted to implement so far and I should be able to advise further.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
Re: Cloned Stacks
This is my thinking but I am sure this is not correct. What I really want to happen is snapshots of a card from a sub-stack to be like a preview on the main stack. There are going to be several of these previews and I want to make them scrolling. Not sure but do I need to create new place holders each time? not sure what is the best method.
Code: Select all
on mouseUp
put image "image1" into graphic "graphic1" card "card1"
put field "field1" into field "field1" card "card1"
put field "field2" into field "field2" card "card2"
end mouseUp
Re: Cloned Stacks
Stupid question. I know you can add other stack to your project, but my add stack is grayed out. How do i add stacks?
Re: Cloned Stacks
Hi Mark,
As mentioned above, you will have to import a snapshot of the card you wish to use as a thumbnail e.g.
then if you want to add this image to an existing image control, you should use something like the following script immediately after importing the snapshot-
You can either lock the location of your image control which means it will be a set size or set it via script like you have been trying.
One you have the image thumbnails, you should be able to create a scrolling group with them contained which will give you the desired scrolling effect.
In regards to your substack being grayed out, I am not sure on the behaviour you are explaining. If possible could you supply a screenshot or sample stack showing this.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
As mentioned above, you will have to import a snapshot of the card you wish to use as a thumbnail e.g.
Code: Select all
import snapshot from rect (the rect of card 1) of card 1
Code: Select all
hide the last image
set the text of image "imageTest" to the text of the last image
One you have the image thumbnails, you should be able to create a scrolling group with them contained which will give you the desired scrolling effect.
In regards to your substack being grayed out, I am not sure on the behaviour you are explaining. If possible could you supply a screenshot or sample stack showing this.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
Re: Cloned Stacks
Hi Mark,
Thank you for supplying your screenshot. I now understand the substack section being greyed out. This behaviour is present because it is not possible use this with iOS. You should use the copy files section instead.
The following is taken from the iOS release not regarding this-
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
Thank you for supplying your screenshot. I now understand the substack section being greyed out. This behaviour is present because it is not possible use this with iOS. You should use the copy files section instead.
The following is taken from the iOS release not regarding this-
http://downloads.livecode.com/livecode/ ... 5-iOS.pdfNote: The Inclusions, Copy Referenced Files, Bug Reports and Stacks features are not available
when building for iOS. If you wish to include multiple stackfiles in your application, use the Copy
Files feature instead.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
Re: Cloned Stacks
I have added a stack to the copy files area. Now how do I call that stack? This is what i have tried to use, but it doesn't work.
Code: Select all
on mouseUp
go to card "card1" on stack "stack1"
end mouseUp
Re: Cloned Stacks
Hi Mark,
You have to first open your stack as LiveCode does not know that it exists. As you have used "copy files" then this places the stack in the engine directory. You can use specialFolderPath to access this and then use "Open Stack" to open the stack file.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
You have to first open your stack as LiveCode does not know that it exists. As you have used "copy files" then this places the stack in the engine directory. You can use specialFolderPath to access this and then use "Open Stack" to open the stack file.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——
Re: Cloned Stacks
I am trying to call a main stack that has been copied to the IOS files. Not sure what I am doing wrong.
Code: Select all
on mouseUp
start using stack specialFolderPath("documents") &" /photo.livecode"
end mouseUp
Re: Cloned Stacks
Hi Mark,
What script did you use to copy the stack from the engine folder to the documents folder?
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
—
What script did you use to copy the stack from the engine folder to the documents folder?
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
—
Re: Cloned Stacks
I tried it with the Engine Folder, but it would not work either. Do I need to move it from the Engine folder to the Documents Folder?