_global scope or Singleton
consider following situation:
set _global.test = "asdf"; in 1 movie clip. load movieclip 1 using loadclip
can movieclip loaded primary 1 reference _global.test.
i think not seem work me. reason ask trying define global variables(url root, flash gateway url, etc) flash website. these variables want set once , use everywhere. have tried using singleton approach run problem instantiated in each loaded movieclip. loaded movie clip has no reference global vars set in 1 loaded. know can use _parent messy , prone breaking. want clean easy approach setting application variables in 1 place.
set _global.test = "asdf"; in 1 movie clip. load movieclip 1 using loadclip
can movieclip loaded primary 1 reference _global.test.
i think not seem work me. reason ask trying define global variables(url root, flash gateway url, etc) flash website. these variables want set once , use everywhere. have tried using singleton approach run problem instantiated in each loaded movieclip. loaded movie clip has no reference global vars set in 1 loaded. know can use _parent messy , prone breaking. want clean easy approach setting application variables in 1 place.
> set _global.test = "asdf"; in 1 movie clip. load movieclip
>
> 1 using loadclip
>
> can movieclip loaded primary 1 reference _global.test.
yes .. that's global means :)
> think not seem work me.
sounds there may else you're not telling us. maybe
are accessing before _global defined. or maybe you're using
a local variable somewhere.
--
jeckyl
>
> 1 using loadclip
>
> can movieclip loaded primary 1 reference _global.test.
yes .. that's global means :)
> think not seem work me.
sounds there may else you're not telling us. maybe
are accessing before _global defined. or maybe you're using
a local variable somewhere.
--
jeckyl
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment