Actionscript 2.0 :: StopDrag When Scale Is Equal To 100%

Dec 4, 2007

I have a movieclip called background_mc; this movieclip contains 20 different movieclips each loading content. This works so far. When the minus key is pressed the background movieclip scales to 25% [this works] while scaled down the movieClip can be dragged around[this works]. I should note that while the movieClip is at 25% if a nested movieclip is clicked(onRelease) it tweens to 100% at the correct cooridinate. The problem is that after the movieClip is scaled back to 100% it can still be dragged whereas I only want it be dragged when scaled down.

If you look at schematic's site I am trying to achieve something similar. [URL]

This is my code so far

Code: Select allvar minusKey:Object = new Object();
minusKey.onKeyDown = function()
{
if (Key.isDown(109)) {

[Code].....

View 6 Replies


Similar Posts:


Actionscript 3 :: Dictionary Mechanism - Dictionary Use Id To Compare If The Two Keys Are Equal, Not Use Strict Equal(===) To Compare If The Key Is The Same?

Aug 27, 2010

The dictionary use strict equals(===) for key comparison, how to change the comparison, so I can use my standard for comparison, for example, I have a class named Student:

class Student{
var id:int;
var name:String;[code]....

I want Dictionary use id to compare if the two keys are equal, not use strict equal(===) to compare if the key is the same.

View 2 Replies

ActionScript 3.0 :: Add Easingout To StopDrag?

Jun 1, 2010

Is there anyway to add easing out to the stopdrag command? for example i drag something and instead of it stopping dead, it eases out.

I have tweenlite so maybe there is something in there that is possible to use?

View 3 Replies

ActionScript 3.0 :: Run Only Once StartDrag And StopDrag?

Dec 31, 2011

i created quiz. Questions of quiz, two question are fill inthe blank and others are multiple questions. i want to add matches question using startdrag-stopDrag. it runs in seperated fla. But it doesnt runk when i add to quiz.fla, actually mybadscrore doesnt work. However , how i can do to run only once square1.mc?

Code:

square1_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);
stage.addEventListener(MouseEvent.MOUSE_UP, drop);
function drag(e:MouseEvent):void

[Code].....

View 3 Replies

Blue Box - StopDrag When The Mouse Is Released?

Nov 9, 2009

I need a blue box with "man" typed into it made into a MC. (can do that bit).Which when I move it around on a startDrag command needs to change to "woman" in a pink box when it encounters a hitTest with other stationary words on the stage.I obviously need to stopDrag when the mouse is released.Is this about an MC inside another MC?

View 14 Replies

Actionscript 3 :: Stopdrag Doesnt Work As It Should?

Aug 23, 2010

i'm trying to drag something, and on stopdrag it should start a function if certain requirements are fullfilled. My code looks like this.if(e.target.dropTarget.parent == targetName || e.target.dropTarget.parent.parent.parent.getChildByName("cloud").getChildByName("itemPlacer").getChildAt(1) == targetName){

I got 2 questions, first, this works good when i drag and stopdrag correctly(the requirements in the if are fullfilled). but if the requirements are not fullfilled i get an error saying that the place i'm referring to cant be null. I know that the problem lies after the || part but dont know how to resolve it. 2nd, isnt there a shorter way of doing these checks? Atm i'm going through alot of parents and getchildats and was wondering if there was another way.

View 1 Replies

ActionScript 1/2 :: StopDrag When The Movieclip Is Disabled Mid-drag?

May 11, 2009

I don't even know where to go looking for this.
 
I have a game with a timer. Lots of moveable pieces using startDrag and stopDrag on a dropTarget. when the timer hits Zero, all the pieces are disabled using enabled=false;
 
but if I am mid-drag with a piece when the clock runs out, I can't get rid of it, and it won't let me hit my "reset" button.

View 2 Replies

Flex :: Why StartDrag() And StopDrag() Don't Effect The X - Y Coordinates

Mar 11, 2010

when I use startDrag() and stopDrag() to drag an object why doesn't it effect the x,y coordinates of the object? you can run this example and see for yourself (move the circle and look at the trace messages):

[Code]....

View 3 Replies

Actionscript 3 :: Create Quiz Using StartDrag And StopDrag?

Dec 31, 2011

Actually i have a quiz.fla. In the file ,two of them fill inthe blank questions and others are multiple questions.square1_mc must run only once not twice. Ä°f user correct selected, doesnt run it again.However,if mybadscoretext is 1 not increase 2,3,4. :Show i can do all?

stop();
var myScore:Number = 0;
var myBadScore:Number=0;[code]....

View 1 Replies

ActionScript 2.0 :: StopDrag When Window Hits X And Y Cord

Apr 7, 2009

I have a window that is dragable, but I want it to stop dragging not only on the release but when it hits a certain x and y cord. Here is my function:

Code:
function windowDragon(){
_root.partners_container_resize.partners_container.vidWin_Panasonic.vidWinheader_panasonic.onPress = function(){
_root.partners_container_resize.partners_container.vidWin_Panasonic.startDrag();
[Code] .....

View 2 Replies

ActionScript 3.0 :: StopDrag() Doesn't Work On Child?

Oct 14, 2011

I have a website with a slider that worked once upon a time. It still works if the swf is not added to the stage by the preloader. If I load the swf directly, rather than the html with the preloader, the slider works. Otherwise, the stopDrag() function appears to not work, making my video player's volume slider infinitely follow the user's mouse (which is completely unacceptable as you can imagine)

Keep in the mind, the slider works on its own... just after the site has been added to a stage of a preloader via addChild() does it not work.

View 1 Replies

ActionScript 2.0 :: StopDrag - User Drag The Seek Bar And Release It

Aug 4, 2009

i m developing a seekbar which user can drag to the end of the movie. its working but when the user drag the seek bar and release it , it stops on the current frame. and do not go further.

[Code]...

View 0 Replies

ActionScript 3.0 :: Using Rectangle In StartDrag Makes StopDrag Not Work

Nov 9, 2009

I have a pretty simple function here where I want to start dragging a video scrubber along the x axis within bounds, and drop it when they let go. The code works perfectly if I don't specify a bounding rectangle (except it doesn't restrict to x-axis). What's up with that? Here's my non-working code:

Code:
videoConsole.scrubber.addEventListener(MouseEvent.MOUSE_DOWN, dragScrubber);
videoConsole.scrubber.addEventListener(MouseEvent.MOUSE_UP, releaseScrubber);
private function dragScrubber(e:MouseEvent):void{

[code]....

View 1 Replies

ActionScript 3.0 :: Scrollbar Base On StartDrag And StopDrag Function?

May 17, 2011

I know how to do the component UI scroll bar. But what I want to do is have my own custom scroll bar, and all the others tutorial looks confusing. I was just messing around with startdrag function and I notice that whenever you don't specify what you want to drag, it just drag everything. Ex: redBox_mc.startDrag(); will drag only the red box startDrag(); will drag everything. Using this I think I can make a UI scroll bar. The only problem is that everything go in the opposite direction. Is there any way I can fix this?

View 1 Replies

ActionScript 2.0 :: Flash MX - StartDrag - StopDrag - Get The MC Drag To Stop ?

Aug 30, 2007

I can't seem to get the MC drag to stop

[Code]....

View 1 Replies

ActionScript 2.0 :: CS3 StartDrag And StopDrag Movie Clip - Icon Seems To Be Disabled

Apr 22, 2009

I have an icon that when pressed displays a msg. BUT why i decide to StartDrag that same movie clip, the icon seems to be disabled? My movie clips

[Code]....

View 6 Replies

ActionScript 3.0 :: StartDrag - StopDrag - HitTestObject - Instances Should Disappear From View

Mar 8, 2010

The Flash movie has three movie clips, square_mc and circle_mc that are draggable objects. The blackCircle_mc is the object that the other two instances, when dragged over it, should disappear from view. However, at the moment the example does not allow the movie clip instances square_mc and circle_mc to disappear. The instances disappear and are not visible in the target area of the blackCircle_mc instance, but not over the black circle area itself. The hitTestObject method is working on the target area outside the circle, but not within the circle circumference.

[Code]....

View 2 Replies

ActionScript 2.0 :: Rolledover Clip To Scale Up And All The Others To Scale Down And Blur?

Mar 8, 2007

Scenario: main moveiclip with 4 other clips in it. I want the rolledover clip to scale up and all the others to scale down and blur.

Question: What is the most effiecent way to code this. Would it be a "for in loop"? I am trying to minimize the code and would rather not use a whole bunch of if then statements.

View 3 Replies

IDE :: Flash Content To Scale When Scale Browser Window?

Feb 19, 2010

I want my flash content to scale when I scale my browser window.

View 5 Replies

ActionScript 3.0 :: Use StartDrag In The Code And It Works. But When I Try StopDrag It Doesn't Stop To Drag?

Jan 30, 2009

I use startDrag in the code and it works. But when I try stopDrag it doesn't stop to drag.

View 1 Replies

ActionScript 2.0 :: Initialize X Scale And Y Scale Into Percentages?

Jan 14, 2006

How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in percentages, not real numbers.

Code:
USflag.onMouseDown = function ()
{
var temp = USflag;
onEnterFrame = function ()

[code]....

One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]

View 1 Replies

Actionscript 3.0 :: StartDrag - StopDrag - HitTestObject - Does Not Allow The Movie Clip Instances Square_mc And Circle_mc To Disappear

Mar 11, 2010

StartDrag, stopDrag, hitTestObject The Flash movie has three movie clips, square_mc and circle_mc that are draggable objects. The blackCircle_mc is the object that the other two instances, when dragged over it, should disappear from view. However, at the moment the example does not allow the movie clip instances square_mc and circle_mc to disappear. The instances disappear and are not visible in the target area of the blackCircle_mc instance, but not over the black circle area itself. The hitTestObject method is working on the target area outside the circle, but not within the circle circumference.

[Code]....

View 1 Replies

Scale A Flash Using Dreamweaver - Can't Get It To Scale

Dec 4, 2009

My Flash image will not scale.if you zoom in, it gets chopped up. if you zoom out, it has a big blank area.What should I change in order to have this Flash image scale just like the rest of the site? [URL]It is the Flash in the center.

View 1 Replies

ActionScript 3.0 :: What Does 9.2 X 100 Equal To?

Feb 9, 2009

what does 9.2 x 100 equal to? it equals to 920. in actionscript 2 ,it shows the right result while on the other hand, actionscript 3 shows 919.9999 .

View 6 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

As3 :: Make A Comma (,) To Equal (.)?

Dec 10, 2010

is it possible to make a comma (,) to equal (.) in as3?
 
example:
 
now i write
2.31 + 4 = 6.31
 
so it's possible to write
 
2,31 + 4 = 6,31

View 6 Replies

ActionScript 2.0 :: Equal Variables

Feb 21, 2005

i've started to make like a quiz in flash with 218 questions in it! i've made it so the computer will show X amount of random questions.i've already got the code on the buttons so it will jump to a random question, but i'm having trouble with limiting the number of questions asked.

i've got an inputbox so the user can chose how many questions they do and the buttons add 1 each time thier pressed to a different variable.

i've got this code, but it never seems to stop asking questions

on (release) {
score = score+0;
page = page+1
if( (page == pagemax) )
GotoAndStop(220)
if( (page != pagemax) )
myVariable = random(219); //creates a random number between 0 and 5
if (myVariable < 2){ //checks to see if it's value is zero
myVariable = 2; //set it to 1 if it is zero
}
gotoAndStop(myVariable); //goes to and plays the frame.
}

View 14 Replies

ActionScript 3.0 :: Equal Space Between Mc's?

Jan 31, 2010

I have a couple of mc's that are added to the stage after one another.I want them to have equal space between them.Here i the code snippet with the problem, below is the full code.

Code:
for each (var link:XML in settingsXML.links.link) {
i++;
newsItem = new NewsItem();
newsItem.menuLabel.text = link.@name;

[code]....

View 2 Replies

ActionScript 3.0 :: How To Make Int Equal To Null

Sep 4, 2010

i just want to ask how to make an integer variable equal to null.[code]well it kinda work but giving some warning..,

View 4 Replies

ActionScript 3.0 :: Keep An Object In Place When Two Are Equal?

May 30, 2011

What's the best way to sort an array while making sure that elements of equal value stay in the same position?

When I do something like this:
 
var i:uint;
var myArray:Array = new Array();
myArray.push({num:1, type:0});

[Code].....

The objects that have equal num values swap places everytime I do a sort.  So how do I get the sort to not swap the positions of objects that have the same value?

View 4 Replies







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