ActionScript 2.0 :: Make A Map That Can Be Dragged Within An Area?
Apr 19, 2010
how to make a draggable map but the map can only be dragged in an area. let say if i did a rectangle as the limit,so the map can only be dragged within the rectangle... outside of the rectangle cant be dragged and cant be seen...
View 9 Replies
Similar Posts:
Nov 28, 2009
I have set up some objects so that they can be dragged and dropped into an area(suitcase). This works fine but the thing is that when I move to another part of the timeline the object is put back in the same position it was in before being dropped in the suitcase. I need to be pointed in the right direction with this:
a) If an item is dropped into the suitcase then a message is displayed saying for example "you packed the socks"( I think I can handle this).
b) The object should stay in the case and be displayed there until the interaction moves on(I need this to happen).
c) The user must pack all objects before moving, so I need a way of recognising all objects are packed so that the user can move on..(I need this to happen).
View 3 Replies
Jun 13, 2011
I've made a big empty circle, made it into an MC and it has the instance name of "MC"
I've made a small circle, made it into an MC and it has the instance name of "button". It's placed in the center of the big MC. The button MC has 2 frames, one with the small circle being in the middle, the other one with the small circle being at the edge with a pin under it.
I can't figure out how to do this, which is: when the user grabs the small circle, he can only move it around in circle at a fixed distance from the center of the big MC, thus not leaving the big mc area. When the user starts dragging the button, it should go to frame 2 in the button.
What I try to do here is a joystick, when the user releases the mouse, the joystick head goes back to the middle. When dragging the joystick head, the stuff on frame 2 inside the buttom mc should be rotated having the bottom of the stick fixed to the middle of the big circle.
Here's sadly the only code I have:
Actionscript Code:
button.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEvent);button.addEventListener(MouseEvent.MOUSE_UP, mouseUpEvent);function mouseDownEvent(e:MouseEvent):void {
[Code]....
View 1 Replies
Mar 29, 2012
I want to have a score in the bottom corner of my game. I made a new layer called Score, dragged out a text area, converted it to a symbol and named it Score. Then I set its instance name to Score.
The main class of my flash game is called Main.as. However, I can't seem to access the Score text area I made within the code. I get this error:
1046: Type was not found or was not a compile-time constant: Score.
What did I miss? How can I update the text areas text from within my code? Edit: Forgot to mention I clicked the "Export for ActionScript" box when I converted it to a symbol. And it's of type MovieClip, if that matters.
View 3 Replies
Jul 28, 2009
i have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)
[Code]...
View 1 Replies
Jul 20, 2010
I wanna make menu buttons to be dragged to navigate, I could drag the menu up and down with the as3 as follow.
but whenever click it to drag again, starting point of the menu move where I click on the board. I want to make the menu start to move from the point the mouse out.
I think this part should be done with something else.
" menu.y = board.mouseY; "
ActionScript Code:
var board01:Sprite = new Sprite();
stage.addChild(board);
board01.graphics.beginFill(0xCCCCCC,0);
[Code].....
View 2 Replies
Jun 2, 2011
I am creating an exercise to teach the meaning of the word "take". I want draggable objects (MC's) which will automatically snap to a different position when they are dragged a little way.
This is the code I am trying (not mine I'm afraid). I have it on the same frame as the MC in "Actions - movie clip". The MC is draggable but doesn't snap.[code]...
View 3 Replies
Aug 4, 2009
What button event should I use to make the program understands to DO SOMETHING only when the button is pressed/dragged. In my sample code below, I want something to happens only if the button is dragged beyond 200 in y axis. I tried onRelease, onRollOver and onDragOver but still not working
[Code]....
View 6 Replies
Dec 6, 2009
I am getting familiar with the Flash animations I am trying to make a simple animation within the text input area i.e.
1.FAN BASE
2.FA NBASE
What I want is the letter N to move slowly towards letter B.I have done motion tweening but it doesn't work -either the whole text is moving left right or the letter N is simply skipping to the second position without smooth animation.( there's no error on motion tween by the way)
View 4 Replies
Mar 18, 2010
How can you make the entire thing for drawing bigger? Not just the white space. Cause I'm making a scroller game..
View 1 Replies
Aug 11, 2005
is there a way to make a Text Area transparent?, I'm using this code:
_level0.taDescription.depthChild0._alpha = 0;
and works, but then, I'm loading that SWF in another SWF and I loose the alpha property?
View 2 Replies
Dec 5, 2009
Of course, when the mouse rolls over the graphic, the button beneath it is not clickable.Without going into all the reasons why I can't incorporate the graphic into the button itself... is there a way in AS3 to programmatically make that graphic virtually "transparent" - so that it doesn't interfere with the button's rollover and hit states?
View 2 Replies
Jan 31, 2010
im using a free template from online but I dont understand how to make the content area bigger on the scroll box.
var sd:Number;
var sr:Number;
var cd:Number;
[Code].....
View 9 Replies
Oct 15, 2010
I'm trying to know if there's a way in ActionScript 3 to load a PNG image and make some sort of button or sensible area applicable only for the visible area of that PNG??Maybe there's a simple way to define a polygonal area on execution time, I mean, dynamically and make it sensible to mouse events??
View 4 Replies
Oct 8, 2009
I'm having trouble with a custom mouse cursor. In my script I replace the original mouse with a movie clip called hand like so:
Mouse.hide();
hand.x = stage.mouseX;
hand.y = stage.mouseY;
But when I go to click on something it uses the mouse's pointer still. I'd like to be able to drag with any part of my custom cursor(which is larger than a mouse).I've tried making a hit box that detects when the mouse is near the clip but it doesn't work onsistently(sometimes it just clicks like normal).Is there to make the clicking area of the mouse change?
View 3 Replies
Mar 29, 2011
I want have a mc called LDL travelling across the page and as soon as it comes into a specific range on the page ( drops the cholesterol off at a random point in this range) I want the cholesterol molecule to fall and build up on the bottom of the page and on top of eachother.
I managaned to get the LDL moving and the cholesterol molecules falling when I select the no and press the button, but only 1 cholesterol ball stops, the rest just pass through.
View 2 Replies
Oct 17, 2007
I'm trying to make a button symbol with a transparent hit area - surounded but a dynamically drawn border. Heres what I have. I have a simple AS script that uses goTo and lineTo (plus a randomizer to make sure the buttons are skewed and differnt everytime) to create a "sketchy box" as my button. My script resides in a movie clip withing the "over" state of a button symbol. Now the active hit area is ONLY the line elements. Question : How in the world, using only actionscript an I make a second, transparent area inside of the sketchy lines to make the whole button symble clickable?
View 5 Replies
Jun 18, 2009
I'm using actionscript to place a bitmap into an empty movieclip like so:
var bitmap_mc:MovieClip = new MovieClip;
addChild( bitmap_mc );
bitmap_mc.addChild( bitmapPNG );
bitmapPNG is an irregular shaped png of a person, but when I use the movieclip as a button, the hit area is the square shape of the movieclip, not the silo. How do I make the irregular shape of the silo the hit area, and not the surrounding square of the moviclip?
View 2 Replies
Sep 25, 2011
I want to make auto width text area. Using xml to pull the data, I would like to expand as data comes in. menu_item_group["menu_item" + i].item_label = nodes i].attributes.item_label; For example: enlarged according to the context menus in this example, the background [URL]
View 1 Replies
Dec 19, 2011
I'm doing flash project slide images but i don't know how set images into area correct position. And textfield load file .txt.
[Code]...
View 3 Replies
Dec 14, 2010
Which Flash Component should I use? DataGrid, ScrollPane, TextArea?
View 1 Replies
Dec 31, 2007
I have a 400x300 area that needs to detect a rollover and animate several buttons, text fields, etc. sliding into it when the mouse rolls into the area so that they can be manipulated, and animate them sliding out when the mouse rolls out of the area to hide them from view. (example here: [URL])
What is the best way to do this? The only way I have got it to work so far is by using a listener to track mouse position, but it's not reliable since you can move the mouse quickly in some areas of the movie and the listener doesn't catch it.
[Code]...
View 1 Replies
May 28, 2009
how I can make a movieclip randomly slowly float around within a certain specified area on the page? The way I'm doing it now.. is I use TweenMax.. set a bezier, and have the object tween randomly every 20 seconds to a random spot using the Timer class. This is looks okay.. but I'm sure there's a better way to do it so I can control the area which I want it to float within more easily.
View 14 Replies
May 11, 2005
how can i make my work space area bigger in flash MX 2004?
View 2 Replies
Apr 3, 2006
it is possible to make a movieClip that containes some buttons, input/dynamic text area, but the action script to be taken from an external actionscript file (.as)?I ask this because i have some buttons that calles me movieClips who have actionscript applyed in them, i see that i have some error's because of the actionscript (the .swf file blockes at one moment, and i don't know why ) and i want to call the actionscript file (.as) to button when i press one button that displays me the movieClip attach to him.
View 5 Replies
Mar 5, 2005
how make my buttons load text or images into a set area on a flash site.
View 3 Replies
Aug 5, 2011
I have this function:
public static function cloneDpObj(target:DisplayObject):Bitmap
{
var duplicate:Bitmap;
[code]....
to clone target displayObject (MovieClip or Sprite) and return Bitmap Object.
It can get bitmap from the target object, but it seem don't get all the area of the image.
By give the width and height of target object, but the target object in design was applied by Glow Effect, so my question can we get the all view of bitmapdata from a displayobject?
View 4 Replies
Sep 29, 2011
I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.
View 1 Replies
May 21, 2004
I would like to first add the xml to my flash. Fine I can do this.But I have a number of buttons, where when I click say CW1, i get the information from the XML file with a node of CW1. I have all the xml set up fine.As I have about eight different postcode types.
ST, CW, CH, TF, WV, WS, DE, SK, SY, and each of these may have numbers that follow, i.e ST1, ST2, ST3 and so forth.
So I can only assume that the postal area could be the main nodes, and the numbers inside the child nodes, am I right thus far.o how can i load the area of the xml file into my text area on mouse click, pulling the information relating.
View 11 Replies
May 30, 2004
However I'd need to be able to draw *only* on the board area (a 450 x 350 pixels area) instead on the whole movie... how to "tweak it?" Here's the fla: [URL]
View 8 Replies