ActionScript :: Drag Limit, Backwards?

Sep 12, 2011

I have an application where a user uploads an image and then transforms it by clicking, dragging and using a resize bar. But my client has asked me to limit where the user can drag to, this is not a problem except I need the limits the opposite way around to what would be considered normal.

So where I have startDrag(false, new Rectangle...) that works just fine, but what I need is to let the user be able to drag outside of the boundaries and not have white space on the inside of the flash file.What I mean by this is say I have a 500px wide flash file and an image inside it which I'm carelessly dragging around. If the images right hand edge (if I drag left) hits 500px it stops dragging and does not allow them to pull it any further left.Below is the code I currently have for the drag events.

public function startImageDrag (e:MouseEvent):void {
mousePos['x'] = e.target.mouseX;
mousePos['y'] = e.target.mouseY;[code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: How To Limit Way To Drag Sprite

Mar 30, 2010

I have an idea that I want to test out but need some information. Is it possible to limit the way you can drag a sprite with the startDrag()? For instance, say I have a square sprite that I only was to be able to drag vertical or only horizontal.

View 7 Replies

ActionScript 3.0 :: Area Limit Drag And Drop?

Jan 27, 2010

Im trying to think how i fix this problem. i have a map at the stage and its big, i need to click and move it. But when i get the final of the image, i continue move it and appears the stage.

How i lock the image when it get the final to dont appear the stage? the cod that im using is:

map.addEventListener(MouseEvent.MOUSE_DOWN, move)
map.addEventListener(MouseEvent.MOUSE_UP, drop)
function drag (e:Mouse Event)
{ e.target.stargDrag();
}

[Code]...

View 5 Replies

ActionScript 2.0 :: Limit A Drag Function To A Single Direction?

Dec 6, 2010

how to limite a drag function to a single direction? which means I only can drag the button to left, it won't be able to drag to right.

View 4 Replies

ActionScript 3.0 :: Limit Drag And Drop With Stage Size?

Jul 14, 2009

I need to limit dragging when user drags out of the Stage. [code]...

View 1 Replies

Forwards And Backwards?

Sep 11, 2009

I've used this code to go from one frame to the next

function backframe(event:MouseEvent):void
{
this.prevFrame()

[code]....

Now it works fine until I get to the last frame. Once I get to the last frame then click to go back, it won't let me go forward until I go all the way back to frame 1.

View 1 Replies

IDE :: Backwards Playback Possible?

Jan 22, 2009

I have a cool idea for an animation, but need it to play backwards at the end of it's timeline...how hard would this be to do?So, in essense it would play frames 1,2,3,4,5 then immediately 4,3,2,1 and then 2,3,4 and so on...

View 4 Replies

ActionScript 3.0 :: Car Will Go Forward But Not Backwards

Mar 16, 2011

Heres the code for my car to accelerate but how do I make one for reverse when the down key is pressed? I've tried all sorts but it is just not working properly.
ActionScript Code:
//When up key is pressed...
if (keyUpPressed) {
car.y -= ((90-carRotation)/90)*increment;
if (((car.rotation > 90)&&(car.rotation < 180))||((car.rotation < -90)&&(car.rotation > -180))) {
car.x += posNeg * (((((1-(carRotation/360))*360)-180)/90)*increment);
[Code] .....

View 2 Replies

ActionScript 3.0 :: Fluid Backwards Playback?

Aug 25, 2009

Hello,
 
I'm trying to create an icons that move fliudly backwards and fowards across a screen and I would like motion forwards and backwards. play(); works great for going forward until stop(); is there a way to do that going backwards on the timeline instead?
 
P.S. using prevFrame(); is jumpy and doesn't actually "play" each frame. Multiple calls simply make the movie jump to however many previous frames you called at once in your loop so you don't see any motion inbetween.

View 3 Replies

Send Symbol Backwards/Forwards?

Oct 21, 2009

I know I can send symbols behind and to front of another symbols. But itīs not  working!Is there some properties of symbols that doesnīt allow that?

View 6 Replies

ActionScript 3.0 :: Play An MC Backwards With FLV Content

Nov 17, 2010

Problem: I have an flv I would like to play backwards.
 
Attempt: I have used the code below to play an MC backwards as well as forwards with success in the past. Now I have an flv which I must play backwards and I thought embedding it entirely in an MC would be fine. The code works, but when ti performs the backwards portion, well, it runs very slowly.
 
Question: Is there a way to play the embedded flv backwards at full speed using the method I tried or do I have to load the flv into the swf at runtime?
 
if I have to load the flv into the swf at runtime to play it backwards

var rewindMe:Boolean=false;
vid_mc.addEventListener(Event.ENTER_FRAME, everyFrame);
function everyFrame(event:Event):void {
if (rewindMe==true) {

[Code].....

View 1 Replies

ActionScript 1/2 :: Play My Movie Backwards?

Nov 15, 2011

I've made this as a "prototype", getting used to how the game will move and such, and I've got it moving as I want it, but I can't make it move backwards when I press the back button The whole thing is inside a movie clip, I just want it to play backwards when I press the back button

View 4 Replies

Actionscript 3 :: Arranging MC That Is Called From XML Backwards

Mar 24, 2010

I'm loading my MC from XML backwards, and its separated by 10 per pages. When it's loaded to the stage it could not be arrange accordingly to grids. And when I click at other pages to let it run another 10 before the previous loaded XML object, it does not add in to the Array(I've clear off the array before reload the XML)[code]my guess on the problem might be the 2 loop which 1 is using ++ and the other -- ?

View 1 Replies

Flex :: Play A Video Backwards In AIR?

Jun 29, 2010

I need to play a .mov file backwards in my Flex app.

View 2 Replies

Actionscript 3 :: Looping Through An Animation Backwards?

Mar 28, 2012

Trying to get an animation to play backwards while a button is held down, which works fine, however when it gets to the first frame it just stops and won't loop back around to the last frame of the animation- how might one accomplish this? It seems like I need to break the event for a frame somehow and then start listening again...

backward_btn.addEventListener(MouseEvent.MOUSE_DOWN, setDownTrue);
backward_btn.addEventListener(MouseEvent.MOUSE_UP, setDownFalse);
addEventListener(Event.ENTER_FRAME, checkDown);
var isDown:Boolean = false;

[Code]...

View 3 Replies

ActionScript 3.0 :: Backwards Loop Through Object

Jan 28, 2009

I'm now using for..in and for each..in almost exclusively with looping Objects. I love it. But how can I loop an Object backwards?

i.e. - with an array I might do something like this:
for (var i:uint = arr.length; i-- > 0; ) {

Queston #2 - I've found the ordering of for...in to be quite predictable but am seeing some blog posting that say otherwise (thats AS2 was extremely predictable but AS3 is not). Which is it?

View 0 Replies

ActionScript 2.0 :: Creating A Backwards Clock?

Feb 5, 2009

I want to create a clock that goes backwards really quickly. Something that would be used to represent going back in time. I found a clock that uses the following AS...

[Code]....

I worked out that adding a minus to all '360' elements would run the clock backwards but I can't work out how to run the clock really fast....Can anyone shed a bit of light?

View 4 Replies

ActionScript 2.0 :: Playing A Movieclip Backwards?

Nov 5, 2009

I hope someone will know a solution to this problem: I have a movieclip with a tween in it, which moves a object up and down.

I have 2 buttons on my _root: One which had to move the object up till the end of the movieclip when pressed so it will stop after reaching the end of the tween. Or it stops playing when the button is released.

Another one doing exact the oposite, it moves the object down when pressed. And should stop at the beginning of the tween. This button also has to stop when the button is released. The button playing the movieclip backwards doesn't work as it should be. It doesn't reverse the movieclip, it just jumps to a previous frame.

View 1 Replies

ActionScript 3.0 :: Play Mc / Video Backwards?

May 10, 2010

I have a video by frames in the timeline on the stage, and i want it to play backwards when i press the button.

i found this code on this forum and it works really good, but i need it to stop on certain frames (127, 177) how do i do that?[code]...

View 0 Replies

Actionscript 3.0 :: Going Backwards In Timeline Using Tweener

Mar 21, 2009

SO im currently working on a project similar to one that can be viewed at [URL] (my inspiration) and i have everything set up like the following. Link 1(resume) will take me to my desktop area link 2(portfolio) will take me to the living room and link 3(contact) will take me to a conference area. so while im in the living room and i want to go back to area one. here is my source (my project folder is resume, tweener is located in resume/classes)

[Code]...

View 2 Replies

ActionScript 2.0 :: Playing Frames Backwards?

Jan 14, 2003

I remember reading one time that you can play frames backwards. I have this ball going along this line, and when it reaches the end I want it to go back exactly the same. Isnt there some kinda code to play the frames backwards? Also, the line is curved, so I cant just move it straight across real easy like. I had to do a lot of tweening.

View 7 Replies

ActionScript 2.0 :: Play MC Backwards Onrollover?

Oct 5, 2004

I need an animation to begin playing when another button is rolled over, if the button is still rolled over, the animation will finish it's loop. If it the button is rolled out, the animation is played backwards.

View 7 Replies

ActionScript 2.0 :: Play An Animation Backwards?

Jan 20, 2005

Is it possible to play the playhead backwards, if i want to play an animation backwards?

View 2 Replies

ActionScript 2.0 :: How To Play Timeline Backwards

Jan 29, 2005

Short description what I wan'a do: 30 frame long movie clip (my_mc) and a button (button_btn). When button rollOvers the clip should play (how to do that I know ) and when on button RollOut the clip should play backwards from the same frame where it stopped.

View 1 Replies

ActionScript 2.0 :: Button To Go Backwards On The Timeline?

Sep 12, 2005

Whats the action script for a button to go backwards on the timeline?

on(release){
goBackWardsOnTimeline;
}

View 5 Replies

ActionScript 2.0 :: Play Mc Backwards When Release?

Mar 12, 2007

I have a mask in a movieclip and I want it to play backwards when I push the buttons. I want the organic stuff to mask backwards. [URL]

View 5 Replies

ActionScript 2.0 :: Flash 9 Not Backwards-compatible?

Apr 2, 2007

I mistitled the thread because I thought the problem was with the version of flash player, but when I ran my swf locally everything worked fine, so I now know that it's a problem created by making the swf remote. Perhaps an admin could change it to "bitmapdata.draw() doesn't work remotely" if they read this.[URL] My swf works fine when I run it locally, but not when I run it from my server!? When images from flickr are loaded into my swf on [URL], flash doesn't want to bitmapdata.draw(mc) the mc with the image (for the reflection), but this problem is non-existent locally. Everything is identical, same SWF, same browser.

View 4 Replies

ActionScript 2.0 :: Playing Backwards Through Frames?

Jun 23, 2007

I'm having a bit of a problem with getting the timeline to play backwards through frames.I've tried doing something like the following and thought it should've worked but it didn't,with this plz:

function onEnterFrame() {
gotoAndPlay(lastframe);
lastframe = _currentframe--;

[code]....

View 14 Replies

ActionScript 2.0 :: Make Animation Go Backwards?

Aug 7, 2007

I`m trying to use this code to make my animation go backwards. The problem is that I need to stop it before reach the beggining of the timeline. The Stop code doesn`t work backwards.

this.onEnterFrame = function(){
prevFrame();
}

View 4 Replies

ActionScript 2.0 :: On Rollout Play Backwards?

Jul 4, 2003

I created a MC that will play when you rollover a button and play again on rollout. Here comes the problem. If you rollout this MC before the animation comes to stop, it will stop at the stop point and won't continue playing until you rollover again which then looks (and actually is) as a bug.

View 3 Replies







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