Actionscript help

  • coolguythampy
  • Born
  • Born
  • coolguythampy
  • Posts: 1

Post 3+ Months Ago

I have a problem. Below is the code of action script i got. It is like a circular clip. When we move the pointer towards screen ends the files start to rotate and do so in the intended nice manner. However the problem is how to make a lick work.

I want to know what modifications to do in order to make the thumbnails clickable. I must also be able to define the path. Please help. I am a newbie in this

Code: [ Select ]
/ Code Credit: Lee Brimelow
// Tutorial Reference URL: http://www.gotoandlearn.com
// Modified by http://www.flashmo.com

stop();

// total is length of label_list OR link_list
// OR total frames inside "flashmo thumbnails"
var total:Number = 12;
// length of label_list array and length of link_list array must be equal
// to length of frames inside "flashmo thumbnails" movieclip

var label_list:Array = new Array( "041_horizontal_scroller", "042_vertical_scroller", "043_intro", "044_intro", "045_elastic", "046_thumbnail_xml", "047_present", "048_vertical_menu_xml", "049_horizontal_menu_xml", "050_star_effect", "051_star_motion", "052_design");

var link_list:Array = new Array("http://www.flashmo.com/preview/flashmo_041_horizontal_scroller", "http://www.flashmo.com/preview/flashmo_042_vertical_scroller", "http://www.flashmo.com/preview/flashmo_043_intro", "http://www.flashmo.com/preview/flashmo_044_intro", "http://www.flashmo.com/preview/flashmo_045_elastic", "http://www.flashmo.com/preview/flashmo_046_thumbnail_xml", "http://www.flashmo.com/preview/flashmo_047_present", "http://www.flashmo.com/preview/flashmo_048_vertical_menu_xml", "http://www.flashmo.com/preview/flashmo_049_horizontal_menu_xml", "http://www.flashmo.com/preview/flashmo_050_star_effect", "http://www.flashmo.com/preview/flashmo_051_star_motion", "http://www.flashmo.com/preview/flashmo_052_design");

var radiusX:Number = 330;
var radiusY:Number = 90;
var centerX:Number = 400;
var centerY:Number = 140;
var speed:Number = 0.005;
tn_group_mc._visible = false;
info.text = ""; fm_label.text = "";

for( var i = 0; i < total; i++)
{
    var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
    t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
    t.fm_label = label_list[i];
    t.fm_url = link_list[i];

    t.angle = i * ((Math.PI*2)/total);
    t.onEnterFrame = mover;

    t.fm_button.onRollOver = function()
    {
        fm_label.text = "Title: " + this._parent.fm_label;
        info.text = "URL: " + this._parent.fm_url;
    }
    t.fm_button.onRollOut = function()
    {
        info.text = ""; fm_label.text = "";
    }
    t.fm_button.onRelease = function()
    {
        getURL( this._parent.fm_url );
    }
}
function mover()
{
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = this._y /(centerY+radiusY);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
    speed = (this._xmouse-centerX) * 0.0001;
}
  1. / Code Credit: Lee Brimelow
  2. // Tutorial Reference URL: http://www.gotoandlearn.com
  3. // Modified by http://www.flashmo.com
  4. stop();
  5. // total is length of label_list OR link_list
  6. // OR total frames inside "flashmo thumbnails"
  7. var total:Number = 12;
  8. // length of label_list array and length of link_list array must be equal
  9. // to length of frames inside "flashmo thumbnails" movieclip
  10. var label_list:Array = new Array( "041_horizontal_scroller", "042_vertical_scroller", "043_intro", "044_intro", "045_elastic", "046_thumbnail_xml", "047_present", "048_vertical_menu_xml", "049_horizontal_menu_xml", "050_star_effect", "051_star_motion", "052_design");
  11. var link_list:Array = new Array("http://www.flashmo.com/preview/flashmo_041_horizontal_scroller", "http://www.flashmo.com/preview/flashmo_042_vertical_scroller", "http://www.flashmo.com/preview/flashmo_043_intro", "http://www.flashmo.com/preview/flashmo_044_intro", "http://www.flashmo.com/preview/flashmo_045_elastic", "http://www.flashmo.com/preview/flashmo_046_thumbnail_xml", "http://www.flashmo.com/preview/flashmo_047_present", "http://www.flashmo.com/preview/flashmo_048_vertical_menu_xml", "http://www.flashmo.com/preview/flashmo_049_horizontal_menu_xml", "http://www.flashmo.com/preview/flashmo_050_star_effect", "http://www.flashmo.com/preview/flashmo_051_star_motion", "http://www.flashmo.com/preview/flashmo_052_design");
  12. var radiusX:Number = 330;
  13. var radiusY:Number = 90;
  14. var centerX:Number = 400;
  15. var centerY:Number = 140;
  16. var speed:Number = 0.005;
  17. tn_group_mc._visible = false;
  18. info.text = ""; fm_label.text = "";
  19. for( var i = 0; i < total; i++)
  20. {
  21.     var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
  22.     t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
  23.     t.fm_label = label_list[i];
  24.     t.fm_url = link_list[i];
  25.     t.angle = i * ((Math.PI*2)/total);
  26.     t.onEnterFrame = mover;
  27.     t.fm_button.onRollOver = function()
  28.     {
  29.         fm_label.text = "Title: " + this._parent.fm_label;
  30.         info.text = "URL: " + this._parent.fm_url;
  31.     }
  32.     t.fm_button.onRollOut = function()
  33.     {
  34.         info.text = ""; fm_label.text = "";
  35.     }
  36.     t.fm_button.onRelease = function()
  37.     {
  38.         getURL( this._parent.fm_url );
  39.     }
  40. }
  41. function mover()
  42. {
  43.     this._x = Math.cos(this.angle) * radiusX + centerX;
  44.     this._y = Math.sin(this.angle) * radiusY + centerY;
  45.     var s = this._y /(centerY+radiusY);
  46.     this._xscale = this._yscale = s*100;
  47.     this.angle += this._parent.speed;
  48.     this.swapDepths(Math.round(this._xscale) + 100);
  49. }
  50. this.onMouseMove = function()
  51. {
  52.     speed = (this._xmouse-centerX) * 0.0001;
  53. }

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.