Adjusting image opacity using slider
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Adjusting image opacity using slider
Hi,
I am trying to adjust the blendLevel of an image using a scrollbar.
on mouseUp
if the thumbpos of me = 5 then
set the blendLevel of img "strip1" to 0
else set the blendLevel of img "strip1" to 100
end mouseUp
Above: this is the code i am currently trying to get to work - although i would rather have the image fade in and out based on the thumbpos of the scroll bar - if anyone knows how to to this then i would appreciate your help! Thank you
I am trying to adjust the blendLevel of an image using a scrollbar.
on mouseUp
if the thumbpos of me = 5 then
set the blendLevel of img "strip1" to 0
else set the blendLevel of img "strip1" to 100
end mouseUp
Above: this is the code i am currently trying to get to work - although i would rather have the image fade in and out based on the thumbpos of the scroll bar - if anyone knows how to to this then i would appreciate your help! Thank you
Re: Adjusting image opacity using slider
Hi calmrr3,
set the startvalue of the sb to 0 and the endvalue of the sb to 100.
Then add this script to the sb:
Best
Klaus
set the startvalue of the sb to 0 and the endvalue of the sb to 100.
Then add this script to the sb:
Code: Select all
## This handler has one parameter -> the current thumbposition!
## This param is updated in REAL TIME!
on scrollbardrag tThumbPos
set the blendlevel of img "strip1" to tThumbPos
end scrollbardrag
Best
Klaus
Re: Adjusting image opacity using slider
Hi,
Just a quick thought !
on scrollbardrag N
set the blendlevel of img "strip1" to N
end scrollbardrag
HTH
Regards
Just a quick thought !
on scrollbardrag N
set the blendlevel of img "strip1" to N
end scrollbardrag
HTH
Regards
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Re: Adjusting image opacity using slider
Damn ! Beat me to it Klaus !!
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Re: Adjusting image opacity using slider
hello
i want to use a scrollbar to adjust the penheight and the penwidth to make a drawing game; i used your code Klaus but it didnt worked..
what did i do wrong??
Kelyan
i want to use a scrollbar to adjust the penheight and the penwidth to make a drawing game; i used your code Klaus but it didnt worked..
Code: Select all
on scrollbardrag tThumbPos
set the penheight to tThumbPos
set the penwidth to tThumbPos
end scrollbardrag
Kelyan
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Adjusting image opacity using slider
There are no properties penheight and penwidth
as far as I can tell in the documentation.
You might get a bit further using lineSize.
Make this your "spiritual home":
-
as far as I can tell in the documentation.
You might get a bit further using lineSize.
Make this your "spiritual home":
-
Re: Adjusting image opacity using slider
Hi kelyanok,
please create a new thread next time, this one is from 2013!
As Richmoind said, please consult the dictionary if in doubt!
It will tell you that "penheight" and "penwidth" are both deprecated equivalents to LINESIZE.
And setting -> set the LINESIZE to 10 will affect the PAINT tool "line".
Best
Klaus
please create a new thread next time, this one is from 2013!
As Richmoind said, please consult the dictionary if in doubt!
It will tell you that "penheight" and "penwidth" are both deprecated equivalents to LINESIZE.
And setting -> set the LINESIZE to 10 will affect the PAINT tool "line".
Best
Klaus