Source language: Translate to:

Making it flash

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Making it flash

Postby seanie » Sun Oct 20, 2013 7:15 pm

What I'd like to do is make an object (that's not an animated GIF) - could be text or an image - 'flash' (appear and disappear) on a page, either continuously or for a limited amount of time. How would I go about that, please?
seanie
 
Posts: 47
Joined: Tue Jul 31, 2007 9:33 am

Re: Making it flash

Postby Gaev » Mon Oct 21, 2013 4:59 am

seanie:

1) You can use the Timer object to trigger the required actions ... set the Timer Interval (milliseconds) parameter to a desired value (say 1000) ... and in the Timer Interval section, you place some action scripts to alternately Hide and Show the object in question (see HideObject and ShowObject).

2) When you want to begin this "flash sequence" you invoke the TimerStart command ... and when you are done, TimerStop.

3) Along with the TimerStart command, you would also initialize some variable that keeps track of the current state of the target object e.g. ...
Code: Select all
SetVar "[FlashState]" "Visible"


In the Timer Interval code section ...
Code: Select all
If "[FlashState]" "=" "Visible"
   HideObject "[yourTargetObjectHere]" "" "0"
   SetVar "[FlashState]" "Hidden"
Else
   ShowObject "[yourTargetObjectHere]" "" "0"
   SetVar "[FlashState]" "Visible"
EndIf


4) Bonus - HideObject and ShowObject have parameters to specify "effects" and "duration" (for these effects) ... you might find that these add some "bling effects" to the process.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Making it flash

Postby seanie » Thu Oct 24, 2013 6:00 am

Thanks very much, Gaev. Please pardon the delay in getting back to you. I've been very busy, but I am very grateful to you for your help!
seanie
 
Posts: 47
Joined: Tue Jul 31, 2007 9:33 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Bing [Bot] and 1 guest