Using LC for Slideshow
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Using LC for Slideshow
Currently buttons stay at upper left of center of screen when image enlarges full screen, and in full screen when using forward/back buttons, slides don't remain enlarged, and full screen button has to be pressed for each slide. When in full screen mode, all slides should display full screen.
Re: Using LC for Slideshow
If "left" = 0 (x-coordinate of the upper-left corner of screen), and "top" = 0 (y-coordinate of the upper-left corner of screen),
what are x and y coordinates of bottom-right of screen?
And Google "LiveCode | Resolution Independence" (Should be 4th from top in search results)
Will you help figure out how to make info in article work with my SlideShow stack?
Note how "Resolution Independence" involves automatic scaling, which is just what I've been after from the start.
what are x and y coordinates of bottom-right of screen?
And Google "LiveCode | Resolution Independence" (Should be 4th from top in search results)
Will you help figure out how to make info in article work with my SlideShow stack?
Note how "Resolution Independence" involves automatic scaling, which is just what I've been after from the start.
Re: Using LC for Slideshow
Replace your Object Script for Full Screen button with this —
on mouseUp
lock screen
set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
unlock screen
end mouseUp
I've also added this to Stack Script, but I don't think it's working —
on preOpenStack
set the fullscreenmode of me to "letterbox"
end preOpenStack
Need to use points instead of pixels for images, and enough points for highest density retina displays.
Is there any way to program button differently for 1st and second mouseUp?
First mouseUp sets fullscreen mode, and second mouseUp undoes fullscreen mode.
Do you have any idea how to script that?
on mouseUp
lock screen
set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
unlock screen
end mouseUp
I've also added this to Stack Script, but I don't think it's working —
on preOpenStack
set the fullscreenmode of me to "letterbox"
end preOpenStack
Need to use points instead of pixels for images, and enough points for highest density retina displays.
Is there any way to program button differently for 1st and second mouseUp?
First mouseUp sets fullscreen mode, and second mouseUp undoes fullscreen mode.
Do you have any idea how to script that?
Re: Using LC for Slideshow
Got it! Replace your Object Script for image with this —
on mouseUp
lock screen
set the fullscreen of this stack to false
unlock screen
end mouseUp
on mouseUp
lock screen
set the fullscreen of this stack to false
unlock screen
end mouseUp
Re: Using LC for Slideshow
How about having 2 buttons exact same position. Make one visible and the other invisible and swap them in the mouseUp of each button. Or check the label of the button and change it each time it is pressed. Base your script on what is in the label. "Full Screen" or "Small" or whatever wording you want to use.Is there any way to program button differently for 1st and second mouseUp?
First mouseUp sets fullscreen mode, and second mouseUp undoes fullscreen mode.
Do you have any idea how to script that?
Linda
Re: Using LC for Slideshow
set the fullscreen of this stack to not the fullscreen of this stack
Will toggle (invert) the true/false state. This toggling true/false is used in lots of situations
Will toggle (invert) the true/false state. This toggling true/false is used in lots of situations
-
- Livecode Opensource Backer
- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Re: Using LC for Slideshow
Hi Linda,
If you download my "SCREENER" (i.e. the first demo stack) there ARE 2 buttons that toggle visible, just as you suggest.
If you download my "SCREENER" (i.e. the first demo stack) there ARE 2 buttons that toggle visible, just as you suggest.
Re: Using LC for Slideshow
When I inspect fs button object in SCREENER stack, I can see that there's also an ss button in object inspector, but I have no idea how to create a button that's invisible.
1) How do I put an invisible button on top or underneath a visible button???!
2) How do I then script onMouseup for that invisible button when there isn't an actual button to select and get Object Script?
3) What are x-y coordinates for lower right of screen if x-y coordinates for top left of screen are 0,0?
4) Is there a way to create a master control panel of buttons and then apply that to whichever card(s) I select (since buttons remain same on all card "slides") without having to cut and paste buttons onto each card?
1) How do I put an invisible button on top or underneath a visible button???!
2) How do I then script onMouseup for that invisible button when there isn't an actual button to select and get Object Script?
3) What are x-y coordinates for lower right of screen if x-y coordinates for top left of screen are 0,0?
4) Is there a way to create a master control panel of buttons and then apply that to whichever card(s) I select (since buttons remain same on all card "slides") without having to cut and paste buttons onto each card?
Re: Using LC for Slideshow
How can I script button for 2 different conditions?
(Much simpler and easier than visible/invisible button just as lock screen/fullscreen is much easier than coding each image name)
For instance,
on mouseUp
lock screen
if fullscreen=false then set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
if fullscreen=true then set the fullscreen of this stack to false
unlock screen
end mouseUp
I have this working when clicking on full screen image (Object Script for image on card)
on mouseUp
lock screen
set the fullscreen of this stack to false
unlock screen
end mouseUp
And this works from FS button —
on mouseUp
lock screen
set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
unlock screen
end mouseUp
But I don't see why both can't be combined in Object Script for the one FS button.
(Much simpler and easier than visible/invisible button just as lock screen/fullscreen is much easier than coding each image name)
For instance,
on mouseUp
lock screen
if fullscreen=false then set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
if fullscreen=true then set the fullscreen of this stack to false
unlock screen
end mouseUp
I have this working when clicking on full screen image (Object Script for image on card)
on mouseUp
lock screen
set the fullscreen of this stack to false
unlock screen
end mouseUp
And this works from FS button —
on mouseUp
lock screen
set the fullscreen of this stack to true
set the fullscreenmode of this stack to "letterbox"
unlock screen
end mouseUp
But I don't see why both can't be combined in Object Script for the one FS button.
Re: Using LC for Slideshow
Hi doveweed,
FULLSCREEN is not a (global) variable, but the property of a stack, so you need to do like this:
Best
Klaus
FULLSCREEN is not a (global) variable, but the property of a stack, so you need to do like this:
Code: Select all
on mouseUp
lock screen
if the fullscreen OF THIS STACK = false then
## the order of these commands is also important!
set the fullscreenmode of this stack to "letterbox"
set the fullscreen of this stack to true
### use ELSE here, there are only 2 options -> TRUE/FALSE :-)
### if fullscreen=true then set the fullscreen of this stack to false
else
set the fullscreen of this stack to false
end if
unlock screen
end mouseUp
Klaus
Re: Using LC for Slideshow
Hi doveweed,
a.
the width of this stack
## or of this cd, which is identical
b.
the bottom of this stack
c.
item 1 of the bottomright of this stack
y2 =
a.
the height of this stack
## or of this cd, which is identical
b.
the right of this stack
c.
item 2 of the bottomright of this stack
Always remember that LC is VERY english like
select all of them and then GROUP SELECTED -> menu -> Object
Shortcut: command-g
Then name that group (always a good idea!) and check its "backgroundbehavior" in the inspector.
Now if you create a new card, this group will automatically be placed on that new card.
To add a group manually to a already made card, go to that card and use menu: Object -> Place group -> (name of your group here)
To learn more about the basics of Livecode, I recommend to check these great stacks:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Create a (visible) button and then uncheck its VISIBLE property in the inspectordoveweed wrote:0. When I inspect fs button object in SCREENER stack, I can see that there's also an ss button in object inspector, but I have no idea how to create a button that's invisible.

You can drag'n'drop that button in the project browser or set its LAYER property in the inspector to a lower number than the button "on top of it".doveweed wrote:1) How do I put an invisible button on top or underneath a visible button???!
Use the project browser or FIRST set its script and THEN make it invisible as in 0.doveweed wrote: 2) How do I then script onMouseup for that invisible button when there isn't an actual button to select and get Object Script?
x2 =doveweed wrote:3) What are x-y coordinates for lower right of screen if x-y coordinates for top left of screen are 0,0?
a.
the width of this stack
## or of this cd, which is identical
b.
the bottom of this stack
c.
item 1 of the bottomright of this stack
y2 =
a.
the height of this stack
## or of this cd, which is identical
b.
the right of this stack
c.
item 2 of the bottomright of this stack
Always remember that LC is VERY english like

Yes, create your button(s) and other controls you need on more than one card,doveweed wrote:4) Is there a way to create a master control panel of buttons and then apply that to whichever card(s) I select (since buttons remain same on all card "slides") without having to cut and paste buttons onto each card?
select all of them and then GROUP SELECTED -> menu -> Object
Shortcut: command-g
Then name that group (always a good idea!) and check its "backgroundbehavior" in the inspector.
Now if you create a new card, this group will automatically be placed on that new card.
To add a group manually to a already made card, go to that card and use menu: Object -> Place group -> (name of your group here)
To learn more about the basics of Livecode, I recommend to check these great stacks:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: Using LC for Slideshow
Doveweed:
I second Klaus' suggestion to go through the scripting conference stacks. It will give you the overview you need to understand the advice you get here. Most of your questions are addressed in that series, and everything will make a lot more sense once you have the basics. The stacks are arranged in order, with the first stack assuming no previous programming experience. Work your way through them in order. You may find you don't need to study more than the first five or six stacks, and then you can look at the others later when you want to work with the more advanced topics.
I think without these basic concepts of how LC works, you'll find yourself struggling harder than you need to.
I second Klaus' suggestion to go through the scripting conference stacks. It will give you the overview you need to understand the advice you get here. Most of your questions are addressed in that series, and everything will make a lot more sense once you have the basics. The stacks are arranged in order, with the first stack assuming no previous programming experience. Work your way through them in order. You may find you don't need to study more than the first five or six stacks, and then you can look at the others later when you want to work with the more advanced topics.
I think without these basic concepts of how LC works, you'll find yourself struggling harder than you need to.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Using LC for Slideshow
Danke Klaus! Less is more. The Object Script works like a charm, with no need for duplicate invisible buttons. But thanks for explaining how to create and script invisibles all the same, as that may most likely come in handy someday with something else.
And thanks for the stack link too.
Jacqueline, thanks for your suggestion. I've downloaded and unzipped the Scripting Conference stacks from the link Klaus provided, and have my eye on consuming and digesting them as soon as I can.
And thanks for the stack link too.
Jacqueline, thanks for your suggestion. I've downloaded and unzipped the Scripting Conference stacks from the link Klaus provided, and have my eye on consuming and digesting them as soon as I can.
Re: Using LC for Slideshow
BTW is there a way to upload a standalone app to a server and embed app in HTML on webpage so app can be run in a browser over the internet?
-
- Livecode Opensource Backer
- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Re: Using LC for Slideshow
If you are prepared to wait (not sure how long) an extension to convert Livecode stuff into HTML is in the pipeline.