Hi,
I have a MovieClip instance called: MC1
I have a Dynamic textfield called: DynT1
I’m doing a page which includes a dynamic text scroller.
This text scroller uses both elements: the dynamic textfield and the MovieClip in which this dynamic textfield is contained.
The scroller engine (a MovieClip) contains AS with several calls to both elements, so if I want to use this scroller in other pages belonging to the same site I have 2 options:
1- Duplicate the scroller MC as many times as I need (and change those instance names for every specific scroller)
2- Assign these instance names a variable name in the same frame the scroller is, resulting in the following:
Frame X
var1=“MC1”;
var2=“DynT1”;
Frame X+1
var1=“MC2”;
var2=“DynT2”;
…and so on. This way I can use the same scroller MC for ALL the pages I need it in…At least this is the theory.
What I have in the scroller engine are instructions such as:
[AS]
if (_parent._parent.MC1.DynT1.maxscroll<=1)
…
_root.MC1.DynT1.scroll = percentScrolled*(_root.MC1.DynT1.maxscroll0.010000);
…
_root.MC1.DynT1.scroll = _root.MC1.DynT1.maxscroll;
…
_parent.MC1.DynT1.scroll = percentScrolled(_parent.MC1.DynT1.maxscroll*0.010000);
[/AS]
And by doing such change I have…
[AS]
if (_parent._parent.var1.var2.maxscroll<=1)
…
_root.var1.var2.scroll = percentScrolled*(_root.var1.var2.maxscroll0.010000);
…
_root.var1.var2.scroll = _root.var1.var2.maxscroll;
…
_parent.var1.var2.scroll = percentScrolled(_parent.var1.var2.maxscroll*0.010000);
[/AS]
Fine…it does not work… Why?
I guess it must be something really stupid. I’ve tried
var1=“MC1”;
var2=“DynT1”;
and
var1=MC1;
var2=DynT1;
and other changes without success.
Could anybody give a hand with this?
Thank you.