ActionScript 3.0 :: Disable DropTarget Method For Specific MC?

Feb 20, 2011

I want to drag a object using a animated hend (MovieClip) and drop it in a holes. I cannot use dropTarget method to this because when i trace(object.dropTargat.parent.name) output shows "hend" only.

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Disable All Buttons Except The Specific?

May 18, 2011

I'm writing a flash game with using some pop-out message boxes, constructed by myself. Users can close it by clicking the button in the box. Meanwhile, the buttons outside the box should all be disabled!

I don't want to just add a condition check inside all buttons manually if there are alternatives... So I have considered using "Button.prototype.onRelease" event, but I don't know whether it can terminate the original script in each button.

View 3 Replies

ActionScript 2.0 :: Disable Specific Page Flip

Jan 27, 2010

I have been working with this beautiful pageflip script kindly provided (opensource) by Macc [URL]

What I am trying to do is to disbale the page flip when the user clicks the corner of the page on a specific page, and rather have a button that when pressed will flip to the next page. I only want this on a few pages so do not want to disbale all the pages.

There are some explanations within the actionscript:

Quote:

/*you can use these functions:
gotoPage( destinationPageNo, skip );//quick jump to the page number:
destinationPageNo; values = 0-maxpages; skip: boolean; if true, pages will be skipped to the destination!

[Code]....

View 5 Replies

Flash8 :: Disable The HitArea On Specific Frames Within A Movie Clip?

Jul 10, 2010

I have been having some trouble with a movie clip basically designed to act as a button for a store front for a website.This movie clip has, stored as the front of the movie (i.e. before you click in to edit the movie) the following code:

on(rollOver){
gotoAndPlay("Over");
}[code]..........

This gives the movie the hover over and out effect and animates the button so as once pressed the button expands to give a 'Product Details' view.However, when clicked the info shows up as it should but the hit area which I put into the Movie Clip is still on the info area so none of the contents on this new window are accessible and when the cursor leaves the designated info area the movie clip returns to its first stage as it would appear at the start of the animation.Is there any simple way to disable the HitArea on specific frames within a Movie Clip?

View 16 Replies

ActionScript 3.0 :: Method To Disable The Print Screen Button?

Jul 9, 2010

Is there a method to disable the print screen button, for example bring up an error box explaining it's disabled, instead of taking a print screen?

View 2 Replies

ActionScript 2.0 :: External XML Or TXT : Use That Data For A Specific Method?

Nov 1, 2011

I've learned recently that you can use txt file for simple data too, so I include it here as well.TXT contains (not sure if correct, should have same data kind as the xml):

point1&x=1&y=2
point2&x=1.5&y=2.5
point3&x=5&y=-5

XML contains:

<?xml version="1.0" standalone="yes"?>
<points>
<point1 x="1" y ="2"></point1>

[code]....

What I have:

- I have 2 dynamic textfields: text1 (variable: outPut1) and text2 (variable: outPut2)

- I have 1 input textfield: (variable:inPut)

- I have 1 button

What I'm trying to do:

- When typing point1 in the input textfield and then pressing the button,(onRelease), outPut1 textfield should show the number 1 and outPut2 textfield should show 2.

- Similar, when typing point3 in the input textfield and pressing the button, outPut1 should show the number 5 and outPut2 should show the number -5.

-It is not only for these three points, it should be applicable with say 50.000 to 200.000 more of such points, each with different x and y values.

To sum it up:So Flash (with AS2) should screen the nodes or txt (for those point names) on what was inserted in the input textfield, then fill the corresponding attributes (XML) seperately in the textfields and all that after the button was pressed. The same deal if it was done with txt, if possible (have read that with txt, loading of data would be faster?).

View 4 Replies

Actionscript :: Call From Mxml A Specific Method In A .as File?

Apr 1, 2011

i thought of drawing the interface using mxml markup. When the user clicks on a button it should call a specific method in a .as file. How can i do that in mxml ?

View 2 Replies

ActionScript 3.0 :: How To Use Droptarget

Nov 29, 2009

in AS2 it was

Code:
on (press) {
startDrag(this);
}
on (release) {

[Code]...

i want "x_mc" to droptarget on "y_mc" and use an action

View 2 Replies

ActionScript 3.0 :: Droptarget Only Contain 1 Mc?

Feb 18, 2009

I'm having a little problem of which I'm guessing the solution isn't that hard.. but I just can't put my finger on it...

The thing is: I have got 5 movieclips which are able to drag and drop. Next to that I've got 20 containers which are all droptargets. The movieclips are able to be dragged and then dropped on a container. So far so good. But what I want is that when I drop a movieclip on a container which already has a movieclip dropped on it, the first movieclip gets removed and the second movieclip is dropped on the container. Or you could also say.. that the second movieclip replaces the first movieclip. This instead of the fact that a container has multiple movieclips dropped on itself.

[Code]...

View 3 Replies

Can't Make Droptarget Work

Mar 31, 2010

I have been going nuts all day trying to figure out why my 'drag and drop onto a target' movie doesn't work. I have a movie clip to drag onto another movie clip which is the target.when the first clip is dragged onto the target clip i want the target clip to gotoandplay(2);

the clicking and dragging and stopdrag() etc works, but when I drop the piece over the target, it just does nothing.here is my code on the MC that is being dragged:

on(press){
startDrag (this, true, 135, 95, 700, 440);
}
on(release){

[code]....

btw, I am using actionscript 2.0

View 2 Replies

ActionScript 3.0 :: Null DropTarget?

Jun 14, 2009

I'm testing out some different things right now and I'm trying to make a box, that, when one of two balls is dragged and dropped into it, causes the correct color text to display (i.e. redBall displays "RED", blueBall displays "BLUE" when dropped into box).I've gone through a few different ways of doing this, but now I"m trying to use dropTarget.I'm finding that when I drop it into the box using the code below, everything works fine, but if I drop is anywhere outside the box, I get an error stating "Cannot access a property or method of a null object reference."I'm assuming that I'm just wording this second dropTarget conditional statement (if (e.currentTarget .dropTarget == null)) incorrectly, but I'm not sure how to fix it.Here's the code of the dropping function I'm using:[code]....

View 3 Replies

ActionScript 2.0 :: Droptarget Won't Work?

Sep 15, 2009

I made a flash site and one of the pages has drag and drop functions with drop target actions, so that text appears once dropped onto a target.It works fine but when I have it loaded inside an external editor, the drop and drag still works but the drop target function stops working.

View 0 Replies

ActionScript 2.0 :: Use Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?[code]...

View 1 Replies

ActionScript 2.0 :: Using Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?

Code:
square.origX = _x;
square.origY = _y;

[code].....

View 1 Replies

ActionScript 3.0 :: Emptying A DropTarget On MouseEvent?

May 5, 2009

I'm building a grammar excercise where I've got 24 drag'n'drop cards (movieClips), that I can drop into two 'slots' or dropTargets. Each card has its corresponding card, and when the right cards are dropped in the dropTargets, they get a 'well done' message, and a button appears so the user can go on to matching the remaining cards. When the button is clicked, I want the dropped cards to simply disappear.

View 7 Replies

ActionScript 3.0 :: Droptarget.name Not Working Properly?

Aug 6, 2009

I'm setting up some objects connected to classes onto a movie clip dynamically, and although I'm setting the name fine, when I drag another movie clip on top of it and trace for droptarget.name I always get something like "instance01" what am I doing wrong?

View 4 Replies

ActionScript 2.0 :: Create A Droptarget Dynamically?

Oct 10, 2010

How can I create through actionscript (i.e. not drawing it on the stage) a drop target that works? For some reason I can't work it out. I tried the following code (it looks reasonable), but nothing happens when I drop the square_mc on the target[code]...

View 2 Replies

ActionScript 3.0 :: Something Similar To CurrentTarget With DropTarget?

Mar 10, 2009

is there something similar to currentTarget with dropTarget?Right now dropTarget will get me the "lowest" DisplayObject possible, but I'd like to get the top-most. I cannot use parent as my objects are of different nesting depths.

View 1 Replies

ActionScript 3.0 :: DropTarget And Mouse Overs?

Feb 21, 2010

I have a drag and drop based SWF. When I pick up a MC and move it , when I put it down it gives me the MC it is on.However there are times when the returned MC isnt the intended MCEg. The top of the MC is *just* on top of One MC but the mouse pointer is over another (the intended spot), So I am trying to find out if there is a way to return the MC that the mouse is over, rather than the MC's top left corner.

View 1 Replies

ActionScript 3.0 :: Droptarget 1009 Error?

Sep 28, 2011

I am teaching with an basic AS3 programming class and we are looking at drag/drop. I cannot get the following code to work without a 1009 error when not dropping the ball into the inventory box.What we are trying to accomplish is creating an inventory for an adventure game.

Code:
function ball_drag(event:MouseEvent):void {
ball.startDrag();

[code]....

View 5 Replies

Professional :: Go To Specific Keyframe "TypeError: Error #1009: Cannot Access A Property Or Method Of A Null Object Reference"

Oct 24, 2010

I'm doing a simple animation for a varsity project. It's a story about a tiger (panjo) who becomes a vegetarian. In an attempt to keep the main timeline clean, and to keep the file size small, I moved all animations that the characters do into their respective timelines, and then I use object.gotoAndPlay(x) function to go to a specific animation in the sub-timeline, like a head moving, mouth talking eyes etc.

It has been working thus far, but now I'm stuck. I am trying to make the tiger's head move to look at something, but I get the above error when I want to go to that specific keyframe. Here is the code:

[Code]...

View 1 Replies

Professional :: DropTarget Check Against All Objects On The Stage

Oct 1, 2010

Not sure the best way to do this. I have a class we will call DropActivity, here is the code

[Code]...

when the stopDraggingMe() method is called from another object (code shown below) I need to see all the objects on the stage to see what objects on the stage my currently selected movie clip is over and assign it to the dropCheck.checkAgainst method (that will be checked against an array to see if it can in fact be dropped, if so set the canBeDropped value to true and therefor run the .stopDrag() ). I have read using root is not a good coding practice in AS 3.

[Code]...

View 3 Replies

ActionScript 2.0 :: Action For A Draggable Button With Droptarget?

Jan 10, 2005

I have a draggable button , and I need to go to "scene1" when the draggable button is dropped into a droptarget ("dentro1") But it doesn�t work with this action (gotoAndPlay), it works with load movie, or get Url. It only goes inside de droptarget (called "dentro1") This is the code of the draggable button:

on (rollOver) {
startDrag(root_draggablebutton, true);
}
on (release) {

[code]...

View 1 Replies

ActionScript 1/2 :: Single Droptarget For Multiple Movie Clips?

Aug 19, 2010

I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.

View 3 Replies

ActionScript 2.0 :: DropTarget Not Working When Puzzle Loaded Into Movie

Nov 14, 2002

I have a problem with _droptarget. I created a puzzle in witch the target works. Now I want to load the puzzle into an other movie, lets say in _level100. Everything in the puzzle works, except for the _droptarget.

View 1 Replies

ActionScript 1/2 :: Draggable Objects Don't Register On The Droptarget As They Are Within Another Movie Clip

Apr 9, 2010

Unfortunatly im having to extend to more draggable objects. So they will be within another movie clip so i can have them scrolling. After making the scroll, the draggable objects dont register on the droptarget as they are within another movie clip. Below is i think the part of the code that needs to be changed so the draggable objects know where to find the drop target.

View 1 Replies

ActionScript 1/2 :: Drag And Drop Movieclip - "droptarget" Function Does Not Work?

Aug 11, 2011

I have 12 movieclips on one layer, each are draggable some perform an action some dont. The problem is the levels when they are dragged some are above the other clips on the same layer and some are below. I want the dragged clip to be above all clips. Also on the stage there are text boxes over the "droptarget" they have to be on a layer above to be visible. So therefore the area where the text box is does not allow the dragged item to perform its task, the "droptarget" function does not work.

holder_mc11.onRelease = function(){holder_mc11.stopDrag();[code]...........

View 3 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 :: DropTarget Parent Child - Removechild Won't Remove A Child

Aug 21, 2010

I have an issue where removechild won't infact remove a child. I think its something to do with my dropTarget.parent issues. The concept of the code is that you drag a source onto a destination. When you drop the source onto the destination you will get a text field that says "Hello" or "Goodbye". The objective i want to achive is that once i drop a source onto the destination, removechild will remove any previouse textfields added. This is proving difficult.

[Code].....

View 3 Replies

ActionScript 2.0 :: Make A Specific Thing Happen While Clicking A Specific Button

Jan 17, 2006

What I want is a hint how to make a specific thing happen while clicking a specific button. Like "if I click button 1, do this". Would like to use this script though I'm gonna add buttons over time and this is an easy way to have the functionality working.

Here's the code:

Attach Code

function hitButton(btn) {
btn.onRollOver = function() {
this.colorTo (0xC4006A);

[Code]....

View 4 Replies







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