How to reposition the scroll bar to the middle to the right image

I customize an image thumb wheel. and trying to follow the code developed previously.

Everything worked fine until at the last moment when the thumbnails bar is positioned as if its starting point is located in the middle of the screen. I guess that it was developed for the presentation of the screen flash with centered coordinates. My internship has probably put them in the upper left corner.

I can't move the bar.

My stage size is 1024 x 768

Where I do my calculations in the code for the thumbnails will be located in the middle of the screen rather than in his right hand.

Here are snippets of code responsible for the thumbnails to accumulate:

////////////////////////////////////////////////////////////////////////////////////////// //////////



const _THUMB_WIDTH:Number = 50;


const _THUMB_HEIGHT:Number = 64;


const _IMAGE_WIDTH:Number = 860; 550; # original


const _IMAGE_HEIGHT:Number = 500; 355; # original


const _THUMB_GAP:Number = 2;


const _SCROLL_SPEED:Number = 12;


const _SCROLL_AREA:Number = 150;





var _progressBar:MovieClip;


var _arrowLeft:MovieClip;


var _arrowRight:MovieClip;





var _slides:Array;


var _curSlide:Slide; Slide currently displayed


var _loadingSlide:Slide; only used when a slide is supposed to show but was not yet fully loaded (like if the user clicks 'next' several times before all images are loaded). We keep track of who is in the process of loading and should be submitted as soon as it's over, then we _loadingSlide the value to null.


var _imagesContainer:Sprite; the Sprite in which are placed the images in real size (this allows to manage the stacking order, so that the images can still be behind everything and still we cannot addChild() each image so that it manifests itself on top of the other)


var _thumbnailsContainer:Sprite; the Sprite in which thumbnail images are placed. It also allows to slide all at the same time.


var _destScrollX:Number = 0; destination x value for the _thumbnailsContainer that is used for scrolling it across the lower part. We do not want to use _thumbnailsContainer.x because it might be being interpolation, so keep us track of the value of end-destination and addition/subtraction of him during the creation of our tweens.


var _minScrollX:Number; We know the maximum x value for _thumbnailsContainer is 0, but depend on the minimum value on how many thumbnails that it contains (total width). Calculate us it in the _setupThumbnails() method and store it here for calculations in the _enterFrameHandler() of easy/fast scrolling







////////////////////////////////////////////////////////////////////////////////////////// //////////




_thumbnailsContainer = new Sprite();



addChild (_thumbnailsContainer);


_thumbnailsContainer.x = - 550; moves the position of the thumbnails, done rather online 273 thumbnail.x x = curX - 590;


_thumbnailsContainer.y = _IMAGE_HEIGHT; moves y position of thumbnails


_thumbnailsContainer.Alpha = 0; We want alpha 0 initially because we will fade later when loading thumbnails.


_thumbnailsContainer.visible = false; ensures that nothing is clickable.






var xmlLoader:XMLLoader = new XMLLoader ("" scroller loadingAssets/appThumbnails/slideshow_image greenSock_mine/assets/data.xml ", {onComplete:_xmlCompleteHandler});}")


xmlLoader.load ();

//}




function _xmlCompleteHandler(event:LoaderEvent):void {}


_slides = [];


var XML = event.target.content; "content" of the XMLLoader is the XML that has been loaded.


var imageList:XMLList = xml.image; In the XML file, we have < image / > nodes with all the information we need.


loop through each < image / > node and create a new Slide for each object.


for each {(var image: XML dans imageList)}



_slides.push (new slide (image. @name,









image.@Description,









new ImageLoader ("scroller loadingAssets/appThumbnails/slideshow_image greenSock_mine/assets/thumbnails/appThmb_imgs /" + image.@name + ".jpg", ")













{














Name:image.@name + "Thumb."














Width: _THUMB_WIDTH














height: _THUMB_HEIGHT,.














centerRegistration:true,














x: 260, y: 320, / / does not work here, but works on line 69














ScaleMode (ScaleMode): "proportionalInside."














bgColor:0 x 000000.














estimatedBytes:13000,














onFail:_imageFailHandler}),

////////////////////////////////////////////////////////////////////////////////////////// //////////



through looping all the thumbnails and places them in the order appropriate at the bottom of the screen and adds CLICK_THUMBNAIL headphones.


function _setupThumbnails (): void {}





var l:int = _slides.length;



var curX:Number = _THUMB_GAP;



for (var i: int = 0; i < l; i ++) {}




miniature var: Sprite = _slides [i] .thumbnail;




_thumbnailsContainer.addChild (thumbnail);




TweenLite.to (miniature, 0, {colorTransform: {brightness: 0.5}});




_slides [i] .addEventListener (Slide.CLICK_THUMBNAIL, _clickThumbnailHandler, false, 0, true);




thumbnail.x = curX;




thumbnail.y = - 234; Gets or sets the y position of the row of thumbnails




curX += _THUMB_WIDTH + _THUMB_GAP;



}



_minScrollX = _IMAGE_WIDTH - curX;



If (_minScrollX > 0) {}




_minScrollX = 0;



}


}

////////////////////////////////////////////////////////////////////////////////////////// //////////



function _enterFrameHandler(event:Event):void {}



If (_thumbnailsContainer.hitTestPoint (this.stage.mouseX, this.stage.mouseY, false)) {}




If (this.mouseX, _SCROLL_AREA) {}





_destScrollX += ((_SCROLL_AREA-this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;





If (_destScrollX > 0) {//this number is 1/2 the size of the stage, previously was at 0, it defines the left position of the end of scrolling thumbnails must be identical to the number below}






_destScrollX = 0;    This number is 1/2 the size of the stage, previously was at 0, it defines the left position of the end of scrolling thumbnails must be identical to the number above





}





TweenLite.to (_thumbnailsContainer, 0.5, {x: _destScrollX});




} else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {}





_destScrollX-= ((this.mouseX-(_IMAGE_WIDTH-_SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;





If (_destScrollX < _minScrollX) {}






_destScrollX = _minScrollX;





}





TweenLite.to (_thumbnailsContainer, 0.5, {x: _destScrollX});




}

////////////////////////////////////////////////////////////////////////////////////////// //////////

////////////////////////////////////////////////////////////////////////////////////////// //////////

If your stage size is 1024 x 768 and you do not want to change the width and height in the code, the upper left corner of the scene will always be 0,0 bit whatever your stage alignment is on. If you resize width and height stage is when the alignment comes into play.

The only 2 parts of the equation in question I see is what which is the value of _destScrollX and what other clips 'container' could load the _thumbnailContainer. One of the two does not work for you.

Put a trace anywhere _destScrollX is updated to look at. Otherwise, consider the clips you add the miniature in container. This clip container itself can be the cause of the position. Check its x position.

Tags: Adobe Animate

Similar Questions

  • How to disable the PNG Images

    How to disable the PNG Images?

    PNG is a format for images (compressed) as JPG format. There is no way to disable this format.

    If you have a problem with images on web pages, then you will need to block images from certain domains.

    You can watch the Adblock Plus extension to block specific content.

    You must subscribe to a list of filters (for example the EasyList).

  • HP pavilion 15-e034tx: how to choose the right RAM for laptop

    How to choose the right RAM for my laptop (Pavilion 15-e034tx). I know I should buy DDR3 ram.

    Are there other factors should I consider when buying one? I got 2 slots for ram, which od these combos are possible?

    1-4 + 4 GB
    2-4 GB + 8 GB
    3-8 GB + 8 GB

    Thank you

    From the Manual:

    Two customer accessible/upgradable memory module slots

    Support for dual channel DDR3L (1600 MHz)

    Support 8192 MB RAM system in the following configurations:

    8192 MB (8192 MB × 1, × 4096 MB 2)

    Manual download link

    See page 53 for instructions. Memory access is easy via the service Panel. This is the part number for the approved 4 HP concert module:

    4 GB (PC3L, 12800, 1600 MHz) 691740-001

    http://www.Amazon.com/HP-691740-001-4GB-1600MHz-PC3L-12800/DP/B00CI08FX4/ref=sr_1_2?ie=UTF8 & qid = 1451655870 & SR = 8-2 & Keywords = 691740-001

    A 8 GB module is listed in the manual, and it's a 3rd generation of processor i5 I suspect 2 x 8 = 16 concerts would work, but strictly following the manual your only option is to add a 4 GB for a total of 8. Most users really not more 8 GB and adding a second identical module will allow two-channel operation, so you should see a noticeable jump in the overall performance.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • 4540 proBook s: how to choose the right network driver

    Hello guys. I clean installed Windows 7 Professional. Now, I see that I can not connect my computer to the internet, so I need to install the network drivers. I wen to the HP website and saw that there are 19 different network for my laptop drivers.
    How to choose the right method?

    Hello:

    Below are the links to the ethernet and wireless drivers you need...

    Wireless:

    This package contains the installation package driver for Ralink wireless LAN controllers in the laptop models running a supported operating system.

    File name: sp66089.exe

    This card also needs a bluetooth driver...

    This package contains the OS driver installation package for the Ralink Bluetooth in laptop computers running taken in charge.

    File name: sp59632.exe

    Ethernet:

    This package provides the driver for the Ethernet Realtek controller in the laptop models running a supported operating system.

    File name: sp63213.exe

  • How to correct the bad image applesynofer.exe

    How to correct the bad image of apples synotifer.exe

    Contact apple.

  • How to find the right server to use windowsmail to send and receive e-mails?

    How to find the right server to use windowsmail to send and receive e-mails?

    Who is your current e-mail server? (Which is after the @ in your address).
     
  • I wipe my keyboard and mouse with a paper towel and the screen flipped sideways, how I recover the right way? /

    I wipe my laptop and keyboard mouse with a paper towel and the screen turned sideways, how I recover the right way?

    Hi ken1957,

    Try pressing Ctrl +or to rotate the screen.

  • How to set the background image on my request.

    Hi all

    I use jdev 11.1.2.4.0 version

    use case: I create mobile applications and using the skin by default 'mobileFusionFx '.

    so when I run application there show black screen as a background image on my application

    My question is how to change the background image.

    Thank you

    Manish

    Resources of the Application open-> descriptors-> ADF META - INF-> adfmf-config. XML

    Check the family skin it and use in the skin of skin-addition id attribute.

    With this way automatically all your pages will use the same background image.

    In addition, background - image: url("images/back.png");    ---> It denotes that this images folder is inside the css file. If the pictures folder is a brother to css file, use

    background-image: url("..) (' / images/back.png ');

  • How to disable the right-click in Flash canvas

    How to disable the right-click in Flash canvas

    The problem is with the banner code, which, through incompetence or wrong has been coded to interpret a right-click as a navigation request. Fix this.

  • Win version first elements 14 rather than Mac version you downloaded. Serial number does not work. How to get the right serial number

    Win version first elements 14 rather than Mac version you downloaded. Serial number does not work. How to get the right serial number?

    It is unclear what problem you are facing... the wrong version or the wrong serial number.  The serial number is likely for the other version.  You don't want the serial number of Windows or the Mac version?

    One of the following conditions may be useful...

    You can exchange languages/platforms for a newer version product if you follow the instructions on the following link:

    l http://helpx.adobe.com/x-productkb/Policy-Pricing/Order-Product-Platform-Language-swap.htm

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • How I see the preview image of my PDF documents?

    How I see the preview image of my PDF documents?

    Hi josepm26085232,

    Preview of thumbnails has been disabled in the latest Adobe Acrobat Reader DC due to security problem.

    If you want this feature, you will need to uninstall the latest version & reinstall the old version of the Adobe - Adobe Acrobat Reader DC Distributiondrive.

    Kind regards
    Nicos

  • How to print the specific image size?

    Hi Gang - How can I print an image 11 x 15 "on paper 13 x 19"?  Initially, it seems easy, but things are not how to navigate. Here's what I did:

    I exported the photo and used the dialog box LR image resize to 11 x 15 "- easy."

    I imported the exported image (assuming that the image was 11 x 15 ") and then in the LR print area - it is where the confusion begins.

    The print tab displays the dimensions of the image as 8 x10.19 in.  Help, how can I do the 11 x 15 "I need it to be?

    I understand that I will need to adjust the image to get the part I want in the space of 11 x 15, but for the moment, I can't even 11 x 15 "size.

    I tried package customized options, but no luck there.

    I would like to Print Studio Pro Canon plugin that works very well. Except, again, I don't know how to ask the image size 11 x 15 "for printing on paper 13 x 19".

    Fiddling with settings, I printed a dozen attempts and still no luck to reach 11 x 15 "size of the image on paper 13 x 19".  For now, I'm OK with the image to cut or to another plane - no baby - I need to know how to make the print image 11 x 15 "size of the image. A

    Thank you to offer suggestions.

    Screenshot shows that my image 11 x 15 "is 8x10.19; I don't know how 11 x 15 ".

    Untitled.jpg

    LR v5.7

    Mac OS X Yosemite v10.10.2

    Brain: generally intuitive, but need some help on this issue!

    The first step in the Lightroom print module is to click on the Page Setup button, select your printer, and then select the paper size. It looks like your screen to paper size correct has not been selected yet, because you said you wanted to print on paper 13 x 19 inches, but the paper on the screen is only 8.5 inches wide. My guess is that Page Setup is always programmed for letter-size paper, and you should come back on layout and change it. After you do this, if your layout Style is unique, you should be able to affect the size of the cell 11 x 15 inches.

  • How to disable the right click option resize on the table column header?

    Hi all

    Please let us know how to disable the right click option resize on the table column header.

    The problem is that when I right click on the header of the column, the column is selected and the context menu with options like type, resize columns, columns, etc... is popping. We want to disable the option of re-size column.

    We create a link by program the values in the table (do not use Bc4J) and the version of Jdeveloper's 11.1.2.2

    Thanks in advance,

    -Vignesh S.

    So who did not observe here is that the table is wrapped in a panelCollection and who is in fact source menu.  However, the content of the context menu can be controlled through the featuresOff of the panelCollection component attribute

  • During the import of my camera or a file in Lightroom 5 my pictures are too exposed by 1-2 stops, while they are well exposed on the screen of the device. How to get the "right-exposed images on the screen?

    During the import of my camera or a file in Lightroom 5 my pictures are too exposed by 1-2 stops, while they are well exposed on the screen of the device. How to get the "right-exposed images on the screen?

    There is an option in your Lightroom preferences, under the general tab, "treat JPEG files next to raw in form of images". If you have this option is checked, then Lightroom will import and view your first two and JPEG files. You use the active D-lighting on your camera? If you are, you must disable this feature.

  • How to mount the iso image on the ESXi Tech support console

    Hi friend

    How to mount the iso image on the ESXi Tech support console?

    I run the sub command and it failed.

    # mount o loop-t iso9660 vmware-esx-drivers-net-be2net_400.2.102.440.0-1vmw.2.17.249663.292682.iso / free

    editing: vmware-esx-drivers-net-be2net_400.2.102.440.0-1vmw.2.17.249663.292682.iso mounting on / open failed: no such device

    ESXi does not provide the option of mounting ISOs. You try to install the driver the driver Async package be2net / ISO. Follow the steps below

    (1) install VCLI
    (2) mount the ISO on the host where you installed vcli
    (3) use vihostupdate to install the driver
    vihostupdate-i b - servername
    He will ask for username and password of your host.

    Thank you
    Nithin

  • FOR ADMINS - how to choose the right answer on a thread on this forum?

    FOR ADMINS - how to choose the right answer on a thread on this forum?

    For example, on:

    "missing plug-in" for safari after you download!

    http://forums.Adobe.com/thread/897677?TSTART=0

    It does not show on 5.1 Safari and Firefox on Mac OS X 10.6.8 6.0.2.

    Thank you!

    The normal user (non-admin type), which can mark a reply as useful or appropriate is the user who started the discussion.

Maybe you are looking for