Jump to content


  • Posts

  • Joined

  • Last visited

ryanhungate's Achievements



  1. (I was using nested TimelineMax's because I had found that they were getting overwritten while iterating through the array, so I tried to assign it to beat the problem but it didnt work. The trouble I am running into seems to be that when the users (mine during testing) mouse movement is too fast, Tweens dont end up where they need to be, on mouseOut... If I wait for the tween to finish, it works, but its like they do not make it back to the 0 playhead of the tween if the mouse out is too fast.) well, putting a simple fla together would be a bit tricky at this point, since the project is getting pretty big and reliant on font loading and 8 other classes... but I am working with the Gaia site xml to start... and I am making a 3 level menu system based on that structure by adding a parameter called 'submenu_of' inside of the tag... so If I have my code will optionally create a 3 level menu system that puts (title) inside the (level 1 = just, level 2 = because, active button = bla) based on what is in those tags... so that is why you are seeing the weird array in my button code. About the nested stuff, to be honest, I just recently changed that after trying to get a better fluid movement and the ability to add a pause(); to the menu system by using TimelineMax. I am storing a bunch of variables inside the data property because I am writing up a cool menu that tweens out, and glows, and drops down, so storing color data, and original size data is a must... so I figured why not store the TweenMax into the data property as well? I am not adding the submenu as a child to each each button, I am keeping everything separate. Ill re write what I have done to place all the TimeLineMax code into the buttonOver functions again and re post the results, but this has been a trial and error for me, was kind of hoping that you would just "know" what the problem was Ryan
  2. Hey GS... I am getting some weird behavior when creating array's of TimelineMax... I am iterating through a loop where I am defining main menu items, and submenu items... submenu holders etc... way too much code to bother you with, but the problem is, it seems like my TimelineMax instances are getting overwritten. I am using a container TimelineMax to do the work. Inside my for loop, this is where I am assigning the TimelineMax instance to a data property of my button class... var sub:Object = new Object(); sub = MASTER[i]['BUTTON_SET'][0]['L1_HOLDER']; MASTER[i]['MAIN_BUTTON'].data.submenu_ref = sub; MASTER[i]['MAIN_BUTTON'].addEventListener(buttonEvent.BUTTON_CLICK, handleDown); MASTER[i]['MAIN_BUTTON'].addEventListener(buttonEvent.BUTTON_OVER, handleOverLevelOne); MASTER[i]['MAIN_BUTTON'].addEventListener(buttonEvent.BUTTON_OUT, handleOutLevelOne); var ro1:Object = returnLevelOneObject(MASTER[i]['MAIN_BUTTON']); MASTER[i]['MAIN_BUTTON'].data.TEXT_TINT = ro1.TEXT_TINT; MASTER[i]['MAIN_BUTTON'].data.TEXT_TINT_ALPHA = ro1.TEXT_TINT_ALPHA; MASTER[i]['MAIN_BUTTON'].data.OVER_BLUR = ro1.OVER_BLUR; MASTER[i]['MAIN_BUTTON'].data.BG_TINT = ro1.BG_TINT; MASTER[i]['MAIN_BUTTON'].data.BG_TINT_ALPHA = ro1.BG_TINT_ALPHA; MASTER[i]['MAIN_BUTTON'].data.TWEEN_WIDTH = ro1.TWEEN_WIDTH; var MTL:TimelineMax = new TimelineMax({paused:true}); var MASTER_TL:TimelineMax; MTL.append(TweenMax.to(MASTER[i]['MAIN_BUTTON'].button_bg, .25,{alpha:1, width:ro1.TWEEN_WIDTH + ro1.OVER_BLUR,blurFilter:{blurX:ro1.OVER_BLUR,blurY:ro1.OVER_BLUR},colorTransform:{tint:ro1.BG_TINT, tintAmount:ro1.BG_TINT_ALPHA}})); MTL.append(TweenMax.to(MASTER[i]['MAIN_BUTTON'].text_holder, .25,{alpha:1,colorTransform:{tint:ro1.TEXT_TINT, tintAmount:ro1.TEXT_TINT_ALPHA}}) ); MTL.append(TweenMax.to(sub.submenu_holder,.25,{alpha:1, onStart:function() { sub.submenu_holder.visible = true; ////// a bunch of code in this function, pointless to show } /// of course timelines is an array defined in the class file. timelines.push({MASTER:MASTER_TL,MAIN:MTL}); ok, so when I hit my button over function private function handleOverLevelOne(e:buttonEvent):void { if(e.currentTarget != cb) { cb = e.currentTarget; if (e.data.timeline['MASTER'] != null) { e.data.timeline['MASTER'].kill(); } var o:Object = e.data.submenu_ref; mmh.expandMaskWidth(500); mmh.removeEventListener('out',resetTheMenuPosition); TweenMax.delayedCall(.25,preCheck); function preCheck():void { if(e.data.over_button) { if(mmh.needs_scroller) { mmh.expandMaskWidth(500); mmh.scroller.killTween(); } sm.setActiveLevelOneButton(e.currentTarget); e.data.timeline['MASTER'] = new TimelineMax(); e.data.timeline['MASTER'].append( e.data.timeline['MAIN'].tweenTo( e.data.timeline['MAIN'].duration ) ); } } } } but the funny thing is the submenu that shows up is the last ( sub ) object that I created... like it is getting overwritten on every loop. Do you have any ideas why this would happen? Thanks. Ryan
  3. Just in case you haven't seen this post yet, I did want to mention that what seems to be causing the problem, is when using a scrolling text area... so I have tried to combat the problem by doing something like this: initApp()... sizeMyContentHolders()... THEN load the text and create my scroll area calculations through a function like: function addText():void { _area._txt.text = "A VERY LONG PARAGRAPH......"; _area._txt.height = _area._txt.textHeight; ///...scroll calculations here based on the height... } function removeText():void { _area._txt.text = ""; //nothing _area._txt.height = _area._txt.textHeight; } ///for resizing listeners... I will do something like this: function resizeMe(event:Event):void { if(_area._txt.textHeight > _area.height) { removeText(); } ///then do my resizing math here... addText(); } It has allowed me to resize the content holders fairly well, but it is killing me to know that we have to do weird stuff like that to make a proper resize work... I would assume that you can also do a while(mc.numChildren >=1){mc.parent.removeChild(mc)}; THEN run the resize function THEN add the children back... obviously using an array of mc's... UGH.
  4. Got it... well, seems that it is still not exactly doing what it is supposed to do... Is there any way you could send a really basic .fla that does this? By the way, I appreciate what you are doing... it means a lot. This damn resize thing is driving me nuts!
  5. Hey there... First I wantd to say thanks for getting back to me so quick I didn't even realize that you responded! I was sitting around waiting for a notification email or something before checking the forum again. So, in regard to the autoFit stuff... cant get it to work but yet I only just tried messing around about 10 minutes ago. For some reason, I am not getting any result from the code, nor am I tracing the event.CHANGE function... Am I missing something? var ls:LiquidStage = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, stage.stageWidth/2, stage.stageHeight /2); var area:AutoFitArea = new AutoFitArea(this, 0, 0, stage.stageWidth, stage.stageHeight, 0xCC0000); area.attach(site); area.preview = false; var area:AutoFitArea = AutoFitArea.createAround(bg_mc); area.addEventListener(Event.CHANGE, onAreaUpdate); function onAreaUpdate(event:Event):void { trace("updated AutoFitArea"); }
  6. Hey there... (I am a club member) I have not used the liquid stage or the club greensock classes for long... but I have had a ton of trouble with resizing the stage while using masked content which is not viewable to the user... or the stage... The basics of what I am having trouble with seem to fall under this rule: I have a holder movieclip on the stage... I am loading dynamic movieclips from a for loop inside the holder... usually from a DB. It could be either horizontal, or vertical... doing a ( _MCY += mc.y + mc.height +10 ) I am using a mask to hide the clips outside the desired area... When I resize the stage, my proportional resizing is all screwy... meaning instead of resizing only the "mask" area, the flashplayer will base the resize height and width WITH the unviewable masked content as well. That makes the movieclip so small it cant be seen. Do you have any clue how to fix this? I generally can not use points, because there are so many things on the stage at once. Thanks a bunch!!! Ryan