How to scroll or move a map

I want to figure out how to move a map if I got objexts placed all around in a huge area and got one guy moving would I need to use scroll and if so how do I use it on this code?
package {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    public class platform extends Sprite {
        protected var hero:Hero;
        protected var char:Char;
        protected var keys:Array;
        protected const MAX_KEY:int = 128;
        public function platform() {
            hero = new Hero();
            addChild(hero);
            hero.x = 0;
            hero.y = 0;
            var a:NestedCircles = new NestedCircles(true, 0xff0000);
            var b:NestedCircles = new NestedCircles(true, 0x0f0ff0);
            var c:NestedCircles = new NestedCircles(false, 0x000ff0);
            a.x = 100;
            b.x = 200;
            c.x = 300;
            a.y = b.y = c.y = 200;
            addChild(a); addChild(b); addChild(c);
            stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey);
            stage.addEventListener(KeyboardEvent.KEY_UP, onKey);
            keys = new Array(MAX_KEY);
            char = new Char();
            addChild(char);
            char.x = stage.stageWidth/2;
            char.y = stage.stageHeight/2;
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
            if(char.x >= stage.stageWidth){
            scroll()
        protected function onKey(event:KeyboardEvent):void {
            if (event.keyCode >= MAX_KEY) return;
            keys[event.keyCode] = (event.type == KeyboardEvent.KEY_DOWN);
        protected function onEnterFrame(event:Event):void {
            if (keys[Keyboard.UP]) char.y -= char.height;
            if (keys[Keyboard.DOWN]) char.y += char.height;
            if (keys[Keyboard.LEFT]) char.x -= char.width;
            if (keys[Keyboard.RIGHT]) char.x += char.width;
import flash.display.*;
import flash.events.MouseEvent;
class NestedCircles extends Sprite {
    public var child:NestedCircles;
    protected var stroke:Shape;
    public function NestedCircles(useRoll:Boolean, color:uint = 0,
                                  size:Number = 60, isChild:Boolean = false) {
        graphics.beginFill(color, 0.25);
        graphics.drawCircle(0, 0, size);
        graphics.endFill();
        stroke = new Shape();
        addChild(stroke);
        stroke.graphics.lineStyle(5, 0xffff00);
        stroke.graphics.drawCircle(0, 0, size);
        stroke.visible = false;
        if (useRoll) {
            addEventListener(MouseEvent.ROLL_OVER, handler);
            addEventListener(MouseEvent.ROLL_OUT, handler);
        } else {
            addEventListener(MouseEvent.MOUSE_OVER, handler);
            addEventListener(MouseEvent.MOUSE_OUT, handler);   
        if (!isChild) {
            child = new NestedCircles(useRoll, color, size/2, true);
            addChild(child);
            child.y = -size;
    protected function handler(event:MouseEvent):void {
        trace(event.target.name, event.type);
        switch (event.type) {
            case MouseEvent.MOUSE_OUT:
            case MouseEvent.ROLL_OUT:
                stroke.visible = false;
                event.stopPropagation();
                break;
            case MouseEvent.MOUSE_OVER:
            case MouseEvent.ROLL_OVER:
                stroke.visible = true;
                event.stopPropagation();
                break;
import flash.display.Shape;
class Hero extends Shape {
    public function Hero() {
        graphics.beginFill(0x10c010);
        graphics.drawRect(0, 0, 500, 500);
        graphics.endFill();
import flash.display.Shape;
class Char extends Shape {
    public function Char() {
        graphics.beginFill(0x000000);
        graphics.drawRect(0, 0, 12, 30);
        graphics.endFill();

Scrolling normally just involves incrementally adjusting the x or y property of an object via some control.  I doubt anyone is going to try to decipher your code to see where anything in the way of scrolling might fit in.

Similar Messages

  • How to remove (or move) Here Maps

    I'm short of space on my Lumia 535 since I downloaded a lot of maps. How can I remove some or all of them or move them onto the SD card? Thanks for your input.
    Solved!
    Go to Solution.

    HERE Maps-->(...)-->download maps-->download new maps .. Long press on the Map/s you want to delete and select 'delete'
    You can't move the maps to SD Card. There was an application called Lumia Storage Check Beta thru' which it was possible to store the maps on the SD Card..but I am afraid, the application is no longer published.

  • How do you horizontal scroll a movie clip?

    Can anyone suggest any resources for horizontal (left to right) scrolling a movieClip? I want to be able to scroll through a movie clip that has pictures in it. I can't find any good ones that explain the code. FYI, I do not want the user to use a scroll bar to scroll through. They should be able to touch the screen (on the movieClip) and scroll left or right. I looked at the ThrowPops plugin example on Greensock's website but the code is not explained very well.  So I need a basic description of how to scroll a movie clip.

    google: as3 beginner tutorial flash ios movieclip scroll

  • How to move here map india 1.2gb to sd card

    i downloaded here map (entire india ) ,,but how to move that map to memory card ....
    Solved!
    Go to Solution.

    Map data cannot currently be stored on memory cards as far as I know. If you are short of space, other items like multimedia files and apps can be moved to memory card.

  • How to implement a client side map with ObjectImage control?

    We need to implement a client side map with an ADF Faces ObjectImage control. In the code below, the JSF Faces GraphicImage contol does support a client side image map using the usemap property. However, it appears that the ADF Faces ObjectImage control does not support a client side map. Is there someway of implementing this functionality in an ObjectImage control?
    <h:graphicImage url="/images/map-usa.gif"
    usemap="#m_mapusa"
    binding="#{backing_map.graphicImage2}"
    id="graphicImage2"
    style="border-style:none;"/>
    <af:objectImage source="/images/map-usa.gif"
    binding="#{backing_map.objectImage2}"
    id="objectImage2" />
    We could use the Graphic Image control except we have a problem by mixing a JSF GraphicImage control in the same table with a variety of ADF Faces controls in that when a user clicks on the GraphicImage, then the browser windows scrolls down to center the GraphicImage control. A user then needs to scroll back up to see the rest of the page. If an ObjectImage control is used with an onClick action, then the page does not scroll, which is what we want. So if we can figure out how to add a client side map to an ObjectImage control we would get the desired results.
    An alternative might be to use a server side map with the ObjectImage control. But our question here is how to implement the existing client side image map in a backing bean. As the following map code shows, not all image map areas are rectangles - some are polygons.
    <area id="_state_05" href="#"
    shape="rect"
    coords="681,38,702,50"
    target="_self" value="VT" alt="Vermont"
    onclick="javascript:getDtl(this);"/>
    <area id="_state_06" href="#"
    shape="poly"
    coords="221,442,209,436,209,418,191,403,155,382,116,367,101,370,98,364,
    122,355,158,367,203,388,212,394,242,427"
    target="_self" value="HI" alt="Hawaii"
    onclick="javascript:getDtl(this);"/>

    Hi,
    Any news about that issue, we are also interested in any solution.
    Thanks
    Math

  • Change the amout a scroll bar moves when user uses the mouse wheel?

    hi,
    i have a JScrollPane, and when a user uses the "wheel" on the mouse, it seems to move up/down 1 line at a time...i would like it to scroll faster basically...so that when the "wheel", the scroll bars move up/down like 5 lines at a time....is there some way to set this value, or how can i do it?
    thanks

    It looks like it behaves just like if the user had clicked the up or down arrow on the scrollbar, so
    I would suggest setting the unit increment on the vertical scroll bar to be 5X its current value. Of
    course, this would also increase the amount that gets scrolled when the user clicks on the up
    or down arrow. If you don't want that, you'd need to somehow only change the increment on a
    mouse wheel event, do the scroll, then change it back. My guess is that you'll need to provide
    your own look and feel class to do that.
    : jay

  • How to download and keep multiple maps using Mac/E...

    I use my mac and this site
    http://nokiamaps.site666.info/
    to download maps via my mac to my E71. It works fine. I can install any map, however, only one map at a time.
    I would be happy if anyone knows and could tell me how to download and keep several maps active using my mac and E71. For example, I would like to have US, Japan and some countries in Europe loaded to my E71.
    I can of course keep several maps on my mac but I want to have them loaded to the E71.
    Can I have several maps loaded in the E7? Where to put the maps (which directory)?

    I do not know if anyone is interested but I have figured out one way to do it. Not the nicest perhaps but it works.
    On my mac I create a directory named MyMaps and then I download the maps I want and put them into directories (one directory per map). I copy using the -r flag, which merges/adds on files.
    For example if MyMaps is empty and I use:
    cp -r Sweden/* MyMaps/
    I will get the Swedish map in MyMaps.
    To add the map of Netherlands I simply do:
    cp -r Netherlands* MyMaps/
    I have now merged the map of Netherlands with the map of Sweden and all maps are in MyMaps. And I can add more maps by running cp -r again. And when I am done, I transfer the directory structure in MyMaps to my E71.
    I had some troubles with the diskcache structure. It worked fine for me to remove everything (all files) in the diskcache. They will be created when I move MyMaps.

  • Where do I see how many photos (and movies) are in my Revel library?

    I see no place that states how many photos or movies are in Revel.

    Hi Pattie,
    Thanks for the reply...but here's the status:
    A.
    I'm in the Revel program downloaded on my desktop...not on its web site...and I made an album but can't find any place where it shows the number of photos in that album.
    As I view Mel's Library page and go to: View/Added By there is a total in the upper left corner that shows the total photos Added by ME. 
    But when viewing photos in my library: View/ All Photos by Date in either Grid or Track there is no total anywhere on the page. Each track has it's total and that's it.
    I don't understand how Revel ID's a Duplicate. 
    A window, Skipped Photos, pops up and states, "X photos were duplicates" indicating that they were not uploaded - and that  is supported by the math (in 3 out of 5 uploads): Selected photos minus Videos and Dupes = # of photos uploaded.
    However, on the last upload of 2000 Selected photos, the window said there were 2 duplicates. I counted 19 identical photos! Also without Revel identifying what the dupes actually were (by its reckoning) I have no way of determining what was not uploaded. All VERY confusing.
    When uploading using the download program on my laptop Revel won't upload videos.
    B.
    I went to the website and yes, when I click on the album it shows the photo count at the bottom. However, in order to get to the bottom of 10,000+ photos in the Library is a major and lengthy process as clicking on the side bar only takes me down a few photos with each click...and not to the end! There's no way to easily get to the bottom!  Scrolling the photos is equally slow and useless when all I'm trying to see is the total count! click on Sort oldest 1st and the newest go to the top! and the reverse is true of the other!
    mel

  • How to delete history in OVI maps on 5800 ?

    How to delete history in OVI maps on 5800 ?
    Maps >  Drive >  Set Destination > History -------???   How do you delete the entrys that you no longer need ?
    I'm obviously missing something very stupid here, but for the life of me I cant find out what

    In maps home page, select the gold star favourites, then select either places or routes, select the item you want to delete and scroll down to the option to delete !
    Good Luck
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • I have 3 laptops and when i use google maps wanth to move the map its begin role oat of control and cant stop it

    When I use google maps in my three laptops one with XP one with Vista and then one with win7 64 when it happens that when I want to move the map when the map starts scrolling uncontrolled one way that can not be stopped without turning off the google maps ?

    When I use google maps in my three laptops one with XP one with Vista and then one with win7 64 when it happens that when I want to move the map when the map starts scrolling uncontrolled one way that can not be stopped without turning off the google maps ?

  • How can I transfer movies from one apple to another

    How can I transfer movies form my macbook pro to my apple air?

    If you have a wireless network, you can enable file sharing with each and transfer select data from one to the other via your wi-fi network.
    Or if you have an external drive used for backup purposes, you can transfer the movies that way.
    If you have Home Sharing enabled with iTunes on each and a wireless network, you don't need to transfer anything unless you want the movie available when away from home.

  • HT3819 how do I share movies/music between my computers. I have opened shared on both computers and both are on, but i am not able to drag anything from one to the other. Does anyone know where the settings button is on the bottom of the itunes screen?

    how do I share movies/music between my computers. I have opened shared on both computers and both are on, but i am not able to drag anything from one to the other. Does anyone know where the settings button is on the bottom of the itunes screen?

    Oops, I forgot a step between 7 and 8 ... before syncing the iPhone I need to explicitly send the document back to iTunes on the iPhone, or the changes won't come over at all ...
    and then one more thing ... Numbers on iOS does NOT recognize a number of key features of the OSX app, such as conditional formatting ... so after editing my document on iOS and syncing it back to OSX on my Mac, all of those settings are lost (no more conditional formatting, have to do it all over again)
    What am I doing wrong ?

  • How can I manually move photos off of my iPhone 5S to an external drive connected to my MacBook Pro?

    My iPhone does not show up as a device on finder.  My 4S did.  So how do I force move photos from the 5S to an external device?  I do not see an option for this on the NEW iTunes .

    Import the photos to you computer.  Copy them to external drive.

  • I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    I downloaded and bought a movie from iTunes on my iPad and now want the same movie on my MacBook Pro but its not offering me to download it, it giving me the options of buying it which I already did. How I get the movie onto my MacBook?

    You can connect the iPad to your Mac's iTunes and do File > Devices > Transfer Purchases, that should copy it over to the Movies part of your library.
    Depending upon what country that you are in, and whether the film studio allows it, you might also be able to re-download it on your Mac via the Purchased link under Quicklinks on the right-hand side of the iTunes store home page.

  • How do I delete movies from iTunes library? I have moved them to the iCloud and now only seem to have the option to hide the icon in iCloud.  I am sure I chose poorly at the 'keep file' window.  Please help. My Brain hurts- 18   movies need to go-.

    How do I delete movies from iTunes library? I have moved them to the iCloud and now only seem to have the option to hide the icon in iCloud.  I am sure I chose poorly at the 'keep file' window.  Please help. My Brain hurts… 18 plus movies need to go….  Thank you.

    Instead of removing the music from the cloud or the iTunes library why not shuffle your music using a Smart Playlist which excludes the holiday music, or tracks that are not checked. For example, use this very simple Smart Playlist:

Maybe you are looking for