15 Replies Latest reply on Nov 12, 2006 12:10 AM by i6amokk

    Help me!

    i6amokk
      Ok here's the problem. I want to stop an action script process when i roll to diferent frame of the timeline.(when i roll to diferent frame the action script is still running) Is there some tag or something that does this? (i put stop(); but it doesn't work for the action script)
      I'm so sorry but i'm new in flash.
        • 1. Re: Help me!
          .:}x-=V!P=-x{:. Level 3
          what script is running give an example so we can tell you what to do. if its a onenterframe you can say with "this" being the target
          delete this.onEnterFrame;

          if its an interval

          clearInterval(intervalName);

          or function

          delete functionName;
          • 2. Re: Help me!
            i6amokk Level 1
            damn i'm such a noob! ok if i give you the address of the page and you see want's the problem then can you help me?
            • 3. Re: Help me!
              .:}x-=V!P=-x{:. Level 3
              no i need to know what code is running, give me an example.
              • 5. Re: Help me!
                .:}x-=V!P=-x{:. Level 3
                i went there but when i came back it wanted me to login cant see it
                • 6. Re: Help me!
                  i6amokk Level 1
                  ou so sorry! i locked it please try again.
                  • 7. Re: Help me!
                    i6amokk Level 1
                    Is there some hope? ;(
                    • 8. Re: Help me!
                      i6amokk Level 1
                      ou i forgot to tell that i actualy want to stop the action script in frame 15! not the other.
                      • 9. Re: Help me!
                        .:}x-=V!P=-x{:. Level 3
                        still locked
                        • 10. Re: Help me!
                          .:}x-=V!P=-x{:. Level 3
                          can you just copy it to here what you have?
                          • 11. Re: Help me!
                            i6amokk Level 1
                            frame 5:

                            b1.onRollOver = over;
                            b1.onRollOut = out;
                            b1.onPress = function() {
                            gotoAndPlay (5)
                            }

                            b2.onRollOver = over;
                            b2.onRollOut = out;
                            b2.ButtText.buttontext.text = "Галерия";
                            b2.onPress = function() {
                            gotoAndPlay (14)
                            }

                            b3.onRollOver = over;
                            b3.onRollOut = out;
                            b3.ButtText.buttontext.text = "Контакти";

                            b4.onRollOver = over;
                            b4.onRollOut = out;
                            b4.ButtText.buttontext.text = "Форум";
                            b4.onPress = function() {
                            getURL(" http://i6amokk.freehostia.com", "_blank");
                            };



                            b5.onRollOver = over;
                            b5.onRollOut = out;
                            b5.ButtText.buttontext.text = "Още от мен";

                            function over() {
                            this.gotoAndPlay (2)
                            }

                            function out() {
                            this.gotoAndPlay (7)
                            }
                            stop();

                            ======================================================

                            frame 15:

                            import mx.utils.Delegate;
                            import mx.transitions.Tween;
                            import mx.transitions.easing.*

                            var numOfItems:Number;
                            var radiusX:Number = 275;
                            var radiusY:Number = 55;
                            var centerX:Number = Stage.width/3.2;
                            var centerY:Number = Stage.height/1.7;
                            var speed:Number = 0.005;
                            var perspective:Number = 130;
                            var home = this;

                            theText._alpha = 0;

                            var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
                            tooltip._alpha = 0;

                            var xml:XML = new XML();
                            xml.ignoreWhite = true;
                            xml.onLoad= function (){
                            var nodes = this.firstChild.childNodes;
                            numOfItems = nodes.length;
                            for(i=0;i<numOfItems;i++){
                            var t = home.attachMovie("item","item"+i,i+1);
                            t.angle = i * ((Math.PI*2)/numOfItems);
                            t.onEnterFrame = mover;
                            t.toolText = nodes .attributes.tooltip;
                            t.content = nodes
                            .attributes.content;
                            t.icon.inner.loadMovie(nodes .attributes.image);
                            t.ref.inner.loadMovie(nodes
                            .attributes.image);
                            t.icon.onRollOver = over;
                            t.icon.onRollOut = out;
                            t.icon.onRelease = released;
                            }
                            }

                            function over(){
                            home.tooltip.tipText.text = this._parent.toolText;
                            home.tooltip._x = this._parent._x-32;
                            home.tooltip._y = this._parent._y - this._parent._height;
                            home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
                            home.tooltip._alpha = 100;
                            }
                            function out(){
                            delete home.tooltip.onEnterFrame ;
                            home.tooltip._alpha = 0;
                            }
                            function released(){
                            home.tooltip._alpha = 0;
                            for(i=0;i<numOfItems;i++){
                            var t:MovieClip = home["item"+i];
                            t.xpos = t._x;
                            t.ypos = t._y;
                            t.theScale = t._xscale;
                            delete t.icon.onRollOver;
                            delete t.icon.onRollOut;
                            delete t.icon.onRelease;
                            delete t.onEnterFrame;
                            if(t != this._parent){
                            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                            var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
                            }else{
                            var tw4:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
                            var tw5:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
                            var tw6:Tween = new Tween(t,"_x",Strong.easeOut,t._x,Stage.width/3,1,true);
                            var tw7:Tween = new Tween(t,"_y",Strong.easeOut,t._y,Stage.height/2,1,true);
                            var tw8:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);


                            theText.text = t.content;
                            var s:Object = this;
                            tw.onMotionStopped = function(){
                            s.onRelease = unreleased;
                            }
                            }
                            }
                            }

                            function unreleased(){
                            delete this.onRelease;
                            for(i=0;i<numOfItems;i++){
                            var t:MovieClip = home["item"+i];
                            if(t != this._parent){
                            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
                            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
                            var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
                            }else{
                            var tw4:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
                            var tw5:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
                            var tw6:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xpos,1,true);
                            var tw7:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.ypos,1,true);
                            var tw8:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
                            tw.onMotionStopped = function(){
                            for(i=0;i<numOfItems;i++){
                            var t:MovieClip = home["item"+i];
                            t.icon.onRollOver = Delegate.create(t.icon,over);
                            t.icon.onRollOut = Delegate.create(t.icon,out);
                            t.icon.onRelease = Delegate.create(t.icon,released);
                            t.onEnterFrame = mover;
                            }
                            }
                            }
                            }
                            }

                            function moveTip(){
                            home.tooltip._x = this._parent._x-32;
                            home.tooltip._y = this._parent._y - this._parent._height;
                            }


                            xml.load("icons.xml");


                            function mover(){
                            this._x = Math.cos(this.angle) * radiusX + centerX;
                            this._y = Math.sin(this.angle) * radiusY + centerY;
                            var s:Number = (this._y - perspective) / (centerY + radiusY - perspective);
                            this._xscale = this._yscale = s*100;
                            this.angle += this._parent.speed;
                            this.swapDepths(Math.round(this._xscale + 100));
                            }

                            _root.onMouseMove = function(){
                            speed = (this._xmouse - centerX)/10000;
                            }
                            ======================================================
                            to see how its acting go to http://breakndenter.freehostia.com/
                            => first click the second ant
                            =>then click the first ant and you will see how the pictures dont hide!
                            • 12. Re: Help me!
                              .:}x-=V!P=-x{:. Level 3
                              t is the movieclip name of the image wheel? use
                              removeMovieClip(t);
                              but it looks like something else needs to be done, when you click the 2nd ant again you get more problems, id disable the button once your in that section.
                              • 13. Re: Help me!
                                i6amokk Level 1
                                ok men i understand you but it doesn't work for me. if somehow i put an instant name on this image wheel i think i can control it later (its not "t"). do you have some sugestions on this?
                                • 14. Re: Help me!
                                  .:}x-=V!P=-x{:. Level 3
                                  ya give it an instance name then on the frame you dont want it use

                                  instanceName._visible = false; // to disable it and hide it
                                  removeMovieClip(instanceName); // to remove it
                                  • 15. Re: Help me!
                                    i6amokk Level 1
                                    Man I can't tell you how much I respect you for your help! I made some progress about the gallery but theres still long time to go till i upload it :P Thanks again BIG RESPECT!