Recalculate the space between objects on a fly in slide show...

Hi all.. I hope someone can help me with this - and thanks in advance!

I work with a slide show which products of different widths. The idea is to ensure that when the user clickes on the next/back buttons and the next (or previous) product arises - to ensure that the product is not cut either on left of the stage (or live area) or to the right...

The only way I can think is that flash must recalculate the space between products according to which products are currently displayed... This is the part of the code where I'm sure that this calculation must happen ("back" button has basically same code):

where itemSpace is that space is the space between the product and the and the product_mc is a product... all products are called through XML... If someone could put the right direction here - I would REALLY appreciate it...

_root.button_next.onRelease = function() {}
trace ("onRelease button_next");
If (_root.totalImages - > 5 currentIndex)
{
_root.xTargetMC +=-1 * (_root..) Product_mc._width MC ['coffee_maker' + currentIndex] * 2 + _root.itemSpace);
If (currentIndex > 0)
_root.xTargetMC += 1 * firstPosX;

currentIndex += 1;
If (currentIndex > 0)
{
_root.button_back._visible = true;
}

If (currentIndex == _root.totalImages - 5)
{
_root.button_next._visible = false;
}
}
}

I see no easy way to fix this code.  the spacing is assigned elsewhere and does not change when you change the currentIndex.  that will have to be changed which will change how your application works.

What will probably work best is to eliminate this movieclip MC master that contains the objects seen on stage and tween each of 5 objects on stage (5 pre-teens).  This will require removing all the interpolation code you currently have and creating new code.

Tags: Adobe Animate

Similar Questions

  • Gradually increase the space between a series of objects

    I have a row of lines with the same race I want to distribute them so that the space between each of them increases gradually from one line to the other.

    Does anyone know how to do this?

    Using the transform effect as Kurt suggested, 4-point line as shown

  • URGENT magic wand tool selects a line drawing, instead of the space between

    Hello

    I am coloring/rendering a map of the places where I imported a PDF of line drawing prepared in Autocad. To do this, I usually start with the magic wand tool to select areas on the plan and block everything with the pot of paint color. However, this time when I select objects (say the building) selects the black lines in the layer (the line drawings) rather the space between the two. I checked to see if all the lines are closed and I played with the tolerance but he still picks on the lines instead. I tried both on a transparent background and tried to merge the lines with a layer of white background but without success.

    Please help if you can, I have a tight deadline to finish it and use the polygonal selection on everything that would be both pain and take too much time! I have Adobe Photoshop CC 2015.

    Thank you.

    If there is a problem with gaps - create a copy of the layer. Apply a 1 - 2px Gaussian blur. Use the magic wand on this layer, then make your choice.

    Dave

  • How to change the space between folder icon and the text on the personal toolbar?

    I have some files in the personal toolbar with just a letter to indicate what they are, but on the theme that I use, the letter is too far from the record, it belongs to and partially falls under following folder icon. I don't want to increase the space between all the icons to show the full letter, as this decreases the amount of icons that you can have in the toolbar. Instead, I want to reduce the space between the file and the text belonging to him, so he is right next to him instead of 5 pixels away.

    I found various entries to change the padding and margins in userChrome.css, but it's always around the icon, I don't know where to look to close the space between the icon and the corresponding text.

    Any help would be greatly appreciated, thank you.

    Did you check the value of the left margin of the text?

    You can set if necessary negative margin values.

    #PlacesToolbarItems .toolbarbutton-text { margin-left: -2px !important; }

    Add .bookmark-item [container] If this enough for the items in the folder

    #PlacesToolbarItems .bookmark-item[container] .toolbarbutton-text { margin-left: -2px !important; }
  • Piano roll Editor: is it possible to eliminate the spaces between the many notes at once?

    Using the step input method, I entered a number of 1/2 notes in the piano roll Editor.

    Then I selected all my notes and decided to shorten all 1/4 notes after realizing that the pace was too slow.

    The problem is that I now have many empty spaces between the notes of 1/4:

    Is it possible to eliminate all the spaces between the notes at once with all selected notes notes?

    Or I have to manually move each 1/4 at the end of the previous note footnote 1/4.

    I think there must be a quicker way to do this.

    Select all under the Edition of the piano roll Editor menu or command button has

    Then enter the end of a single note and all selected notes will also expand.

  • Windows Server 2012 does not seem to recognize the space between the program and files

    I installed 'R' in D:\Program Files.
    Then I need to install another application that must refer to this path and validate during its installation. Installation of the next application saying that there is a "Invalid Version of R.

    If I install R in the following directories, it is recognized and my next application installed successfully:
    C:\Program Files
    Files S:\Program
    D:\R

    Windows Server is not recognize the R application properly installed in "D:\Program Files." Windows runs into the space between "Program" and "Files" and put an end to the execution of this order.

    The application I am trying to install the message 'Invalid Version of R' returns because he can't run the command check correctly. Because nothing is returned from the R.exe, he is unable to continue. This issue seems to be related to Windows and once R.exe can be run correctly D:\Program files, I would expect demand to continue to install. Is anyway getting D:\Program Files to be recognized as the other 3 directories I mentioned?

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Sony Xperia Tablet S has the space between the screen and back

    Hey,.

    I just discovered that the space between my front and back is! I checked out the site to see if it was one of the tablets known with the question, but it wasn't. Although he did not share the same problem as the Xperia which have been requested to return.

    Here are some pictures:

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0082.jpg

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0063.jpg

    http://i350.Photobucket.com/albums/q429/Silasje1/DSC_0085.jpg

    Really weird that it can be done!

    I checked here:

    http://www.Sony.nl/support/NL/product/SGPT121GB_S/news/Xperia_S_series_notice2

    But he said that my tablet was not part of the known :/

    I can put my nail enters the length of more than 13 cm


  • How to reduce the space between icons on the desktop?

    I want to reduce the space between icons

    Right-click on the desktop, select "Display", uncheck "auto arrange" and snap to grid "if they are checked, then move the icons in the desired position.
    I hope it works for you.

  • How to fill the space between the four points of the paint method?

    Hello

    I have a graphics application and I want to fill the space between four points by painting method how I can do it.

    can someone help me?

    Try to use Graphics.fillRect which allows to fill using coordinates xy as well as a width and a height.

    If the points are not rectangular, you can try to use Graphics.drawFilledPath.

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#FillRect (int, 20int %, 20int %, 20int %)

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#drawFilledPat... (int [], 20int [], % 20 byte [] % 20int [] %)

  • I have a button with the icon text. Is it possible to increase the space between the text and icon?

    Mr President.

    I have a button with the icon text. Is it possible to increase the space between the text and icon?

    adf button text image space.png

    adf button text image space.jpg

    Concerning

    Have you tried it as directed by the other thread?

    
    

    See you soon

    AJ

  • How to reduce the space between two lines in a panelformlayout who is lain in the panelbox?

    Mr President.

    I have a panelbox in which I put a panelformlayout which have two rows as below

    panelformspace.png

    I want to reduce the space between inputfield first and second inputfield.

    Thus, this second inputfield closer to the first inputfield

    Respect of

    You can define simple = true in the first entry field (name), sorround who on the ground with panelLabelAndMessage and add the second inputField (address) about to end of panelLabelAndMessage.

    In fact, you can add more or less space with spacer between them and panelGroupLayout with horizontal layout as a facet of the end child

  • How to remove the spaces between the textfield in a horizontal layout - ADF Mobile

    snip.png

    Please tell me how to reduce the width of the 1st two textfields whose number of 971 and 50 and increase the width of the textfield "mobile".

    My code is given below

    < amx:panelGroupLayout id = "gp1" layout = "horizontal" >

    < amx:inputText value = "971" hintText = "Country Code" id = "it3" inputType = 'number' simple = "true" inlineStyle = "width: 70% margin-left: 5px" / >

    < amx:inputText value = "50" hintText = "Code" id = 'it8' inputType = 'number' simple = "true" inlineStyle = "width: 70% of margin-left: 5px" / >

    < amx:inputText value = "#{pageFlowScope.mobile_number}" hintText = 'Mobile' id = "it6" inputType = 'number' simple = "true" inlineStyle = "width: 100%" / > "

    < / amx:panelGroupLayout >.

    Width of the 1st two fields should very less that we will get that 2 or 3 numbers. Where are mobile, the width must be more as we enter the 10 numbers.

    This means that for example alignment must be as shown in the picture below. And the space between them must be equal and uniform as shown in the image below.

    pic.png

    Please help me someone

    Try using rowLayout as:

    
          
            
          
          
            
          
          
            
          
    
    
  • How can I change the color of the spaces between the buttons of menu

    Hello

    I have problems by changing the color of the spaces between the menu buttons.

    The spaces between the color buttons lighter must be the same color as the buttons.

    Please note that some buttons are voluntarily lighter, some are darker.

    Screen Shot 2016-05-31 at 16.46.17.png

    Help would be greatly appreciated.

    Thank you.

    Dmitry

    Select the Menu container. Open the control panel of the spacing. The horizontal gutter value 0.

    You can always add padding for menu items to create extra space.

    David

    Creative muse

  • How to reduce the space between the section number and title of section in TOC

    Hello

    I want to reduce the space between the section number and title of section in TOC.

    can someone guide me on how to do this:

    4.PNG

    Thank you

    Try to do it from the style of paragraph (bullets and numbering) options

  • Can't the space between words

    When monitoring and sending a pdf file, cant the space between words

    Hi all

    Today we released a hotfix that resolves this problem on space/line jump does not work in the transmission and the railway. If you're not already updated to the latest patch, simply open Acrobat and visit help > check for updates to apply this hotfix.

    More details about this release and bug fixes is available here: https://helpx.adobe.com/acrobat/release-note/acrobat-dc-june-02-2016.html

    Please give it a try and let us know.

    Thank you

    -ashu

Maybe you are looking for

  • HP Pavilion 15 N: bought AC wifi card, getting only B/G/N signals

    Hello! I recently updated my router, and now it supports 5 GHz signals.  I wanted to use this signal to my laptop, so I bought a card a/ac wifi (dual-band). No luck. Later, I found another a friend. No luck again. After 4 cards I still can't signal o

  • OfficeJet Pro 8500 a: ADF

    Read the answers, but my printer still does not feed. 1. how to do a HARD reset of the printer? 2. I noticed that you can buy some ADF on ebay for a reasonable price.  How is it difficult to remove the cover with the ADF and replace it?

  • Display of the "own number" edict of blackBerry Smartphones

    Greetings. I have a new Member and just bought a Blacberry Priv. This topic has been discussed before for other Blackberry devices, but I can't find anything specific to a priv. I purchesed the sim-free phone and bought a new EA-mobile sim card. When

  • IPCCX CAD icons

    I use IPCCX 4.0 (5) Premium. Can we get larger icons for CAD?

  • Limited number of app in the store

    I use a full update preloaded Windows 8 pro 64-bit on a touch of carbon lenovo x 1 with full access to all my account settings.   I get only showed a limited number of app in the store. for example, only 3 in the category economy and two in the healt