Parallax Scrolling from top view (bird view)/ resizing and blank spots

Hello : )
I was thinking this was going to be easy but some problems occurred
Currently Im trying to make a parallax scrolling road while seeing it from above, but there are some issues going on.
the 1st one is that somehow after the second image is gone out of the stage , there are a few blan pixels that are not filled .... and it seems that the speed of the moving is == to the pixels that aren't filled up.
And i think , just asume  that if i test this on like different screen sizes - lets say this is for a phone - ill get some issues with the scaleX and Y and it will get quite ugly and cubic.
I did surch for an example or a tutorial but there are only in a X direction like if you see the car from a side view like this
http://hub.tutsplus.com/tutorials/add-depth-to-your-game-with-parallax-scrolling--active-2 134
the SWF file  si here
http://www.stouchgames.com/APKs/Road.swf
so the current code i have is
package  {
          import flash.display.MovieClip;
          import flash.events.Event;
          public class MainClass_road extends MovieClip {
                    protected var _road:road = new road();
                    protected var _road2:road2 = new road2();
                    public function MainClass_road() {
                              _road.x = stage.stageWidth/2
                              _road.y = stage.stageHeight - _road.height
                              addChild(_road)
                              _road2.x = stage.stageWidth/2
                              _road2.y = y - _road2.height
                              _road2.alpha = 1
                              addChild(_road2)
                              addEventListener(Event.ENTER_FRAME, everyFrame)
                    protected function everyFrame(ev:Event):void{
                              _road.y +=8
                              if(_road.y > 400){
                                        trace("zzzz")
                                        _road.y = y - _road2.height
                              moveBackground2()
                    protected function moveBackground2(){
                              _road2.y +=8
                              if(_road2.y > 400){
                                        _road2.y = y - _road2.height
and the FLA is here
http://www.stouchgames.com/APKs/Road.fla

is there a way to do this only with only as3 code and not by this way :
if the road high graphics are 400 pixels and the stage has 400 height
1.creating the original _road and setting it`s Y to 0
2.go in the same movieClip (of the _road) copy and paste the same graphics but at Y = -400
and then adding the code
               var speed = 4
               var _road:road = new road();
               _road.x = stage.stageWidth/2
                              _road.y = y
                              addChild(_road)
               addEventListener(Event.ENTER_FRAME, everyFrame)
function everyFrame(ev:Event):void{
               _road.y += speed
               if(_road.y > 400 ){
                   trace("zzzz")
                   _road.y = y 
cause it seems (for me )that if i do it with code only - there is a blank spot which amount is the speed in the EveryFrame function
and if no ... can i make it smoother without changing the framerate above 30

Similar Messages

  • How to auto scroll from top to bottom on JTable ?

    HI All.
    At the current, I use JTable is contained JScrollPane. Now, I want Jtable auto scroll from first item to bottom and when JTable scroll to bottom then Jtable will scroll bottom to top, It is loop. Who know how do this function, please help me.

    Thanks for reply
    Actually. I was code -> scroll from top to bottom on JTable. Code below But when JTable auto scroll then screen is not smooth.
    Please help How to workground for this problem
    private void scrollTopToBottom() {
                   try {
                        JViewport viewport = flexGrid.getViewport();
                        int heightViewport = viewport.getViewSize().height;
                        while(moveY < heightViewport) {
                             synchronized (this) {
                                  while (suspended)
                                       this.wait();
                                  if (stopped)
                                       break;
                             moveY += 10;
                             if(moveY > heightViewport) {
                                  moveY = heightViewport;
                             viewport.setViewPosition(new Point(0, moveY));
                             try {
                                  Thread.sleep(500);
                             } catch (InterruptedException e1) {
                                  e1.printStackTrace();
                             viewport.updateUI();
                   } catch (InterruptedException e) {
              }

  • I have lost my bookmarks? gone from top of page? help thanks

    bookmarks have gone altogether from top of page

    Click "View"menu  in the Safari menu bar at the top of the screen and select "Show
    Toolbar".
    or
    Click "View" menu in the Safari menu bar and click "Customize Toolbar".
    From the drop down drag the default set into the Toolbar.
      the one under " or drag the default set into the Toolbar"
    Click "Done".
    Best.

  • Why are my images scrolling from outside the Page width?

    Why are my images scrolling from outside the Page width? I am positive i has all the settings correct, to have an image parallax scroll from the edge of the page into the page and out again. But the images are flying in from the browser width - not the page width. This is not the effect I am after.
    Any suggestions on how to fix this? Given the key position is only linked to the height, I can't for the life of me work out how to ensure the images start moving from a certain position onthe left and right of the page.
    Thanks

    I think the effect you are seeing is a result of how the lineHeight is set up. By default, the lineHeight will be calculated as 120% of the size of the largest thing on the line -- in your case, this is the inline graphic. This is designed to leave space between the line before and the line with the graphic. So it is taking the height of the graphic, multiplying by 120%, and making this the distance between the previous line and the line with the graphic. So the bigger the graphic, the bigger the space above the graphic. Normally this works well with text, but in this case you may want to get closer to "set solid". You can do this by setting the lineHeight to 100%. Or you may wish to leave a couple of percent for the descenders of the previous line. Or, another alternative that may work well for you if you really know exactly where you want the line set, you could measure the graphic, add on the number of extra pixels to leave for the descenders, and make the lineHeight a constant. So you could do something like this:
    <img lineHeight="104%" height="411"/>
    or this:
    <img lineHeight="423" height="411"/>
    Obviously you would still need to specify the source and any other parameters you want on the image.
    Note that if you are trying to fit a 200 pixel high graphic into a 200 pixel high container, you will hit the same problem -- in order to fit the graphic, the container will have to be slightly bigger than the graphic in order to fit the descenders on the last line. This is true even if the last line contains only the graphic, and no descenders (or text) at all.
    Hope this helps,
    - robin

  • Quicklook does not work with WMV files and quick look no longer maintains resized views when viewing from a folder using the up/down arrows

    Quicklook does not work with WMV files and quick look no longer maintains resized views when viewing from a folder using the up/down arrows. Any fixes?

    Same problem here...

  • How do i switch from top sites view to normal view

    how do i switch from top sites view to normal view

    Visit the site you want it to be the Homepage.
    Safari > Preferences > General
    Homepage:
    Click the "Set to Current Page" button.
    New windows open with:
    Click the popup menu box and select "Homepage"
    New tabs open with:
    Click the popup menu box and select "Homepage"
    http://support.apple.com/kb/PH11857

  • Scroll by week in month view

    I am an Outlook '03 convert, and I would like to scroll from week to week in the month view. So say its Oct 15, I want to see the current week and the next few weeks. I don't need to see what i did on oct 5.

    Welcome to the discussions, Adam. I don't think it can be done, unless it is one of the unpubllished key combinations like alt-command n (where n is 1-7) to select the number of days to view in week view. But it seems a reasonable feature to have - post the suggestion in the iCal feedback section (at the top of the discussions)

  • Where have the view icons gone! and why cant i scroll my album artwork anymore, instead i have an ugly grid!!

    im trying to set up itunes on my new laptop, and all the library view icons have now gone, so easy switching from the ugly grid, to list or scrolling artwork seems to no longer be an option.
    have apple stopped this on a down grade? or am i missing a vital clue to where its hiding, had a look on the help page and there seems no mention of it any more.

    The main differences between iTunes 11 and earlier versions are the loss of coverflow and ability to have multiple windows open.
    In Windows, you can restore much of the look & feel of iTunes 10.7 with these shortcuts:
    ALT to temporarily display the menu bar
    CTRL+B to show or hide the menu bar
    CTRL+S to show or hide the sidebar
    CTRL+/ to show or hide the status bar (won't hide for me on Win XP)
    Click the magnifying glass top right and untick Search Entire Library to restore the old search behaviour
    Use View > Hide <Media Kind> in the cloud or Edit > Preferences > Store and untick Show iTunes in the cloud purchases to hide the cloud items. The second method eliminates the cloud status column (and may let iTunes start up more quickly)
    If you don't like having different coloured background & text in the Album (Grid) view use Edit > Preferences > General and untick Use custom colours for open albums, movies, etc.
    With iTunes 11.0.3 you can enable artwork in the Songs view from View > Show View Options (CTRL+J) making it more like the old Album List view.
    If you feel the need to roll back to iTunes 10.7 first download a copy of the 32 bit installer or 64 bit installer as appropriate, uninstall iTunes and supporting software, i.e. Apple Application Support & Apple Mobile Device Support. Reboot. Restore the pre-upgrade version of your library database as per the diagram below, then install iTunes 10.7.
    See iTunes Folder Watch for a tool to scan the media folder and catch up with any changes made since the backup file was created.
    tt2

  • I cannot swith gmail settings from compact to cozy view in Mozilla, it works fine in Chrome and other browsers, I tried it in Mozilla safe mode and was fine

    Just the other day gmail settings in Mozilla suddenly went from "cozy" to "compact" view. Gmail is not letting me reset to cozy in Mozilla, saying it's only for larger screens. However, it does let me use cozy in Chrome.
    You had one support forum (https://support.mozilla.org/en-US/questions/972502) and I tried restarting in Mozilla "safe" mode, which allowed me to switch to "cozy". But running in just safe mode is not a solution I can use, so I need to find out what is causing the problem in normal mode that doesn't exist in safe mode. Beyond running in safe mode, there is no other proposed solution here.

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • When inserting inline notes within tables the focus shifts to the top of galley view

    There is a latency between each letter typed while the focus switches between the top of galley view and back to the note insertion point. I heard this was a known error in a previous version of InCopy but all users are now running v7.5.2. Does anyone know of a workaround or resolution?

    Oclair wrote:
    post.user_wrote.label:
    I can't figure out what you are describing. Maybe that's why it is unanswered.
    1) The only thing that changes the focus is my mouse and arrow keys.
    2) What's a "Finder-based selection window?"
    3) Mine selects the next item in the list, which I expect. If I'm going down a list of  items deciding which to delete, I'd like it to move to the next item.
    If you want the choice of some other behavior, send feedback to Apple. I doubt they will provide any choices as that is not in their nature.
    >If you want the choice of some other behavior, send feedback to Apple.
    The original behavior.  Q: what should I tell them? A: If you add new behaviors add a preference for it.
    >Mine selects the next item in the list, which I expect. If I'm going down a list of  items deciding which to delete, I'd like it to move to the next item.
    That's Insane, it sounds to me like
    Maybe my Mac can have sex with my wife which I expect?
    #EasyModeOff
    Sorry. Still have no idea what you are talking about. I have no idea what the new behavior is. As far as I can tell, the Finder works as it always has.
    Now, if you jumped from Leopard or Snow Leopard to Yosemite, I can't remember that far back as to any behavior such as you describe.
    I don't know what you should tell them to do as I have no idea what is the behavior you expect.
    Perhaps your wife would be happier.

  • When keyboard show-up view didn't resize in Android, ADF Mobile

    Hi Guys,
    Now I was facing with amx page didn't resize when keyboard pop-up, so user cannot scroll for more fields below,
    Btw iOS is normal to resize when keyboard shown.
    How to fix this issue ?

    Hi Frank
    Thanks for reply, I have another issue about android startup performance with release mode, I will send it to you.
    Btw about Android resize view when keyboard show-up, I can fix it but it should include in next release of ADF Mobile.
    My fix is (Thanks for JoeHuang's way to browse Android template file : Google Play Store does not accept ADF Mobile apps for tablets)
    - Navigate to file <JDev Install>/JDeveloper/JDev/Extensions/oracle.adf.mobile/Android/Oracle_ADFmf_Framework.zip
    - Make a backup copy of the zip file
    - Unzip the file, which would extract all files into a "framework" directory
    - Navigate to framework/template/AndroidManifest.template.xml file
    - Change android:windowSoftInputMode value to "adjustResize" Ex. android:windowSoftInputMode="adjustResize"
    - Zip up the framework directory and name zip file as Oracle_ADFmf_Framework.zip, replacing the old one.  Please make sure the zip file has the exact same directory structure as before.
    - In JDeveloper, before deploying the application again, please do a "Clean All" to clean out all old deployment artifacts.
    - Deploy the app again
    After fix, views is automatically resize when keyboard pop-up, but seems weird with navigation bar that will show as it include in view too.
    I don't know why ADF Mobile put android:windowSoftInputMode value as "adjustPan" in manifest file, as Android document said as view will not resize when keyboard showing (Ref: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft)

  • No scrolling of Events in Day View

    In the latest version of Snow Leopard (10.6 as of this writing), iCal day view does not allow scrolling of events. If the amount of events in a day goes beyond the bottom of the screen, there is no way to scroll to see the rest of them. The user must cut some of the top ones and paste them into a different day in order to see the bottom ones. Scrolling of events in day view is needed to solve this problem.
    Anyone have any tricks for avoiding cut-and-paste to see iCal events when they go below the screen?

    can you change the height to 100% and see whether you have the same issue

  • When I open a pdf document from my dropbox to view it, the document shows up blank, even though it is filled out. This also happened with pdf documents that have been e-mailed to me.

    When I open a pdf document from my dropbox to view it, the document appears blank, even though I know the information is actually there. This also has happened with pdf documents that have been e-mailed to me, then opened to view and they are blank?? Why are they showing up blank?

    When I open emails with PDFs I click on the attachment (doing this all on my iPad) it gives me the option to "open in iBooks", I accept then after that the document is sucked into my iPad but I can't do anything with the PDF after that.  Where is the actual file on my iPad? Why can't I email or send these PDFs to my cloud (Dropbox)?
    It's like once they go into iBooks they're stuck forever.

  • Remove Blank Values from Slicer in Power View

    Hi all,
    I am trying to create a power view report from a power pivot data model. After creating the model when I try to use the slicer in power view I am seeing the Blank record. Then I checked that dimension in model where I don't have any blank value in there.
    Also I checked in fact table where it has a relationship with that dimension and I don't see any blank value there as well.
    I am currently blocked with this issue. Experts please jump in and give some ideas how to remove blank value from there.
    Thanks

    As MM-99 already stated correctly, the BLANK-member is created if there is one or more non-matching row in your fact-table that does not exist in the dimension-table
    maybe you have some issues with upper and lower case?
    or maybe there are some whitespace characters contained in the text?
    to identify the issues you may want to create a calcuated column in your fact-table as =RELATED('DimTable'[MyKeyColumn])
    then you can filter on that column and see if any blank values appear
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • I want to uninstall Acrobat reader. I got support in the community to access my HD and to send to trash the internet plugs in for PDF viewer, but when I try to download a PDF from internet a black screen appears and preview doesn't open

    I want to uninstall Acrobat reader. I got support in the community to access my HD and to send to trash the internet plugs in for PDF viewer, but when I try to download a PDF from internet a black screen appears and preview doesn't open

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

Maybe you are looking for