Need help how to loop the images through xml in scroll panel

  • tharnge
  • Born
  • Born
  • tharnge
  • Posts: 1

Post 3+ Months Ago

Hi,there,

I'm newbie for the flash and i'd greatly appreciate if anyone help me.Here is my problem.I'd like to make images through xml in vertical scroll panel.I'd like to show four images in the stage.It's scrolling all the time and when the mouse is rollover,it's just rollover.U know the user can stop when the mouse is rollover.Maybe it's like a carousel.And when the mouse is rollout,it's looping or scrolling up and down again.My problem is i don't know how to loop the images.Can anyone help me out of this.Much apprecite it.Sorry for my english.
Code: [ Select ]
y_middle = Stage.height/2;
tn_group.tn._visible = false;
tn_group.setMask( tn_area );
tn_alpha_default = 70;



for( var i = 0; i < photo_thumbnail.length; i++ )
{
    tn_group.tn.duplicateMovieClip("tn"+i, i);
    
    tn_group["tn"+i].tn_pic.loadMovie( filepath +photo_thumbnail[i] );
    tn_group["tn"+i]._x = tn._x;
    tn_group["tn"+i]._y = i * 100;
    tn_group["tn"+i].tn_pic._alpha = tn_alpha_default;
    tn_group["tn"+i].tn_no = i;
    
    tn_group["tn"+i].tn_button.onRollOver = function()
    {
        this._parent.tn_pic._alpha = 100;
    }
    tn_group["tn"+i].tn_button.onRollOut = function()
    {
        
        this._parent.tn_pic._alpha = tn_alpha_default;
    
    
        
        
        
    }
    
        
    
}

onEnterFrame = function()
{
    x_mouse = _xmouse;
    y_mouse = _ymouse;
    
    if( x_mouse > tn_group._x - 10 and x_mouse < tn_group._x + tn_group._width + 10 )
    {
        y_speed = -(y_mouse - y_middle ) /20;

        if( y_mouse > y_middle )
        {
            
            
            
            if( tn_group._y > tn_area._height - tn_group._height + tn_area._y )
                tn_group._y+=y_speed;
        }
        else
        {
            if( tn_group._y < tn_area._y )
                tn_group._y+=y_speed;
        }
    }
}
  1. y_middle = Stage.height/2;
  2. tn_group.tn._visible = false;
  3. tn_group.setMask( tn_area );
  4. tn_alpha_default = 70;
  5. for( var i = 0; i < photo_thumbnail.length; i++ )
  6. {
  7.     tn_group.tn.duplicateMovieClip("tn"+i, i);
  8.     
  9.     tn_group["tn"+i].tn_pic.loadMovie( filepath +photo_thumbnail[i] );
  10.     tn_group["tn"+i]._x = tn._x;
  11.     tn_group["tn"+i]._y = i * 100;
  12.     tn_group["tn"+i].tn_pic._alpha = tn_alpha_default;
  13.     tn_group["tn"+i].tn_no = i;
  14.     
  15.     tn_group["tn"+i].tn_button.onRollOver = function()
  16.     {
  17.         this._parent.tn_pic._alpha = 100;
  18.     }
  19.     tn_group["tn"+i].tn_button.onRollOut = function()
  20.     {
  21.         
  22.         this._parent.tn_pic._alpha = tn_alpha_default;
  23.     
  24.     
  25.         
  26.         
  27.         
  28.     }
  29.     
  30.         
  31.     
  32. }
  33. onEnterFrame = function()
  34. {
  35.     x_mouse = _xmouse;
  36.     y_mouse = _ymouse;
  37.     
  38.     if( x_mouse > tn_group._x - 10 and x_mouse < tn_group._x + tn_group._width + 10 )
  39.     {
  40.         y_speed = -(y_mouse - y_middle ) /20;
  41.         if( y_mouse > y_middle )
  42.         {
  43.             
  44.             
  45.             
  46.             if( tn_group._y > tn_area._height - tn_group._height + tn_area._y )
  47.                 tn_group._y+=y_speed;
  48.         }
  49.         else
  50.         {
  51.             if( tn_group._y < tn_area._y )
  52.                 tn_group._y+=y_speed;
  53.         }
  54.     }
  55. }
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 8 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
 
cron
 

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