It's got to be simple, but eludes...

This is a discussion on "It's got to be simple, but eludes..." within the Flash & Multimedia Forum section. This forum, and the thread "It's got to be simple, but eludes... are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 6th, 2007, 20:10
New Member
Join Date: Feb 2007
Location: Vermont
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
It's got to be simple, but eludes...

I have a series of movieClip buttons. Only one of them can be in the "down" state at a time. What I want is for "but1" to start off in the "down" state when the movie loads, and then follow my other script that switches it to the "up" state when another button in the series is hit.

Here is my fla file
http://www.dougbarba.com/ftp/timeline3.zip

Here's what's not working. My onEnterframe code dominates the rest of the script. It is always "up".

Code: Select all
controller_mc.but1.onEnterframe = function() {
        this.gotoAndStop("down");
};
//but1,2,3,4,5,6,7,8, all here
for (var i = 1; i<=8; i++) {
        controller_mc["but"+i].i = i;
        controller_mc["but"+i].onRollOver = function() {
                this.frameHold = this._currentframe;
                this.gotoAndStop("over");
        };
        controller_mc["but"+i].onRollOut = function() {
                this.gotoAndStop(this.frameHold);
        };
        controller_mc["but"+i].onRelease = function() {
                butRelease(this);
        };
}
function butRelease(obj) {
        this = obj;
        arrayIndex = this.i-1;
        for (var mc in this._parent) {
                var thisHold = this;
                if ((this._parent[mc] == thisHold) && (this._parent[mc]._name.indexOf("but") != -1)) {
                        this._parent[mc].gotoAndStop("down");
                } else {
                        this._parent[mc].gotoAndStop("up");
                }
        }
        this.frameHold = this._currentframe;
}
Reply With Quote

Reply

Tags
buttons, intro, movieclip, switch

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Just some simple css help! Please?? lefty Starting Out 9 Apr 28th, 2008 10:19
Very Simple Cms christopher Website Planning 3 Apr 26th, 2008 17:19
Something really simple delusion Web Page Design 10 Jul 4th, 2007 17:59
Just want simple Background Song (.mp3) and a simple start/stop. BlackReef Flash & Multimedia Forum 4 Jun 28th, 2007 07:04
simple GET moiseszaragoza JavaScript Forum 4 Mar 23rd, 2007 23:35


All times are GMT. The time now is 01:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43