ActionScript 2.0 :: Change Mc Position Around Canvas?
Mar 2, 2005
Im trying to make a Mc to move around the canvas according to the mouse position. The Mc follows the mouse on the _y coordinates.Now I want to make it change position on the _x coordinates according to the mouse.It is working fine on the _xmouse position, but Im not getting it to work in the _ymouse position. Id like the Mc change position when the mouse is over a determined are on the stage.This is the code Im using
Code:
onClipEvent (load) {
this._x = 750;
//set original x[code].....
View 1 Replies
Similar Posts:
Feb 3, 2012
I have simple image gallery, where images are placed one next to another and the mask is revealing only one of them. Now I want to tween position of the images, but when I do that the mask is "traveling" alongside with the images..
View 4 Replies
Apr 18, 2011
I'm making small image editor which crops/resize an image. Everything worked perfectly until very last moment. Canvas don't want to be captured from scrolling position: only from left top corner.
Question is: how can I use .captureimage of a canvas from scrolling position?
import mx.controls.Image;
import mx.events.FlexEvent;
import mx.graphics.ImageSnapshot;
[Code].....
View 1 Replies
Sep 3, 2009
If the size of canvas set in the MXML markup, some part of the components that go beyond the boundaries of canvas not displayed. If the canvas size to change dynamically(canvas.width, canvas.height), canvas boundaries are virtually absent. How to dynamically change the size of the Canvas?
View 2 Replies
Oct 31, 2009
I would like to have that the height of a canvas change automatically. When there are a lot of labels and images in my canvas, the height must increase. And when there are just a few labels in the canvas, the height must decrease.
In fact i want something like in CSS:
height: auto;
View 1 Replies
Mar 23, 2012
I'm developing a Zoom tool in my Flex App, so I'm using scaleX and scaleY property to simulate this behaviour.But when I scale my Canvas, its size change as well (obviously). The problem is that I have this Canvas inside another Canvas, so the first Canvas can't be smaller than the second one.Here is an image before and after apply zoom changing scale property in both axis:At the left, the original Canvas. At the right, Canvas after update its scale (red rectangle is the original size at 1:1, and green is after resize).I need to extend the Canvas to take up the red rectangle (not the green).
View 1 Replies
Sep 27, 2011
I'm working on creating flash games site and want to make the facebook application version of it. As the site width is bigger than canvas default width I'm trying to find the way to check if the site is loading inside facebook canvas and change the width accordingly.
View 1 Replies
Jun 5, 2009
I have the following code in my flex project.
[Code]...
I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.
View 1 Replies
Jan 2, 2010
If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?
This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;
View 9 Replies
Apr 9, 2011
I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...
View 2 Replies
Nov 3, 2009
I want to reduce the size of Swf using the size mentioned in the object tag of html. Same swf file size can be different for different request.
The problem is this if we reduce the size all control in swf reduced according to the change in swf size. But we want the buttons and one more graphics remain same size for any change in size of swf file. How can we make it ..
View 1 Replies
Feb 24, 2011
Basically I want to go to frame2 when the cursor leaves the canvas. The code below contains no errors when tested but it still does not work.
[Code]...
We know that the function gotoAndStop(frame2); works in multiple situations which means the first 3 line is fine. I don't know if the problem is the MOUSE_LEAVE event or this.stage which i suppose is the identifier for the canvas. I sure that there must be an alternative code for the identifier this.stage or the whole code. Any solution on how to fire the given function in the event when the cursor leaves the canvas?
View 2 Replies
Mar 16, 2009
I've made an image slider in flash and need it to slide out at it's current position before changing scenes.
The code i'm using is -
onClipEvent(load) {
_root.newXpos = 0000
speed = 10
[code]...
I need the '_root.newXpos = 0000' to tell the movieclip to stay in the X position it is currently in (it will be different each time as the user can move the movieclip via buttons, so a simple Xpos = 0000 won't do)Alternatively, I've tried adding -
on (press) { _root.newYpos = 476.2;
if (_root.Ypos =476.2);
gotoAndPlay ("Pxcotos", 1);
}
on a button but the scene changes before the movieclip has a chance to slide out.
View 4 Replies
Oct 22, 2009
I have a movie with on stage three rows of three movieclips, so 9 in total. I would like to change their positions randomly (time interval function) to x- and y-coordinates in the way that they "shuffle" each time. So for example, mc01 changes position to the positions of mc08, while mc08 goes to another position etc. So 9 changes to fixed coordinates eacht interval.
View 5 Replies
Jan 13, 2010
I've made an image slider in flash and need it to slide out at it's current position before changing scenes. The code i'm using is -
[Code]...
on a button but the scene changes before the movieclip has a chance to slide out. Is there anyway of telling the actionscript to wait before jumping scenes between the code?
View 2 Replies
Apr 5, 2010
I have 4 movieclip in the stage. Its instance names are mc_1, mc_2, mc_3, mc_4.
To change the x position of this movieclip I can use the below AS 2.0 code. It is working fine.
for (i=1; i<=4; i++) {
eval("mc_"+i)._x += 10
}
I like to know how to write this statement in AS 3.0.
View 4 Replies
Jun 13, 2011
My question is fairly straight forward: Is there a way to move the position of the mouse?within confines of the stage)I tried changing the value of mouseX/mouseY but it shows the following errors:I:FlashFlash ClassesMazegameMaze.as, Line 98 1178: Attempted access of inaccessible property mouseX through a reference with static type game:Maze.I:FlashFlash ClassesMazegameMaze.as, Line 98 1059: Property is read-only.
View 6 Replies
Aug 6, 2011
i wan to change my mouse coordinate to x->0, y ->0, possible?
View 3 Replies
May 17, 2011
I would like to draw a grid in perspective and draw a circle in in te left bottom corner.But I am not able to get it right.[code]...
View 1 Replies
May 9, 2009
I started using Flash again after a "brief" hiatus (the last time I used it, Flash was on it's MX version ).I am trying to create an animation in which I can move across the stage a simple object (a circle, a square or a star, for example) using buttons (left, right, up and down)This was fairly simple using AS 1, even when I was no expert. The thing is that those simple ways are no longer working with AS 3.I spent a few hours doing some research until I found this nice tutorial on this same site:
Code: http:[url]....
I followed the tutorial, and all was working nicely, but when I attempted to do the animation from scratch, it simply didn't work .I even used the same names for all the objects and instances, but still nothiing.
View 1 Replies
May 4, 2011
Is there any way to define a movieclip position which is already on the stage?
View 7 Replies
Feb 4, 2009
I've got this script that makes this certain symbol to move anywhere when you press the keys.Now I want a button that when you press it, it will position the certain symbol I was speaking of, anywhere I want counting on the x and y axis.
View 1 Replies
Feb 26, 2010
I have a script where i need an objects X and Y Position to change when you enter a certain frame.
On layer 1 i have an input text field with the instance of "message_txt" that runs along all 5 frames in the timeline.
On layer 2 i have 5 frames each with its own actionscript on. The user navigates between frames with simple 'gotoAndStop(4)' etc... on each next or back button.[code]...
View 2 Replies
Jul 31, 2009
With scrollPane, is it possible to change the position of the horizontal scrollbar? I saw an old thread that suggested using the following for moving the vertical scrollbar:scroller.verticalScrollBar.x=-20;So I tried changing it to "scroller.horizontalScrollBar.y=-20;" but that had no effect.
View 1 Replies
Aug 18, 2010
I have developed an application using various FMS2 Communication Components. One of those is the Chat component. The application has various display modes (minimized, normal, maximized). These display modes require the Chat component instance to be resized and repositioned on the screen. I took the approach of having a separate frame represent each of the display modes.
The problem I am having is that the Chat component won't resize or relocate from the size/position on the first frame. The visual layout isn't respected, and calling this.moveTo(x,y) has no effect either. The only way I can get the component to have the desired behavior is to comment out the last line of the Chat component actionscript[code]...
View 2 Replies
Feb 18, 2011
I have several objects, moveclip, graphics and shapes in several layers keys and want to change position, for example, a moveclip is in the position X: 218 Y:45 and so in other key layers,To change it to X: 240 Y: 50, I go to keyframe for keyframe touch the object and go to properties and change one by one is annoying.Is there any way to do this more quickly at one time in all key frames?
View 1 Replies
Jun 2, 2011
I have an xml flash gallery at a .swf file and i want to load this .swf to main.swf. So, i use the code:
[Code]....
aligned to the center of main.swf. How can i move this created movieclip to wherever i want with some code? I tried this:
MyGalleryContainer.y = 200;
MyGalleryContainer.x = 50;
with no results.
View 1 Replies
Sep 4, 2011
I didn't find that my flash is larger than the browsering area on screen until I publish and preview it in my browser but I do want all the content to be displayed on the screen. All I need to do is to move everything up for about 150 px.(in other words, to shorten the stage by 150 from the top but I can only cut the stage from the bottom ) Is there a way I can change the position of the stage like what I can do to the artboard in AI?
View 4 Replies
May 14, 2010
I'm trying to change the position of the dropdown list relative to the combobox item.Setting the position using comboBox.dropdown.x = 1337; doesn't work...
View 1 Replies
Sep 13, 2010
Is there a way to change the position of the registration point inside a Movie Clip using Flash5 ?I've found stuff online for older Flash versions but not CS5.
View 2 Replies