Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Rotating Menu ...continued

New Here ,
Jul 23, 2009 Jul 23, 2009

hi all

still progressing with the rotating menu, I am trying change the values so that I can position correctly but I can't seem to tweak it?

as the menu rotates the other images resize and get smaller, I think its somewhere within the script that is doing this, I would like it not to resize as it rotates away from center.

but I can't seem to find what is making it do this?

is this making any sense, i have been changing these values, but not quite working;


values I have been looking at on the circleMenu.as at line 38

[CODE]

private var _activeItemScale:                    Number                = 0.7;  
        private var _minVisibleScale:                    Number                = -2.9;
        private var _minVisibleAlpha:                    Number                = 0.5;


this changes the sizes of images but does not effect resize as it rotates?

and this at line 155


[CODE]

public function get visibleItems():int
        {
            return _visibleItems;
        }
       
        public function set visibleItems( value:int ):void
        {
            if ( value < 2 ) value = 2;
            if ( value / 2 is int ) value += 1;
           
            _visibleItems = value;
            _maxOffset = Math.round( value / 2 );
            positionItems();
        }


and line 383

private function positionItems():void
        {
            if ( numChildren == 0 ) return;
           
            var maxAngle:Number = _maxOffset * _angleSpacing;
           
            var item:Sprite;
            var hideItem:Boolean;
            var angle:Number;
            var offset:int;
           
            var tX:Number;
            var tY:Number;
            var tS:Number;
            var tR:Number;
            var tA:Number;

            for (var i:int = 0; i < numChildren; i++)
            {
                offset = (i + 1) - _currentIndex;
                angle = limit(offset * _angleSpacing, -180, 180) * toRADIANS;
                hideItem = Math.abs( offset ) >= _maxOffset;
               
                item = super.getChildAt(i) as Sprite;
                item.mouseChildren = !hideItem;

                tX = _innerRadius * Math.cos( angle );
                tY = _innerRadius * Math.sin( angle );
                tS = offset == 0 ? activeItemScale : 1 - ( Math.abs(offset / (_maxOffset - 1)) * ( 1 - minVisibleScale ) );
                tR = angle * toDEGREES;
                tA = hideItem ? 0 : 1 - ( Math.abs(offset / (_maxOffset - 1)) * ( 1 - minVisibleAlpha ) );
               
                if ( tS < 0 ) tS = 0;
               
                TweenLite.to( item, 0.5, { x:tX, y:tY, rotation:tR, scaleX:tS, scaleY:tS, alpha:tA, ease:Expo.easeOut } );
            }
        }


I have been trying to change the values with the as files but I cannot seem to get the menu how I want it regarding size and space of images, everytime I change a value it makes another part of the menu images to resize???

would anyone beable to help with any suggestions as to which are the correct values to change within the main.as and/or circleMenu.as

if you like you can download the files from the links below, I have attached a jpg layout of what I am trying to get it looking like

cs4
http://art.clubworldgroup.com/rotate_menu_cs4.zip

cs3
http://art.clubworldgroup.com/rotate_menu_cs3.zip


I have also attached a folder containing just the as files

main.as & circleMenu.as

many thanks for any help

TOPICS
ActionScript
4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 30, 2009 Jul 30, 2009

hi there

would anyone be able to help me solve my animated button problem?

I will explain what I have;

I have created an animated button, that when rollover it triggers an 'over' anim and when roll out again triggers an 'out' anim, this works great on its own!

but;

the root problem;
when I try to apply this button to my rotating menu the button appears but the actual animation when rollover does not happen......what am I missing???

I CAN'T SEEM TO GET THE SCRIPT WORKING FOR BOTH, ADDING BUTTON TO MENU AND THEN THE ACTIONSCRIPT FOR THE BUTTON.


would some explain to me what I am doing wrong,

I thought it would be easier just to attach files rather than paste sections of my script as it could get confusing, I hope this makes things clearer for people to see exactly what I have done.

I have commented the place where the button script and addchild script are.


link:
http://art.clubworldgroup.com/rotating_menu_30_July.zip


thank you for your help, a very heavy head:confused:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 30, 2009 Jul 30, 2009

would people prefer it if I paste the code so you don't need to download?

these are the two areas I can not get working, its probably something really simple, maybe I am getting the labeling mixed up?

for the button

button_mc.addEventListener(MouseEvent.ROLL_OVER, onRoll);
button_mc.addEventListener(MouseEvent.ROLL_OUT, onRollout);
button_mc.stop();
           
function onRoll(event:MouseEvent):void
            {        
//if(event.target.currentLabel == "over_btn")
//{
event.target.gotoAndPlay(1);
//}
}
           
unction onRollout(event:MouseEvent):void
{
//if(event.target.currentLabel == "rollout_btn")
//{
event.target.gotoAndPlay(6);
//}
}
           
button_mc.buttonMode = true;

to attach to menu


var button_mc:Btn1_mc = new Btn1_mc();
holder.addChild(button_mc);
               
button_mc.width = 230;  // changes size of anim movieclip object
button_mc.height = 230;
   
button_mc.x = -84;  // where to have the tooltip on x axis in the holder
button_mc.y = -30;

is this better for explaining?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2009 Aug 03, 2009

would some one please help me with this, I have been pulling my hair out now for  over a week and I just can't get it working.....I am sure it's really simple if  you know how

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2009 Aug 03, 2009

is here a way that I can do an animated rollover button without the AS3 script?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2009 Aug 04, 2009
LATEST

Still working with the menu, I have all working now but one final thing I am trying to do, if anyone has any solutions to this problem I would be very grateful of your input!

what I have;
The menu rotating and stoping at the point of the last and first image.

root problem(what trying to do)
to make a complete 360 continues loop of menu.


you can download what I have so far here for a better explaination
http://art.clubworldgroup.com/rotatingmenu_4.zip

the script for the menu is in the file circleMenu.as


any help or ideas I would be very grateful


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines