3 Replies Latest reply on Oct 4, 2007 9:25 PM by kglad

    LoadMovie and relation in code

      Here's my problem: i got a main SWF playing. At the end, another swf is loaded inside an MC named dropZone with "loadMovie" actionscript.
      but inside my second swf, i got a dynamic textbox called content_TXT in an MC named texteMC who load a html file, and a custom scrollbar called slider.
      If I do CTRL+ENTER to test the movie itself, work fine, everything is scrolling right. but if i put all thing on web server, the scrollbar is no more scrolling the dynamic text. here's some code:

      texteMC actionscript
      onClipEvent (enterFrame){
      _parent.texteMC.content_TXT.scroll = _root.slider.b;

      slider actionscript
      onClipEvent (load){
      setProperty (this, _x, int(_x));
      onClipEvent (enterFrame){
      a = new Object();
      a.y = this._y;
      a.x = this._x;
      b = int(a.y/(100/_parent.texteMC.content_TXT.maxscroll));

      IF anyone can help to solve this scrolling problem, that's gonna be great. I'm sure this is a question of _root or _parent somewhere but can't put the finger on it....
        • 1. Re: LoadMovie and relation in code
          kglad Adobe Community Professional & MVP
          from your description it's more likely you're trying to use something before it's defined.
          • 2. LoadMovie and relation in code
            Raskriall Level 1
            well if you look the way i posted the code, it seem to, but no, i'm not trying to use an undefined object since it work perfectly when i'm playing the movie alone. but when this movie is being load into a MC, the association between the scroller and the dynamic text is being broken. i tried to work arround the problem with _lockroot = true, but it didn't fix it. I,ve tried also to work "this" instead of _root or _parent, and it's not recognize...

            i beginning to believe the problem is so simple that it's blinding me from the solution, hehe. someone help me to see through this.

            and P.S --> sorry for my english verbs time, this is not my native language, hehe.
            • 3. Re: LoadMovie and relation in code
              kglad Adobe Community Professional & MVP
              is that custom scrollbar a flash component? if so, drag one onto the stage of your main swf and then delete it (but leave the component in your main swf's library). retest.