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 »

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 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus »

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 »

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 »

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 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus »

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 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual Effects not working.

Post by Klaus »

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


Best

Klaus
Post Reply