openBackground ID in Behavior Script

J. Landman Gay jacque at hyperactivesw.com
Mon Jul 25 12:59:23 EDT 2016


This is a message sent by the engine and it will provide the id of the 
background, which you can't specify yourself. The handler needs to use a 
valid parameter variable to catch that id,  and numbers won't work. It 
should be something like pID or similar which the engine can populate.

You can also call it from another handler if you want and in that case you 
can provide the id:

on doSometjing
  openBackground 1234
end doSomething


Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



On July 25, 2016 12:05:06 AM Sannyasin Brahmanathaswami <brahma at hindu.org> 
wrote:

> I put this into a behavior for a group on a card
>
> on openBackground (the id of me)
>     set the blendlevel of btn "home-logo" to 0
>     send hideLogo to me in 1 second
> end openBackground
>
> But the script editor flags the opening line with:
>
> compilation error at line 4 (Handler: not a valid parameter name) near "(", 
> char 4
>
> put I put farther down the behavior
>
> on mouseup
>   put the id of me
> end mouseup
>
> and click on the group
>
> it returns the ID of the group to which the behavior is assigned.
>
> What am I missing?  Why won't LC evaluate (the id of me)  as a param?
>
> even if I hard wire the ID just as a test..
>
> on openBackground  1076
>    set the blendlevel of btn "home-logo" to 0
>    send hideLogo to me in 1 second
> end openBackground
>
> I get the same error msg
>
> compilation error at line 4 (Handler: not a valid parameter name) near 
> "1076", char 4
>
> According to the dictionary, this should work.
>
> BR
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list