Visual Effects not working.

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Visual Effects not working.

Post by dburdan » Tue Feb 15, 2011 3:03 am

I am trying to use a push visual effect to transition between cards but it only works once. If I hit the button more than once it only uses the effect the first time. Here is my code:

Code: Select all

on About
   lock screen
   visual effect push up
   go to stack "About"
   unlock screen
end About

on BackToMenu
   lock screen
   visual effect push down
   go to card "MainScreen" of stack "Card Shark"
   unlock screen
end BackToMenu

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Visual Effects not working.

Post by Dixie » Tue Feb 15, 2011 9:40 am

Hi....

I think that the problem here is that the visual effects are for transition between cards, not stacks. There is a way around this. I created two stacks of the same size... 'About' and 'Shark'...

In button on a card in stack 'shark', I placed :-

Code: Select all

on mouseUp
   visual effect dissolve
   go stack "about" in the window of stack "shark"
end mouseUp
and in a button on a card in stack 'About' :-

Code: Select all

on mouseUp
   visual effect dissolve
   go stack "shark" in the window of stack "about"
end mouseUp
I just switched the stack names around...

be well

Dixie

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus » Tue Feb 15, 2011 12:14 pm

Hi DAn,

yes, Dixie is right, "visaual effect" will only work in one window!
AND please leave out the "lock/unlock screen" lines or you will NOT see any effect 8)


Best

Klaus

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: Visual Effects not working.

Post by dburdan » Tue Feb 15, 2011 6:17 pm

Ok thanks guys!

banjobill
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1
Joined: Sat Aug 07, 2010 1:46 pm

Re: Visual Effects not working.

Post by banjobill » Tue Feb 15, 2011 9:17 pm

Hi

I thought I'd mention that if you do need to use 'lock screen' then you can 'unlock' the screen with a visual effect e.g.

Code: Select all

on mouseUp
lock screen
//do stuff
unlock screen with visual effect dissolve
end mouseUp
Regards

Bill
Cheers Bill

Developing on Mac Mini OSX 10.6.8, LC 4.6.4 Professional Build 1452
iOs mobile add on. Android mobile trial.
iPod Touch & 7" epad running Android 2.2 Froyo

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Visual Effects not working.

Post by Jellicle » Sun Mar 20, 2011 10:34 pm

I'm getting script errors when i try use visual effects. The scripts refuse to compile with the error "compilation error at line 2 (Expression: unquoted literal), char 10"

What gives?
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus » Sun Mar 20, 2011 10:59 pm

Hi Jellicle,
Jellicle wrote:I'm getting script errors when i try use visual effects. The scripts refuse to compile with the error "compilation error at line 2 (Expression: unquoted literal), char 10"
What gives?
well, we can't tell until we see your script! 8)


Best

Klaus

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Visual Effects not working.

Post by Jellicle » Sun Mar 20, 2011 11:17 pm

Hahaha I guess not. Fixed it anyway - apparently you need to put quotes around the actual effect name. The documentation doesn't mention that...
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus » Mon Mar 21, 2011 1:55 pm

You shouldn't need quotes around the names of visusl effects!
Please post your code, if possible!


Best

Klaus

Post Reply