LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on mouseUp
create field "newField"
hide field "newField"
-- to be located first then fade into view
set the location of field "newField" to the location of field "firstField" -- PLUS X OR something to move it under it?!
show field "newField" with visual effect dissolve
end mouseUp
Okay, I got it working now with the following code, but when the new field is displayed it's briefly visible before it hides. Is there another way to create it invisibly then bring it in with the fade in type effect?
Here's what works for now anyway (no doubt there's a much easier way to do this, like with a function or something and a lot less code, but I haven't learned that far yet!):
on mouseUp
create field "newField"
hide field "newField"
-- to be located first then fade into view
set the width of field "newField" to 300
set the height of field "newField" to 25
set the location of field "newField" to the location of field "firstField"
move field "newField" relative 0,30 without waiting
show field "newField" with visual effect dissolve
end mouseUp
Thanks in advance for any ideas on how to not have the flashing new field!
on mouseUp
lock screen
create field "newField"
hide field "newField"
-- to be located first then fade into view
set the width of field "newField" to 300
set the height of field "newField" to 25
set the loc of fld "newField" to item 1 of the loc of fld "oldField",item 2 of the loc of fld "oldField" + 30
unlock screen
show field "newField" with visual effect dissolve
end mouseUp
You might also want to look up templateField in the dictionary. If you set properties of the templateField, all newly created fields inherit its properties.
Hope that is any help,
Malte
Last edited by malte on Wed Jul 23, 2008 3:29 pm, edited 1 time in total.
on mouseUp
create invisible field "newField"
set the width of field "newField" to 300
set the height of field "newField" to 25
## set the location of field "newField" to the location of field "firstField"
## ??? See below...
## move field "newField" relative 0,30 without waiting
## This will not be visible, so what is this good for?
## Maybe you want to set the new loc (y + 30) directly like:
put the loc of fld "firstField" into tNewloc
add 30 to item 2 of tNewloc
set the loc of fld "newfield" to tNewloc
## Now calculate and set the LAYER of the new field:
set the layer of fld "newfield" to (the layer of fld "firstField" - 1)
## Finally show the beast...
show field "newField" with visual effect dissolve
end mouseUp
set the loc of fld x to the loc of fld y -- you could take item 2 of the loc if you want
set the top of fld x to the bottom of fld y
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
OH thanks so much guys! LOL sorry Klaus am 36 and still learning to speak normal Engrishh let alone Revanese! Mark, sheesh I only started a few days ago so everything is bloomin difficult!