Repeated Visual Effects on the Same Card

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Repeated Visual Effects on the Same Card

Post by deeverd » Mon Nov 19, 2007 6:28 pm

Hello out there,

I have been using the visual effects command quite a bit for going from one card to the next, especially in making ebook-like programs.

However, I was wondering if it is possible to have visual effects keep appearing on the same card without going to another card?

To be more specific, I have a number of fields that are all the exact same size and in the exact same position on a single card. When one field is hidden, the next appears, and so on down the line, until it cycles through all seven fields on that card. What I would like to be able to do is to use any of the visual effects when one field goes off, and have the visual effects command affect the next field that comes on.

Is this possible? I haven't found any mention of it on this forum? If so, how is it accomplished? Thanks in advance for whoever can offer this solution.

All the best, deeverd

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Nov 19, 2007 8:22 pm

Hi Deeverd,

Just unlock screen with visual effect. For example:

Code: Select all

on mouseUp
  lock screen
  put random(255) & comma & random(255) & comma & random(255) into myRGB
  set the backcolor of this cd to myRGB
  unlock screen with visual effect dissolve
end mouseUp
I'll put the example in RevOnline, user name Mark.

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

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Thanks, I'll Do That Tonight

Post by deeverd » Mon Nov 19, 2007 10:35 pm

Thanks Mark,

Fantastic! I kept playing with the script in a similar fashion, but I was definitely confused and therefore got it backwards. I thought I needed to unlock the screen first, but looking at your code, it all makes sense now.

Thanks again. I'll definitely be able to use your information tonight in a "mathemagics" program I'm building.

All the best, deeverd

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

More info

Post by deeverd » Fri Nov 30, 2007 11:09 pm

Hello,

Once again, just in case anyone newer than me at programming reads this thread, I continued to do more research on this topic and eventually found that it's also quite easy to create visual effects without locking or unlocking a card when the visual effect takes place on a field when one field hides and/or a hidden field is shown.

I'm writing the code from faulty memory, but it is as easy as doing something like the following:

hide field "myFlashyField" with visual effect checkerboard very fast

...or something like that. It works just as well with the show command. Anyway, I hope that helps someone.

Cheers, deeverd

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Dec 01, 2007 4:39 am

Hi Deeverd,

This works indeed. I didn't know this yet :-) Thanks!

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

Post Reply