scriptProperties

  how to use script properties with movie scripts
property movie_script oop script




  script properties and movie scripts
>> Behaviors (which are score scripts) obviously support properties, and so do
>> frame scripts (which are are considered score scripts by Director).  For
>> example, try this in a frame script:
>
>> property count
>> 
>> on exitFrame
>>   if voidp(count) then
>>     set count = 1
>>   else
>>     set count = count + 1
>>   end if
>>   put count
>>   go to the frame
>> end
>
>Interesting. However the analogue does not work in a Movie script, thus:
>
>property count
>
>on StartMovie
>  set count = 1
>end
>
>on Iterate
>  set count = count + 1
>  put count
>end
>
>-- frame script
>
>on exitFrame
>  Iterate()
>  go the frame
>end
>
>Therefore I still feel it's best to use GLOBAL for all scripts which are
>not specifically parent object scripts (on blablabla me).
>-- 

depends how you call it, properties may work in a movie script, too:

call(#Init, script "testProperty")
call(#Iterate, script "testProperty")
-- 4

-- 3

-- 2


----------------

-- movie script "testProperty"

property count

on init
  set count = 1
end

on Iterate
  set count = count + 1
  put count
end


----------------





Home shock + cgi Bits 'n pieces Director Lingo Shocklets Contact










pageID=l_scriptProperties