Results 1 to 10 of 10

Thread: Scroller Not Working

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Scroller Not Working

    I have been using a great scroller but for some reason if I use more than one on the stage the others become disabled... Any Ideas? File is attached for those interested...

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Can't look at the file as I am at work, but make sure you give each an instance name, a different instance name, and run your code for each.

    If you have 3 MCs on stage and all are called "box" and you have one code that tells "box" what to do, it will only work on the highest level "box"

    But if you name them box1, and box2, etc then adjust your code accordingly it should be all dasies and sunshine
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD
    Can't look at the file as I am at work, but make sure you give each an instance name, a different instance name, and run your code for each.

    If you have 3 MCs on stage and all are called "box" and you have one code that tells "box" what to do, it will only work on the highest level "box"

    But if you name them box1, and box2, etc then adjust your code accordingly it should be all dasies and sunshine
    Yea it's really wierd... I've tried all that and even duplicated the entire mc so it was totally independent of the others... I'm guessing it's the code... Probaby simple but not sure... Could it be something to do with _parent?

    Code:
    fscommand("allowscale", "false");
    bar.useHandCursor = dragger.useHandCursor=false;
    space = 20;
    friction = 0.9;
    speed = 4;
    y = dragger._y;
    top = main._y;
    bottom = main._y+mask_mc._height-main._height-space;
    dragger.onPress = function() {
    	drag = true;
    	this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
    	dragger.scrollEase();
    };
    dragger.onMouseUp = function() {
    	this.stopDrag();
    	drag = false;
    };
    bar.onPress = function() {
    	drag = true;
    	if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
    		this._parent.dragger._y = this._parent._ymouse;
    		this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
    	} else {
    		this._parent.dragger._y = this._parent._ymouse;
    	}
    	dragger.scrollEase();
    };
    bar.onMouseUp = function() {
    	drag = false;
    };
    moveDragger = function (d) {
    	if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
    		clearInterval(myInterval);
    	} else {
    		dragger._y += d;
    		dragger.scrollEase();
    		updateAfterEvent();
    	}
    };
    up_btn.onPress = function() {
    	myInterval = setInterval(moveDragger, 18, -1);
    };
    down_btn.onPress = function() {
    	myInterval = setInterval(moveDragger, 18, 1);
    };
    up_btn.onMouseUp = down_btn.onMouseUp=function () {
    	clearInterval(myInterval);
    };
    MovieClip.prototype.scrollEase = function() {
    	this.onEnterFrame = function() {
    		if (Math.abs(dy) == 0 && drag == false) {
    			delete this.onEnterFrame;
    		}
    		r = (this._y-y)/(bar._height-this._height);
    		dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
    		main._y += dy;
    	};
    };
    Actually is it to do with 'prototype', what the hell is prototype? :\

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Uggg, that code is scary. Let me get home and I will run it through a code exploder. You are running version 8 correct?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD
    Uggg, that code is scary. Let me get home and I will run it through a code exploder. You are running version 8 correct?
    Yea that's right... Yea it's scary... It works well though when it runs

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    No offense ment, as I am not being much help as of late, but...

    what did you do to piss off everyone at FK? None of your posts have been answered, LOL

    Granted I am only one man and your Flash experience is starting to delve into the unknown for me as well, but I am trying to help you out, but FK is pretty good about answering posts unless you do something they don't like
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD
    No offense ment, as I am not being much help as of late, but...

    what did you do to piss off everyone at FK? None of your posts have been answered, LOL

    Granted I am only one man and your Flash experience is starting to delve into the unknown for me as well, but I am trying to help you out, but FK is pretty good about answering posts unless you do something they don't like
    haha none taken... i agree! a few years back there were lots of replies, i'm thinking it's the same for eveyone?? or atleast that's what i tell myself so i can sleep at night

    did you have any luck with that code?

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Actually no I didn't get a chance, got a cold that knocked me out most of the morning and then I had football meetings for the coaches and tomorrow/later today I have work meetings and more coaches crap. I am trying to get to it, promise!
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Too much to do too little time!

    Whenever you get a chance is great! I'm hopeful you'll be able to work this crazy code out!

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Would it be at all possible for you to zip and send everything you have that you are working on? it might take me a bit longer, as I would probably rewrite most of the code to get everything to work, but seeing it in pieces isn't helping.

    If that is a problem I understand and will do what I can with this anyway.


    If you like you can PM me the link so its not out there for everyone, just an option.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •