Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-13-2005, 09:13 PM   #1
spike101
Senior Member
 
Join Date: Jul 2004
Posts: 115
Default 3D rotating menu question...

I was trying to make a menu with about 6 or 7 buttons that would be text and they would slowly move around in circular paths. I would have two circle paths so that 4 buttons could move around in a circle on the top circle and then 3 on the bottom circle. Then I could make them go at different speeds so make it seem a little more random. They would stop rotating when the mouse rolled over one of the buttons.
I was also going to try to make it seem 3D by getting the buttons to be big when the come to the front of the screen, but then get smaller as they go to the back.
I've put a screenshot of what I'm talking about and I have a .fla file, but I think I'm going to start over because it wasn't very good.

Any tutorial for this sort of idea?
Attached Files
File Type: zip menu.zip (5.1 KB, 381 views)
spike101 is offline   Reply With Quote
Old 03-13-2005, 10:02 PM   #2
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

here something to play whit

PHP Code:
//a button needs to by in the library !!!
import mx.controls.Button;
BTN = [{label:"Made"}, {label:"BY"}, {label:"Xeef"}, {label:"From"}, {label:"As.Org"}];
for (var 
a in BTN) {
    
O1 _root.createEmptyMovieClip("B"+a_root.getNextHighestDepth());
    
O2 O1.createClassObject(Button"B"1, {label:BTN[a].label});
    
O2.Deg 360-(360/BTN.length)*a;
    
O2.Size 150;
    
O1.onEnterFrame = function() {
        if (!
_global.StopM) {
            
this.200+350*Math.sin(this.B.Deg*Math.PI/180);
            
this.100+150*Math.cos(this.B.Deg*Math.PI/180);
            
this.B.Deg += 2;
            
this.B.Deg %= 360;
            if (
this.B.Deg>180) {
                
this.B.Size += 1;
            }
            if (
this.B.Deg<180) {
                
this.B.Size -= 1;
            }
            if (
this.B.Size<50) {
                
this.B.Size 50;
            }
            if (
this.B.Size>150) {
                
this.B.Size 150;
            }
            
this.B.setSize(this.B.Sizethis.B.Size/2);
            
this._x this.x;
            
this._y this.y;
        }
    };
    
O1.onRollOver = function() {
        
_global.StopM 1;
    };
    
O1.onRollOut = function() {
        
_global.StopM 0;
    };

__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-14-2005, 01:44 AM   #3
spike101
Senior Member
 
Join Date: Jul 2004
Posts: 115
Default

yeah, that's basically what I was talking about.
I was playing around with it and I couldn't really adjust the speed though. I can see how to adjust the size of the circle that the buttons rotate along and how big and small they get, but what if I wanted to use my own buttons and have them rotate more slowly?
Can I take out the "import mx.controls.Button;" and then use my own?
and then how can I adjust the speed that the buttons rotate?
spike101 is offline   Reply With Quote
Old 03-14-2005, 02:58 AM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Looks like you've got play with this line to change the speed...
ActionScript Code:
this.B.Deg += 2;
If you want to use your own button, you can ditch this line...
ActionScript Code:
O2 = O1.createClassObject(Button, "B", 1, {label:BTN[a].label});
and use attachMovie() function to attach your own button from the library...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 03-14-2005, 01:56 PM   #5
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

yeh as CB say
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 03-14-2005, 05:50 PM   #6
spike101
Senior Member
 
Join Date: Jul 2004
Posts: 115
Default

thanks a lot guys
spike101 is offline   Reply With Quote
Old 03-14-2005, 06:13 PM   #7
spike101
Senior Member
 
Join Date: Jul 2004
Posts: 115
Default

sorry...
I put in the attachMovie() but I couldn't get it to load the button I made. I have a .jpg in the library and I put that into a MC and then tried to load it as a replacement for the components button.
spike101 is offline   Reply With Quote
Old 03-15-2005, 12:33 AM   #8
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

You might want to make sure you know which function you are going to use...
attachMovie() goes with attaching a movieClip that is already defined in the library and loadMovie() goes with loading an external file... Check your Flash manual for that...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 03-15-2005, 12:46 AM   #9
spike101
Senior Member
 
Join Date: Jul 2004
Posts: 115
Default

I know which function I'm going to use....I just can't seem to make it work.
I have a MC in the library with the graphic, which will be used as a button, in it.
Then I was trying to use the attachMovie function to bring it to the stage but it doesn't seem to work.
spike101 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:49 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.