Jump to content
Search Community

Dzsurnik

Members
  • Posts

    6
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Serbia

Dzsurnik's Achievements

0

Reputation

  1. o yeee, at first sign, this is what I need , thanks Yes, this is perfect!!! Thanks carl schooff, this is what I need
  2. Please help me The task: I want to make a menu, when I move the mouse over the button, change the button color, say blue, but if I move the mouse down from the button it will come back the original color and if I click the button itt will be yellow. And this yellow color will be active until another button is not clicked. And when clicked the second button it removes the first button yellow color. I hope it can understand what I want Here is a little picture explanation: Here is my code: stop(); import com.greensock.*; import com.greensock.easing.*; var switcher:Boolean=false; var array_button:Array=["mc_button1","mc_button2"]; var selected_button=null; var array_container=null; trace(array_button); trace(array_container); //BUTTON 1 mc_button1.addEventListener(MouseEvent.MOUSE_DOWN , mc_button1_mouse_down); function mc_button1_mouse_down(evt:MouseEvent):void { if (switcher==true&&selected_button!=0) { array_container.name = array_button[selected_button]; trace("array container: ",array_container); TweenMax.to(array_container, 1, {colorMatrixFilter:{colorize:0x000000, amount:1}}); trace("a 2.button fekete lett"); } else { TweenMax.to(mc_button1, 1, {colorMatrixFilter:{colorize:0xff0000, amount:1}}); switcher=true; trace("Mouse down rakkatintottam"); selected_button=0; trace("Kivalasztott button szama: ",selected_button, "igy a tomb: ", array_button[selected_button]); } } mc_button1.addEventListener(MouseEvent.MOUSE_OVER , mc_button1_mouse_up); function mc_button1_mouse_up(evt:MouseEvent):void { if (switcher==true) { trace("Mar ra lett kattintva a", array_button[selected_button],"gombra"); //TweenMax.to(mc_button1, 1, {colorMatrixFilter:{colorize:0xFF65FF, amount:1}}); } else { TweenMax.to(mc_button1, 1, {colorMatrixFilter:{colorize:0xFF65FF, amount:1}}); trace("Mouse over"); } } mc_button1.addEventListener(MouseEvent.MOUSE_OUT , mc_button1_mouse_out); function mc_button1_mouse_out(evt:MouseEvent):void { if (switcher==true) { //TweenMax.to(mc_button1, 1, {colorMatrixFilter:{colorize:0x00FF00, amount:1}}); trace("Mar ra lett kattintva a", array_button[selected_button],"gombra"); } else { TweenMax.to(mc_button1, 1, {colorMatrixFilter:{colorize:0x00FF00, amount:1}}); trace("Mouse out"); } } //BUTTON 2 mc_button2.addEventListener(MouseEvent.MOUSE_DOWN , mc_button2_mouse_down); function mc_button2_mouse_down(evt:MouseEvent):void { TweenMax.to(mc_button2, 1, {colorMatrixFilter:{colorize:0xff0000, amount:1}}); switcher=true; trace("Mouse down rakkatintottam"); selected_button=1; trace("Kivalasztott button szama: ",selected_button, "igy a tomb: ", array_button[selected_button]); } mc_button2.addEventListener(MouseEvent.MOUSE_OVER , mc_button2_mouse_up); function mc_button2_mouse_up(evt:MouseEvent):void { if (switcher==true) { //TweenMax.to(mc_button2, 1, {colorMatrixFilter:{colorize:0xFF65FF, amount:1}}); trace("Mar ra lett kattintva a", array_button[selected_button],"gombra"); } else { TweenMax.to(mc_button2, 1, {colorMatrixFilter:{colorize:0xFF65FF, amount:1}}); trace("Mouse over"); } } mc_button2.addEventListener(MouseEvent.MOUSE_OUT , mc_button2_mouse_out); function mc_button2_mouse_out(evt:MouseEvent):void { if (switcher==true) { //TweenMax.to(mc_button2, 1, {colorMatrixFilter:{colorize:0x00FF00, amount:1}}); trace("Mar ra lett kattintva a", array_button[selected_button],"gombra"); } else { TweenMax.to(mc_button2, 1, {colorMatrixFilter:{colorize:0x00FF00, amount:1}}); trace("Mouse out"); } } and I attached the fla Please any Help would be great thanks
  3. Yes, I know that. For that wrote I for title: Strange problem! Because all of the movieclip and buttons in the action script was there on the stage
  4. I realized the mistake, for some reason I can't use TweenLite on buttons, but why?
  5. Hello! I have a strange problem and I do not at all resolved. The code is very simple. When you test the flash movie, there is no error, everything is working normally, but when I test it in the browser in offline mode, the following error came to me: TypeError: Error #1009: Cannot access a property or method of a null object reference. at _17_fla::MainTimeline/frame2() and when I hit continue...: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TweenLite/init() at com.greensock::TweenLite/renderTime() at com.greensock.core::SimpleTimeline/renderTime() at com.greensock::TweenLite$/updateAll() my code is here: stop(); import com.greensock.*; import com.greensock.easing.*; TweenLite.to(mc_logo, 1, {x:193.80, y:76.1, ease:Back.easeOut}); TweenLite.to(mc_label, 1, {x:666.5, y:163.05, ease:Back.easeOut}); TweenLite.to(mc_im_csaba, 2, {x:289.15, y:248.30, ease:Back.easeOut}); TweenLite.to(mc_since, 2, {x:400, y:425.85, ease:Back.easeOut}); TweenLite.to(mc_bal_also_linkek, 1, {x:208, y:979.10, ease:Back.easeOut}); TweenLite.to(mc_jobb_also_linkek, 1, {x:724.85, y:979.10, ease:Back.easeOut}); TweenLite.to(mc_images, 2, {x:21, y:795.25, ease:Back.easeOut}); TweenLite.to(mc_flash, 2, {x:21, y:610.2, ease:Back.easeOut}); TweenLite.to(mc_arrow, 2, {x:64.25, y:795.25}); var gyorsasag = 1;//tartalom sebessege //-------------------------------------------------------- //LOGO BUTTON //-------------------------------------------------------- mc_logo.addEventListener(MouseEvent.CLICK, logo_click); // if you want a hand cursor mc_logo.buttonMode = true; mc_logo.useHandCursor = true; function logo_click(e:MouseEvent) { var url_logo:String = "my URL"; var request:URLRequest = new URLRequest(url_logo); navigateToURL(request, '_blank'); } //-------------------------------------------------------- //FLASH BUTTON //-------------------------------------------------------- mc_flash.addEventListener(MouseEvent.ROLL_OVER, flash_over); mc_flash.addEventListener(MouseEvent.ROLL_OUT, flash_rollout); mc_flash.addEventListener(MouseEvent.CLICK, flash_click); mc_flash.addEventListener(MouseEvent.MOUSE_DOWN, flash_down); mc_flash.addEventListener(MouseEvent.MOUSE_UP, flash_up); function flash_over(e:MouseEvent) { trace("Over"); } function flash_rollout(e:MouseEvent) { trace("Out"); } function flash_click(e:MouseEvent) { TweenLite.to(mc_slideshows, gyorsasag, {x:-439.5, y:747.5, ease:Back.easeOut}); TweenLite.to(mc_arrow, gyorsasag, {x:64.25, y:610.2, ease:Back.easeOut}); } function flash_down(e:MouseEvent) { trace("Press"); } function flash_up(e:MouseEvent) { trace("Release"); } //-------------------------------------------------------- //IMAGES BUTTON //-------------------------------------------------------- mc_images.addEventListener(MouseEvent.ROLL_OVER, images_over); mc_images.addEventListener(MouseEvent.ROLL_OUT, images_rollout); mc_images.addEventListener(MouseEvent.CLICK, images_click); mc_images.addEventListener(MouseEvent.MOUSE_DOWN, images_down); mc_images.addEventListener(MouseEvent.MOUSE_UP, images_up); function images_over(e:MouseEvent) { trace("Over"); } function images_rollout(e:MouseEvent) { trace("Out"); } function images_click(e:MouseEvent) { TweenLite.to(mc_slideshows, gyorsasag, {x:400, y:747.5, ease:Back.easeOut}); TweenLite.to(mc_arrow, gyorsasag, {x:64.25, y:795.25, ease:Back.easeOut}); } function images_down(e:MouseEvent) { trace("Press"); } function images_up(e:MouseEvent) { trace("Release"); } //----------------------- // BUTTON DEVIANTART //----------------------- bt_deviantart.addEventListener(MouseEvent.CLICK, bt_deviantart_click); function bt_deviantart_click(e:MouseEvent) { var url_deviantart:String = "my URL"; var request:URLRequest = new URLRequest(url_deviantart); navigateToURL(request, '_blank'); } //----------------------- // BUTTON FACEBOOK //----------------------- bt_facebook.addEventListener(MouseEvent.CLICK, bt_facebook_click); function bt_facebook_click(e:MouseEvent) { var url_facebook:String = "my URL"; var request:URLRequest = new URLRequest(url_facebook); navigateToURL(request, '_blank'); }//----------------------- // BUTTON 99designs //----------------------- bt_99designs.addEventListener(MouseEvent.CLICK, bt_99designs_click); function bt_99designs_click(e:MouseEvent) { var url_99designs:String = "my URL"; var request:URLRequest = new URLRequest(url_99designs); navigateToURL(request, '_blank'); } //----------------------- // BUTTON Email //----------------------- bt_email.addEventListener(MouseEvent.CLICK, mailto); function mailto(event:MouseEvent):void { var email:URLRequest = new URLRequest("mailto:my mail"); navigateToURL(email, '_blank'); } Many thanks for any help!
×
×
  • Create New...