ActionScript 2.0 :: Drag Scrolling An Unsolved Bug

Jun 5, 2007

I've got a play area that's larger than the stage, and to navigate I've put in drag scrolling. For all intents and purposes, this is just dragging the play area and everything on it so it maintains position relative to the mouse. The problem is that there is nothing to stop players from dragging all the content well outside the stage, any distance away from where everything SHOULD be.I have an idea of how this could be solved, but I don't know how to code it, nor if it will actually work properly in the first place. So please let me know, or suggest another idea, if it turns out I'm wasting my time with this idea.The plan is to create two invisible objects: the first is the exact size of the stage, with a position of 0,0; the second is the size of the play area, with a sizable margin. The latter of these two is dragged like the playfield and its content. While the two objects overlap, everything's fine, but when any part of them doesn't overlap, a bit of script will find out what edge(s) of object 1 are not being overlapped, and stop the ability to drag in that direction until things are rectified.Here's what I don't know, which that plan would require me to know:

1) Is it possible to detect when objects aren't entirely overlapping? I guess I could just make object 2 smaller than planned by twice the dimensions of the play area and use the normal collision detection method, but if it's possible to do things the other way, it'd be good to know.

2) I have no idea how to even start working out what edge of object 1 wouldn't be overlapping.

3) I also have no idea how to stop dragging in only one direction.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: 360 Scrolling Of Images - Click And Drag

Apr 8, 2010

This script works good as it is. I need to switch it from rolling over the image to a click and drag.

I need to make it act like this link. [URL] as opposed to mine. [URL]

Code:
var maxSpeed:uint=50;
function startScroll(event:Event):void {
event.currentTarget.addEventListener(Event.ENTER_FRAME, doScroll);

[Code].....

View 1 Replies

Dress Up Game - Drag Out Clothes Inside Scrolling Bar Location

Feb 13, 2010

This is my reference dress-up game website. [URL]. How to make the scrolling button and drag out the clothes inside the scrolling bar location? (Is it need to use the actionscripts 3.0 or 2.0,which coding should I write)?

View 2 Replies

Flex :: Scrolling Interval In A Spark List With Tilelayout Oversized While Using Mouse Wheel After Scrolling With Mouseclick

Aug 27, 2010

I have a spark List with an item renderer and a tile layout. If I scroll by clicking with the mouse on the scroll bar and trying to scroll with the mouse wheel after that, there is a problem: The interval of the scrolling is oversized, instead of scrolling one item down (or up) the List scrolls 4 items down (or up).

[Code]...

View 1 Replies

Flex :: Event When The Scroller Starts Scrolling Or Ending Scrolling In 4.0?

Feb 10, 2011

are there any events that the scroller will dispatch when being scrolled?

View 1 Replies

ActionScript 2.0 :: Scrolling Mc Not Stop When The Movie Clip It's Scrolling Ends

Jan 11, 2010

Im making a scrollable mc. Easiest thing in the world.... but the damn scoller just will not stop when the movie clip it's scrolling ends. It stops....eventully... but not close enough. What actionscript do I need to use and where do I put it?

View 1 Replies

ActionScript 1/2 :: Vertical Scrolling Menu / Seamless Scrolling?

Nov 13, 2009

I have created a vertical menu that scrolls through menu items in a movie clip.There is a big white gap when the movie clip runs out, and it snaps back to the beginning.I would like it to scroll seamlessly, having the end join up with the beginning again without any space.I would like it to scroll to one end of the list and STOP, and scroll back the other way and STOP - without any white space.URL...

View 1 Replies

ActionScript 3.0 :: Textfield With Easing On Scrolling And Mousewheel Scrolling?

Mar 26, 2012

How do I do a easing effect on scrolling and mousewheel scrolling in a Textfield?

Something like this [URL]

View 1 Replies

ActionScript 3.0 :: Scrolling Flash Pane On Scrolling WebPage?

Jul 1, 2008

This is a repost, but I've still not figured out a solution. I have a Flash movie that appears on a webpage. The Flash contains scrolling content ( scrollpane, text field, whatever).

The containing webpage is tall, and therefore also has scrollbars. My Problem: When users try to use the MouseWheel to scroll through my Flash scrolling data, the browser page scrolls as well. It's very annoying.

I would like to be able to have the MouseWheel scroll my Flash scrolling content when it's over the flash, but scroll the webpage when it's not over the Flash.

Does anybody know a way to supress wheel-based browser page-scrolling while my mouse is over a Flash movie??? Is there a way to eat/stop propagation, whatever, of the wheel event in the brwoser, either from Flash or from Javascript?

View 7 Replies

ActionScript 2.0 :: Scrolling Thumbnails - Not Scrolling - Involves Xml

May 4, 2007

I have been working on a site that will display a portfolio for a friend of mine who is a photographer. I want to have thumbnails that can be scrolled on the bottom of the page, and an area where the thumbnail is presented when selected. I have the thumbnails appearing. I have them loading, however, I can't get them to scroll when the mouse moves to the left or right of the row of images. he file can be viewed at...[URL] Here is the code I used for the slideshow:

[Code]...

View 4 Replies

ActionScript 2.0 :: Drag And Drop - Droptarget - Make Flash Drag A Ball Onpress

May 11, 2005

i want to make flash drag a ball onpress and if its onrelease and if its on the Suquare movieclip it should stop draggin. my code is like this

[Code]...

View 2 Replies

ActionScript 3.0 :: Drag And Drop - Click On The Image ,one Can Hold Down The Mouse And Drag A Copy?

Nov 13, 2010

I want to have an image and when I click on the image ,one can hold down the mouse and drag a copy to where ever on the stage and when one lets go, one can drag another and another with each copy still being able to be dragged after released.this is what i have but its pretty simple and doesn't work....

stage.addEventListener(MouseEvent.MOUSE_DOWN,makeA Box);
var i:Number = 1; //i will be the total number of boxes
var newBox:myMC = new myMC();[code]....

View 3 Replies

ActionScript 1/2 :: Make A Drag And Drop Game Where Can Drag Words Into A Table Which Then Makes A Tick

Nov 21, 2010

Im having trouble with this and its going wrong. I need to use actionscript 2 and im on flash cs3.

View 3 Replies

Actionscript 3 :: HitTestObject / StopDrag Stops Drag On Two Movieclips Even Though Function States One Movieclip To Stop Drag

Apr 27, 2011

I have a function that states when movieclip1 is dragged and hits a line then it stops the drag, however it seems to stop the entire drag function in the swf on the other movieclips even though they arent called in the function.[code]

View 1 Replies

ActionScript 3.0 :: Drag And Drop System Where The User Can Drag A Movie Clip Into An Area (Snap & Overwrite)

May 20, 2011

Im trying to do a drag and drop system where the user can drag a movie clip into an area. Although i would like to make it snap to a target instead of just sitting wherever it lands in the area. Problem Two:

The next thing i am trying to do is when the user has a movie clip on a target already, and trys to put another movie clip in that target area, it will replace the one thats in there and go back to its current position. Here is the script of what i have done so far:

[Code]...

View 14 Replies

ActionScript 2.0 :: Drag All Clips When I Drag Single Movie Clip?

Mar 23, 2010

I have some movie clips. i want to drag all clips when i drag single movie clip. Ex. I have movie clips "A1", "A2", "A3", "A4", "A5" . Randomly visible some of them. Suppose "A1", "A3", "A4" has visible. When i will drag "A1" movie clip all these "A3", "A4" also move with "A1".

View 6 Replies

ActionScript 3.0 :: What's The Code To Start Drag And Stop Drag

Jun 4, 2010

What's the code to start drag and stop drag. I would also like to know what's the code to detect if the object has been dropped on something. I know the code in AS2 but i cant figure it out in AS3.

View 3 Replies

ActionScript 3.0 :: Creating Drag / Drag + Scale Class

Nov 29, 2010

I am very new to AS3 and I am running into some issues creating a simple class that will allow you to drag and drop and object but then also scale when it is over a hit area. Here is my current code:

[Code]....

View 5 Replies

ActionScript 2.0 :: Stacking Drag Movie Lagging When Drag?

Jun 20, 2005

i have load in a .swf and this .swf is make up of one drag object. When i load into my _level0, i can drag it but it seem then the drag is not smooth, instead it is lagging. Thus i went back to the indiviual files and try to drag on it and it was not lagging. ...why is it like that? All the files are still on my local disk.

View 4 Replies

ActionScript 2.0 :: Drag And Drop Mask - Mc Drag In The Same Time

Jan 31, 2011

Wen i drag mc2 i want mc1 drag in the same time.

View 1 Replies

ActionScript 3.0 :: Start Drag Stop Drag

Jun 10, 2010

I am creating a Flash website (AS3) which contains multiple columns of swf's. These all have individual "start drag and stop drag" vertically and works fine. My problem is when I try to create start drag stop drag on top of these swf's horizontally - I want to be able to move the whole stage horizontally containing separate columns.

I am not sure how to code it and it ends up locking the "start drag top drag" inside the columns. How can I do this so that each column is scrollable and scroll to other columns without using a scroll bar...

View 2 Replies

ActionScript 2.0 :: Press Start Drag On Press Stop Drag?

Jun 17, 2005

i have an object that i want to drag and drop with the same event.Something like on press start drag and on press again stop drag. I'm sure it's pretty simple with and if and else statment but i can't find how to do that...The best i have done so far was this:

[Code]...

View 4 Replies

ActionScript 2.0 :: Scrolling To XY?

Mar 21, 2007

I've been looking for an actionscript that will allow me to scroll to specific xy points on a website I'm recreating in Flash. I found one that kind of works well with a ease into xy position, but I was wondering if anyone came across one that works more like a scroll to location.

View 12 Replies

ActionScript 3.0 :: Scrolling X Not Y?

May 20, 2009

Working with this code from a tutorial:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myGalleryXML = new XML();

[code].....

What is does is create a photo gallery. In this case the thumbs are scrolling on a Y axis. while i want them to scroll on a X axis. Been playing around with the code but havent really achieved the result i want. [URL]

View 1 Replies

Scrolling A Image Left Or Right?

Aug 18, 2006

how to allow the user to scroll a graphic either right or left. when the user moves the mouse to the left or right side I want the image to move the other way (if mouse is at the right the graphic moves left), but stop when when the user gets in the end of the image.

View 2 Replies

Scrolling Left And Right Within An Animation?

Mar 19, 2009

I am making an animation and i would like the user to be able to navigate through it by moving their mouse to the left and right. It is something similar to the fly guy environment [URL] but i want it to only move left and right, and use the mouse not the keyboard.

View 2 Replies

CS3 Mouse Direction Scrolling?

May 11, 2009

I designed a horizontally oriented page that expands to the right. The problem is, the content goes off the screen.

I want to know how to make all of the content on the website scroll with the mouse direction like this webpage- sectionseven.com

Does anybody know how to do this or something similar?

View 21 Replies

ActionScript 2.0 :: MX Scrolling Works Only Once

May 26, 2009

I made a scrolling text box that I feed xml into. The only thing is when I scroll down or up I can only get it to work once.

[Code]...

I want it so that every time I that I press the button that I scrolls down.

View 6 Replies

Scrolling The Timeline Glitch?

Jul 8, 2009

I'm trying to create a scrolling timeline using a very (horizontally) long image and a scroll thumb that can be dragged right and left. When I first open the .swf file, the position of the image is correct (the far left side is on the stage). But once I click on the thumb and release it, even if I don't drag it, the image jumps as if it was dragged and suddenly I'm looking at another part of the timeline. When I drag the thumb all the way to the left, it can't go any farther left to the beginning and it's just stuck at where it jumped, but I can drag the thumb more to the right and see more of the timeline perfectly fine. Also, when I scroll all the way to the right, the timeline goes past its end and then there's blank white space. There's obviously some space missing at the beginning that should make up for that blank space at the end.

why it jumps like that and why I can't drag it back to the beginning of the timeline. In fact, I used this exact same code for another project and the timeline worked perfectly fine. All I did was use a different image for this one. I'm completely stumped on this.

Here's the actionscript I'm using:

Quote:

stop();
var thumbLeft = thumb._x;
var thumbRight = Stage.width - thumb._width;
var thumbDistance = thumbRight - thumbLeft;

[code]...

View 2 Replies

Scrolling Menu With Thumbnails ?

Jul 23, 2009

I'm building a site with flash (obviously) and it has multiple pages, now on one of these pages i wanted a scrolling menu with thumbnails that when you click them they take you to another page, but I'm not quite sure how to go about it. The methods I already tried haven't worked.

View 9 Replies







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