ActionScript 2.0 :: Map Scrolling - Show A Portion On Screen ?

Sep 6, 2006

how to do the following.

I have a map, placed on the stage in its entirety.I only want to show a portion of this on screen though. Then as the mouse moves to the edge of this visble frame I want to pan over the map in that direction. just can't work out how to do it. It must be a relatively simple process but for the life of me I can't work it out.

I'm thinking maybe some kind of mask then you move the map around beneath it? I've been trying to use a couple of scrolling tile-based games tutorials but this is less complicated and I can't sceen out all the extra stuff the game tutorials are doing.

View 3 Replies


Similar Posts:


Flash :: Show A Bitmap Which Is Only A Portion Of Its BitmapData In AS3?

May 14, 2011

I am writing a screen scroller for a game I'm making. There's a BitmapData object which holds the background graphic, yet I do not want to show/render it on screen all at once.

For example, I want to show only a 500x500 section of the data but the entire BitmapData is 1000x1000. I wanted to use the scroll() method to scroll the data but my problem is that I cannot restrict how much of the BitmapData is drawn on the Bitmap. I tried setting the height/width properties of the BitmapData to 500x500 (and draw all the 1000x1000), but any data drawn beyond the boundaries I defined is not really drawn.

Another option I considered is to store a different BitmapData object which holds the entire data, and then use copyPixels() from it to the one used on the Bitmap itself, although then I cannot use scroll() and have to use different methods to achieve scrolling.

View 4 Replies

ActionScript 3.0 :: BitmapData Alpha Scrolling - Without Leaving Streaks Of The Side Of The Screen And Without Repainting The Entire Screen

Mar 6, 2012

I'm making a side-scrolling game, with a (theoretically) infinite background. I have a block engine that places the blocks on the bitmap canvas. Now here's the catch. I'm using the bitmapData.scroll() function. Now unless I clear the screen each time the character moves, it's going to leave ghost images of the border of the screen, like this picture: zanzlanz. tumblr. com/post/18857712784 If I clear the screen each time, then it generates a lot of lag (because it has to repaint the objects again). I'm a bit lost on how I can scroll without leaving streaks of the side of the screen and without repainting the entire screen.

View 1 Replies

ActionScript 2.0 :: Show Date And The Link Zooms Up And Fills The Screen Giving Show Info?

Mar 9, 2004

I'm fairly new to ActionScript and was wondering if anyone had an idea how this effect was done:[URL]..Click on a show date and the link zooms up and fills the screen giving show info. Then when you click the back button it shrinks back to where it was on the calendar.

View 3 Replies

ActionScript 2.0 :: Scrolling Number Does Not Show Up?

Apr 21, 2008

when I started my movieclip was simple...its an info popup that comes up when someone clicks another movieclip on the stage...anyhow, when it comes up it looks like a projector screen that is being pulled down...there is also a number in the top right that is supposed to be scrolling...there are two problems with my popup...

1) the scrolling number does not show up...

2) the content in the info popup refuses to stay invisible until the "screen" is pulled all they way down...

the first link shows what the scrolling number is supposed to look like...I did not change anything regarding the scrolling number when I altered the content to fit and look decent in the info popup..

View 1 Replies

Linking XML Slide Show With Scrolling Menu

Apr 25, 2006

I finished my slide show using xml.of course only one picture shows (loads) as my navigation is...the scrolling menu, so there is not click next button as in the xml slide show tutorial.I also finished, as you can see, the scrolling menu movie...i would not use the xml slide show technique with this as you would always have to manually go in and update blank boxes to load pics into as they are not overlapping in the same space.although you super coders can...im just not there...this is my first project with any coding, and im copy and paste man.how do i make it where my buttons in the scrolling menu call up the images from my xml document that created my slide show?[code]

View 14 Replies

ActionScript 3.0 :: Keep An Image On Screen While Scrolling?

Sep 16, 2010

Is it possible to keep an image at a static location on the screen when the page is scrolled down?
 
For instance, if I have a .swf with properties of 1700 px height and I am displaying an image (jpg) in a loader whose y position is 40px from the top of the screen when viewed in a browser.
 
is it possible to "float" that image so that it stays 40px from the top of the browser window when the user scrolls down to see the rest of the page?
 
I'm trying to set up a gallery and have a grid of thumbs displayed, each of which open a full-sized copy of the image on the thumb.
 
The thumbnails go beyond the bottom of the screen and when I scroll down to see more thumbs, if a large image is displayed at the time, it scrolls off the top of the screen.

View 4 Replies

ActionScript 1/2 :: How To Make Scrolling Text To Appear On Screen

Mar 24, 2011

I am trying to make scrolling text appear on a few screens, so that when I click on a button to go to the next frame the characters of a sentence will appear one after another as if someone is talking. This works a few times however when I go back to the first frame the following error occurs and the text no longer appears??

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at rollingtext_fla::MainTimeline/runthree()
at Function/[URL]::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

This is my code basically the same for each new frame
stop()var talkinterval=setInterval(runone,60)var i:Number;
i=0 function runone() { var text:String = "Restrictive signs come in red and blue circles."; text1.appendText(text.charAt(i)); i++; };
b_next.addEventListener(MouseEvent.CLICK, nexts)function nexts(e:MouseEvent){ clearInterval(talkinterval) gotoAndStop("h")
}

View 2 Replies

ActionScript 3.0 :: Scrolling Through An Image Bigger Than The Screen?

Jan 5, 2012

Simple question, pretty new to action script and not too sure which would be the best way of implementing this, but how would you scroll through an image if it is bigger than the screen. What I am thinking right now is simply dragging and dropping the image but that doesn't seem like the best solution.

View 1 Replies

ActionScript 2.0 :: Full Screen Scrolling On External SWF's?

Feb 3, 2008

I am loading external SWF files into a blank movieclip (content1) Problem is each SWF is different in height.I need to be able to do a full screen scroll but the scroll will only work with the main stage height, Is there any way to make the page scroll to the bottom of each external movieclip? At the moment it either clips off or I have to set the stage height to something like 1200px to scroll through all the text.

View 2 Replies

ActionScript 3.0 :: Screen Scrolling As Character Moves To Edge

Sep 16, 2009

I am trying to make my screen scroll as my character moves to the edge of it, but when I get to the edge of the screen nothing happens, I think this could be something to do with my registration points but I'm not sure. I have added trace statements for debugging but no luck. I have included my Fla so you can see what I mean.
Here: [URL]

Here is the code I am using to try and make this happen
PHP Code:
// scroll the LBground if character gets past half way up or down the stage
function scrollLevel():void {
// Horizontal scrolling
var horizontalCentre:Number = stage.stageWidth / 2;
var horizontalPosition:Number = LBground.x + Mchar;
[Code] .....

View 2 Replies

ActionScript 3.0 :: Smooth Out Scrolling Relation To Where The Mouse Is On Teh Screen

Jan 27, 2010

I have some code which moves back and forth through my menu so that it scrolls in relation to where the mouse is on teh screen. The problem is that I cant get it to scroll smoothly and is a little jerky... I want to ass maybe some smoothness or maybe a little lag to it so it just seems more smooth. I have pasted the main code I have so far below.. I am using AS3 at the moment.

[Code]...

View 1 Replies

ActionScript 3.0 :: Text Dynamic Scrolling Right To Left In Screen

Oct 6, 2011

I am programmer , C# is my programming language.I started known about FLASG a few day ago. I am very, very interesting about its.My boss want i make a text display in bottom screen and scrolling from right to left (same as display on TV).But, i used to keyframe to solved this solution but they are slowly and not smooth. Now i want text display running smoother.I not good at Flash .

View 1 Replies

ActionScript 2.0 :: Make Full Screen Scrolling In Flash MX?

Apr 21, 2003

how to make full screen scrolling in Flash MX? Like in a platformer game.

View 1 Replies

Preloader Does Not Show Up On The Screen Flash3 ?

Apr 29, 2009

I have a preloader in the fist frame of my movie. My movie has child movies (photo galleries). These are swf files that are linked to the main movie. When I simulate download, the preloader does not show up the fist 50% of the loading time. Then it shows up and works fine. I went to the loader in the Library. Under Linkage, I clicked EXPORT and uncheked "export in first frame". It didn't work. I have still the same problem. Can anyone help me. I am using Flash 3 Action Script 2 Additionally, when I simulate loading my photo galleries that are linked to the main movie don't show up. this is the code that I am using for the preloader: stop(); LoaderInt = setInterval (Lbar, 10); function Lbar (){ if(getBytesLoaded() >= getBytesTotal()){ play(); clearInterval(LoaderInt); } fill_MC._xscale = (getBytesLoaded()/getBytesTotal()*100); }

View 7 Replies

ActionScript 3.0 :: Preloader Does Not Show In Screen

Nov 22, 2009

I got a movieclip named LoadingProgress (exported in first frame and class name LoadingProgress), inside it is a dynamic text box with instance name percentDisplay This is the code for LoadingProgress.as

[Code]...

View 1 Replies

ActionScript 3.0 :: Make Scrolling Terrain - Scroll Down The Screen In Random Positions

Nov 12, 2011

i need to make scrolling terrain but dont have how to do it for the code? What i want to do is 5 objects lets call them A,B,C,D,E scroll down the screen in random positions

View 15 Replies

ActionScript 3.0 :: Full Screen, Fixed Aspect Ratio, Non Scrolling Background?

Dec 12, 2009

I am trying to emulate an effect like this site uses...

[URL]

and I've basically poached their script, a jQuery initiated 100% width and height background that loads into a couple of holding containers.

The thing I would like to do differently is fix the background in place so the content can scroll over it. How can I, say, write the flash movie to the BODY background or something like that? I'm not a javascript wiz and am not sure how I might do this.

View 3 Replies

Flex :: Show PopUp With In The Screen Area?

Jul 19, 2010

when i trying mouse over right side last images popup is going out of the screenHere TalentInfoPopUp is **TitleWindowThis is my sample code

private static var staticWindow :TalentInfoPopUp = null;
private static var visibleWindow:TalentInfoPopUp = null;
public static function show(t:Object, parent : DisplayObject, x:Number , y:Number):void

[code].....

View 1 Replies

ActionScript 2.0 :: Show Hints Appear On The Screen For 100 Milliseconds?

Dec 15, 2005

I want to show hints appear on the screen for 100 miliseconds. What is wrong with this function? "txt._visible=true" line never executes.

Code:
txt._visible = false;
btn.onPress = showHint;
function showHint() {

[Code]....

View 6 Replies

Actionscript 3 :: Automatically Activate The Browser's Vertical Scrolling When A Popup Is Too Large For The Screen?

Oct 27, 2011

I have a flash application that utilizes a lot of popup title windows that do not have parent containers. I'm having a problem when users with smaller resolutions try to use my application because the popup utility windows will often be too large. Note that I do not want to re-size the window as that would eliminate a lot of it's clarity and separation of menu bars and tool icons. I just want my application to detect if the window has a height or width property greater than that of the browser's view frame and then activate the respective scroll bar should it be needed.

View 2 Replies

ActionScript 2.0 :: Stop Character Walking From When Road Scrolling Reach The Edge Of Screen?

Mar 1, 2008

here i have a zipped fla file where i have problem with the character still wallking when road scrolling reach the end of the screen.how would i stop that?heres script:

Code:
//road scrolling
road.onEnterFrame = function() {

[code]......

View 7 Replies

ActionScript 3.0 :: Create A Scrolling Background Whilst Keeping The Car Static In The Centre Of The Screen?

Aug 17, 2011

Ok i have been looking at a racing game and have used the tutorial from this link here:[URL]...What i am having trouble with is trying to create a scrolling background whilst keeping the car static in the centre of the screen. Ane example of what im trying to do is here:[URL]...So i have tried incorporating the code from that scrolling background example, into the car racing game itself but i am having trouble doing so. Is there any way that the code used from the scrolling background can be input into the racing game example to create this scrolling background effect?

View 1 Replies

ActionScript 2.0 :: Refreshing Makes Previous Screen Show?

Jul 23, 2009

The code that I'm working on is HUGE (over 10 .as files, each with 1000+ lines), so I won't post any of it, but you should be able to follow the general idea.

What I'm doing is loading movieclips within movieclips.

For example, let's say I have a movieclip with a black background and two buttons. When I click on one of the buttons, it loads an XML file which contains labels and images and data. However, this XML file is loaded INTO the same movieclip, so that it is kinda on top of it. That means that the black background is completely covered up by the new images loaded. However, since the XML file is getting changing data, I have a refresh function which removes the XML movieclip and loads it again.

The problem is that when the XML movieclip gets removed temporarily to refresh, the black background and buttons underneath can be seen and that doesn't look very good.

The code is too extensive for me to figure out how to put everything into a new movieclip dynamically.

What I thought of doing was to create a movieclip in between these two movieclips which displays a blank white screen. I got that to work, but I had a few problems with the back button because now it needed to remove two mcs instead of one. However, that is also working now. Is there a better way to do this instead of creating a blank mc?

The ACTUAL problem I have is this: When the page refreshes, the labels from the XML file remain...which makes it look ugly before the pictures get loaded. I think that this might just be that the labels load a lot faster than the pictures, thus, giving the illusion that they never refreshed in the first place; I'm not sure about that though. Is there any way to get the images to load before the labels get reloaded (if they do in fact get reloaded)?

View 1 Replies

Professional :: Android / AIR Show Last Screen Left Off When Re-opened?

Jun 13, 2011

I made a little trivia game that loads questions from an xml file. The problem is, if you leave the app and come back to it, it starts you back at the start screen again. Is there anyway to overwrite this, or is it the same as refreshing a browser page with a Flash animation on it, it'll always keep restarting?

View 5 Replies

ActionScript 2.0 :: FMX - Screen Is Blank And The Preloader Doesn't Show

May 9, 2004

I have a small problem with a preloader in Flash MX. It seems to become stuck at "frame 0" instead of showing the preload bar, etc...and I didn't know there was a "frame 0"? When I test it with "show streaming", the screen is blank and the preloader doesn't show, then, when the movie is done loading, the preloader flashes up briefly. I have 2 frames on my main timeline. Frame 1 is the preloader, and frame 2 contains a clip which constitutes the main movie. Frame 2 has stop() and both are labelled correctly i.e. when the movie is finished loading gotoAndPlay("movie") (frame 2) is executed.

View 3 Replies

ActionScript 2.0 :: Why The Textfield's Text Doesn't Show On The Screen

Nov 8, 2003

I have one textfield which is presented like _root.screen1.screen2.textfield1

screen2 is the movieclip within screen1. They are movieclips and textfield1 is the textfield

I tested like
_root.screen1.screen2.textfield1.text="Hi, can u see me?";
trace(_root.screen1.screen2.textfield1.text);

Then I can see the result of trace which have the text I wrote, but I cannot see anything on the screen.

why it is like this and how to modify then ?

View 9 Replies

ActionScript 3.0 :: Object Does Not Show On Screen Once Re-added To Display List?

Nov 3, 2011

I have an object that is instantiated, then placed into a property within a singleton (single instance) object. When a button is clicked an event is dispatched carrying a payload that references the display object that is held within the Singleton. When the event is heard, my view object adds the object to the display list e.g. addChild().The Item shows. Now If I hit another button an event is dispatched, and a new item is added to the display list via the method above and is seen. The 1st object is removed from the display list Here is my problem. When I click the button to load the 1st Object the above process is executed again but the object does not show.

I can run trace statements from the object that is supposed to be visible and they run fine. I even do a check to see if the visible property is set to true, and it is, but not object is on my screen. Code for this process.

//custom event carries the name of the page aka display object. this is a string
dispatchEvent(new MenuEvent(MenuEvent.CHANGE_VIEW_STATE, event.payload));
//When the event is heard, the following condinial is run

[code].....

View 3 Replies

Actionscript 3 :: Flex - Display Welcome Screen On First Launch With Checkbox For Never Show Again

Mar 17, 2012

I need to display a "What's new in version x.x" Dialog with a checkbox to allow users to not show the dialog on future launches. Can anyone help me by telling me what I need to look up in the api, or possibly an example?

View 1 Replies

ActionScript 3.0 :: Show A Screen Before A Long Execution Script Runs?

Aug 22, 2011

I want to show a movieclip that says something like "please wait" before I run a function that takes a few seconds to fully execute.

below is what I have tried but it doesn't work...

ActionScript Code:
//pleasewait is a movieclip on the stage in flash professional
pleasewait.visible = true;

[Code]....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved