Button Over Frame Doesn't Work With Drag And Drop
I am trying to create a small game in which the user has to drag chars to a proper place in a table. I built the table cells as movie clips that contain buttons, so that when the mouse is over the cell, the cell will change color.
The problem is that if the user drags an item on top of the cell, instead of just pointing the mouse at it, the cell doesn't change color.
Any advice?
Thanks HTT
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-08-2006, 10:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Drag-n-drop Using TextBoxes Doesn't Work
Hi all,
I have a problem concerning the drag n drop ability using movie clips containing textBoxes.
My drag-n-drop works well and the text appears correctly. The problem arises when you click on the TEXT and then drag the movie clip OR when you drop a movie clip onto another movie clip's text.
For example: When you click outside of the text box and drag the movie clip, then place it on another movie clip (not another movie clip's text)...everything works well.
I think that I should somehow 'group' the text Box and movie clip so that they become one. Can anyone help me with this? Will that solve the problem? What should I do?
I really appreciate any help...I know that this isn't the easiest question. Also, for those that wouldn't mind, the actionscript is below. Just copy that in the main movie.
Thanks again...
//Global variables
var numrecords = 3;
var dragX;
var dragY;
//create some formatting for our text boxes
myTextFormat = new TextFormat();
myTextFormat.font = "Arial";
myTextFormat.size = 12;
myTextFormat.color=0x000000;//black
for (i=1; i<=numrecords; i++) {
// create the movies
thisMov = _root.createEmptyMovieClip("button"+i, 100+i); //name, depth
thisMov.lineStyle(2, 0x000000, 100); //width, black, alpha
thisMov.beginFill(0xF7837D, 100); //red, alpha
thisMov.lineTo(100, 0);
thisMov.lineTo(100, 23);
thisMov.lineTo(0, 23);
thisMov.endFill(100, 0);
thisMov._x=150;
thisMov._y=i*30;
//create text box
thisMov.createTextField("textBox" add i,i,0,0,80,18); //instance name, depth, x, y, width, height
var thisMovTitle = eval(thisMov+".textBox"+i);
trace(thisMovTitle);
thisMovTitle.multiline = false;
thisMovTitle.wordWrap = true;
thisMovTitle.border = false;
thisMovTitle.text = "my title" + i;
trace("thisMovTitle.text: " + thisMovTitle.text);
thisMovTitle._visible = true;
thisMovTitle.setTextFormat(myTextFormat);
//on press
_root["button"+i].onPress=function() {
this.startDrag();
this.swapDepths(1000);
var mDropTarget;
var mDragTarget;
for (j=1; j<=numrecords; j++) {
DT = eval("m"+j+"DropTarget");
_root.DT;
}
var dropX;
var dropY;
// variable declarations
for (j=1; j<=numrecords; j++) {
DT = eval("m"+j+"DropTarget");
_root.DT = eval("/button" add j);
}
dragX = getProperty(this, _x);
dragY = getProperty(this, _y);
}
//on release
_root["button"+i].onRelease=function(){
// loadVariables("text1.txt", "_root");
this.stopDrag();
for (j=1; j<=numrecords; j++) {
if(eval(this._droptarget) == eval("/button" add j)) {
mDropTarget = eval("/button" add j);
break;
}
}
// if dropped correctly
// if (this._droptarget == mDropTarget) {
if (eval(this._droptarget) == mDropTarget) {
trace(" --- dropped correctly ---");
// get X & Y values for drop img
dropX = getProperty(mDropTarget, _x);
dropY = getProperty(mDropTarget, _y);
// set drag img's X & Y to same as drop img's
setProperty(this, _x, dropX);
setProperty(this, _y, dropY);
// set drop img's X & Y to same as drag img's
setProperty(mDropTarget, _x, dragX);
setProperty(mDropTarget, _y, dragY);
// else dropped incorrectly
} else {
trace(" --- dropped incorrectly ---");
setProperty(this, _x, dragX);
setProperty(this, _y, dragY);
}
} //end onRelease
} //end for loop
stop();
Drag N Drop Doesn't Work In Quiz Template
Hi I have a quiz that was made with the Quiz template that works fine when its played by itself. But when I play the movie from another movie (so its loaded on level5) the drag 'n drop part doesn't seem to work properly. It drags fine, but when I release the mouse button it doesn't recognize the droptarget and goes back to its original location.
Does anyone know how to make this work from level5?
Thanks.
Drag'n'drop Bring To Front Doesn't Work (couldn't Find A Solution Anywhere)
Sorry to start this topic again but i couldn't find a solution for my prob anywhere in the forum or the tut-pages.
i want to achieve what kirupa explaines in his swap depth tutorial, i want the visitor to drag different objects + the one selected comes to the front.
i did everything explained in the tutorial, but there is one difference: i don't want the draggable area to be the whole MC wide, that's why i placed a button into a MC. this button should have the dragging actions and drag the whole clip.
so far it works, but the MC wouldn't be brought to front, although i typed the correct path:
Code:
on (press, release, dragOver, dragOut) {
_root.x += 2;
_root.txt2.swapDepths(_root.x);
}
on (press) {
startDrag(this, false, -448, -170, -66, 310);
}
on (release) {
stopDrag();
}
this sounds all pretty complicated, you'll probably get my point when seeing the actual swf
thanks in advance for any suggestions
Drop Menu : Rollovers/GetURL In A Movie Don't Work...and The SWF Doesn't Work In FF
My links/rollovers don't work in Mozilla and the dropdown menu part don't work (the rollovers and the getURLs) in any browser.
What's wrong with this??? I think it's something simple.
I've already tried:
Code:
this._lockroot = true;
I also tried writing the AS as:
Code:
one.title.text = "The Text";
one.onRollOver = over;
one.onRollOut = out;
function over () {
this.gotoAndPlay(2);
}
function out () {
this.gotoAndPlay(11);
}
one.onRelease = function(){
getURL("http://www.thelink.com");
}
...didn't work...
I hope someone can help!
Download the: Source File
(Lately I've gotten no help off this site and it's been very depressing because this site people used to be very helpful...I hope someone can change my mind)
Retaining Drag And Drop Movement From Frame To Frame
Hello.
I'm having a problem with retaining Drag and Drop movement from frame to frame. The issue is that if some movie clips in frame one are moved around with drag and drop, then the user proceeds to frame two, upon going back to frame one, the movie clips that were moved around are now back to their starting positions. How can I have these movie clips stay where the user put them? I've attached a simple fla file for reference.
Thanks in advance for any help and suggestions!
Drag Bar Doesn't Work In Mozilla, Wft?
I created a drag bar for the site in progress at:
http://www.tlrsystems.com/beta/
If you click on the "services" link, you will notice that when you use the scrollbar on the right side using Mozilla Firefox/Firebird, it doesn't let you scroll. But if you use the site in Internet Explorer the scrollbar works fine.
I was just curious as to if there was a fix for this or not. It seems as if the browswer is trying to drag the image out of the movie, yet it can't.
Any help appreciated.
Drop Down Menu Doesn't Work
I've created a movie clip with the first frame as button (action: stop), then on roll over of button, it will go to and play from frame 2 onwards, which contains the fly out buttons (action on last frame of the movie clip: stop) When I export, the button on the first clip doesn't not work on roll over, but on click, it plays, and when it ends, buttons doesn't link to anything... Is there special things that I need to do to it? or a drop down menu has to have a complicated script that I have to download somewhere? Please help~ Thanks~~
Drop-down Menu Btn Doesn't Work
I created a drop-down menu using this.onRollOver....attachMovie();...this is OK.
I then created mc's as buttons nested in the attachedMovie. I am having trouble controling the attached movie once loaded...the btn's are constantly active! It's keeping me from doing rollOver efftects and even creating links. Is there a better method for creating a drop-down menu?
Drag Doesn´t Work When Swf Loads Into Holder MC
Hi, I´m loading a swf into a movie using
loadMovie("club.swf", _root.holder);
, it load well, but the drag which is inside it doesn´t work anymore (it is a samll game). I have tryed with _parent.holder, so the drag works but in the main movie others MC desapear!
any help?
Thank you
Microphone Drop-down List Doesn't Work
I have written my own chat software, and while the webcam selection (in settings) works, when I select different microphones, although they appear in the selection box as if they have changed, the same microphone that was on before, remains on. The volume works fine.
I have tried the same computer using professional chat software, and the microphone selection works, so it is not the computer.
Don't think it can be this code:
if (micro!== null) {
micro.addEventListener(StatusEvent.STATUS,microphoneStatusHandler);
nsPublish.attachAudio(microphone);
}
function microphoneStatusHandler(event:StatusEvent):void {
if (event.code == "Microphone.Unmuted") {
//default rate is 8 Mhz
microphone.rate=11;
} else {
//I have blocked my microphone - same as no mike
}
}
Do you have any idea what could be the problem?
Thanks.
Microphone Drop-down Selection Doesn't Work
I have written my own chat software, and while the webcam selection (in settings) works, when I select different microphones, although they appear in the selection box as if they have changed, the same microphone that was on before, remains on. The volume works fine.
I have tried the same computer using professional chat software, and the microphone selection works, so it is not the computer.
Don't think it can be this code:
if (micro!== null) {
micro.addEventListener(StatusEvent.STATUS,micropho neStatusHandler);
nsPublish.attachAudio(microphone);
}
function microphoneStatusHandler(event:StatusEvent):void {
if (event.code == "Microphone.Unmuted") {
//default rate is 8 Mhz
microphone.rate=11;
} else {
//I have blocked my microphone - same as no mike
}
}
However, as I said, on the professional software the microphone selection worked - any suggestions how they do it? Bit stuck...
Thanks
Alan Costello
Why OnLoad Can't Work With Drag And Drop?
I am loading a movie that is a .SWF into another .SWF. Just like all the tuturials do on this website. When I load a movie that has Drag and Drop options in it.. it doesnt work...
Why is this?
Here is an example of what I am talking about...
Why OnLoad Can't Work With Drag And Drop?
I am loading a movie that is a .SWF into another .SWF. Just like all the tuturials do on this website. When I load a movie that has Drag and Drop options in it.. it doesnt work...
Why is this?
Here is an example of what I am talking about...
HEEELP.Link Doesn't Work Anymore After Drag
Hey ppl,
I'm seriously going crazy on this prob:
I have a MC called inlay with a button inside linking to an external web page. This MC is inside another MC called pages.
Additionally I have two buttons underneath the MC, one for enabling to drag the MC "pages" the other for disabling to drag the MC "pages".
Before using the enable/disable buttons the link inside the MC "inlay", which itself is inside the MC "pages", works perfectly, but after I clicked one of the buttons the link just doesnt work anymore.
I'm really going crazy!!!
here is the code i put into the 1st frame:
Code:
_root.butENABLE.onRelease = function() {
_root.pages.onPress = function() {
_root.pages.startDrag();
};
_root.pages.onRelease = function() {
_root.pages.stopDrag();
};
};
_root.butDISABLE.onRelease = function() {
_root.pages.onPress = function() {
_root.pages.stopDrag();
};
_root.pages.onRelease = function() {
_root.pages.stopDrag();
};
};
_root.pages.inlay.butLINK.onRelease = function() {
trace("link to url");
};
Please help me out!
Thanks a lot folks...
osinho
Drag And Drop Does Not Work .. Simple And URGENT
Hello,
My drag and drop doesn;'t work. I am using FLASH MX.
Well I am trying to load the drag n drop file into my main file from a button.
But what happens is, it does not work using this code( action script for the button in my main file)
on(release){
if(n>1){
unloadMovieNum(_root.n-1);
}
x = _root.n;
loadMovieNum("dragndrop.swf", x);
_root.n++;
}
If I change "_root" to "this", it drag n drop works but opens it into another file. I want it to work inside the main file.
Please help its urgent and confusing.
Cheers
Drag N Drop Wont Work From Loadmovie...
I have a movie that has a drag n drop feature with droptarget that when activated plays movie instances.
eg.
Drag the litter to the bin. Bin being the droptarget. Litter _visible = false. if ++inBin (1) play bin lid_mc movie and a button appears to play again.
At the end of the feature I want it to return to the start and be able to run again but the only feature that works is the drag n drop. None of the movies run nor does the _visible true / false work.
I thought about refreshing the page using javascript but the swf loads full screen from a web page using js so therefore doesnt use its own html page to launch so there is no where to place the script.
eg.
<script language=JavaScript>
function refreshPage(){
window.location.reload(true);
}
</script>
actionScript
getURL("javascript:refreshPage()");
but I launch the swf using:
<script>
function go1(){
window.open("../interactive/litter.swf","","channelmode,scrollbars")
}
</script>
<form>
<input type="button" onClick="go1()" value="Bin it!">
</form>
I also thought about launching the movie using the loadmovie function as a clipEvent but none of the movies run when activated by the droptarget.
eg.
Movielauncher.swf
placeholder.loadMovie("litter.swf");
SO i seem to have all the tools but non of the answers as to restart the movie / refresh the page
Flash MX (by the way) I found that the actionScript for the whole drag n drop with droptragets doesn't run when I save it as MX 2004.
any ideas anyone??
Work Scheduler Interface Using Drag And Drop
Howdy!
I just came across the need for a work scheduler
interface. The end-user will need to click on
object, drag it and drop it from one box to the
next.
Each box represents a mechanic. Each mechanic
is assigned unique properties (font color, back
ground color, etc) to help identify who's doing
what when ... So, as an item is drop into a box
the properties for dropped object must change to
match that of the box it was dropped in.
I found lots of entries in the forum where drag
and drop is employed but, as a newbie or one without
the experience, I wonder if there is a step by step
sample I can follow to get me started with this.
I want to use flash for this project as I have wanted
to get involved with flash for some months now but
kept putting it off - This is a great project for flash
and it should force me to learn real tricks of the trade
Thank you all in advance for your assistance!
Regards;
Jose Lerebours
KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
Drag Platform Help, After Mc Char Hits, It Works Or Doesn't Work Anymore
I am trying to start coding again, woohoo, so I am making a game.
Here is the link to the game.
I have the code on the platforms that you can drag. Char is the character mc.
ActionScript Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
if (this.hitTest(_root.char)) {
this.stopDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
}
}
When the character lands on the platform the drag shouldn't work. Which it doesn't work, but sometimes one of the platforms cannot move anymore until the character hits it again. Just test it out and you will see my problem.
Maybe it isn't even the drag code. Maybe it is the character, here is the AS in the character.
ActionScript Code:
onClipEvent (load) {
var platforms:Number = 5;
var fall:Number = 0;
var gravity:Number = 11;
var speed:Number = 0;
var maxSpeed:Number = 10;
var jump:Boolean = true;
var jumpSpeed:Number = 0;
var jumpHeight:Number = 12;
}
onClipEvent (enterFrame) {
_y += fall;
fall<gravity ? fall++ : fall=gravity;
_x += speed;
if (Key.isDown(key.RIGHT)) {
speed<maxSpeed ? speed++ : 0;
} else if (Key.isDown(key.LEFT)) {
speed>-maxSpeed ? speed-- : 0;
} else {
speed<0 ? speed++ : speed>0 ? speed-- : 0;
}
if (Key.isDown(key.UP) && !jump && fall<3) {
jump = true;
}
if (jump) {
if (jumpSpeed>0) {
_y -= jumpSpeed;
jumpSpeed--;
fall = 0;
} else {
jump = false;
}
} else {
jumpSpeed = 0;
jumpSpeed = jumpHeight;
}
for (i=1; i<=platforms; i++) {
var mc:MovieClip = _root["p"+i];
if (hitTest(mc)) {
if (_x<=mc._x-_width+speed) {
_x = mc._x-_width;
speed = 0;
} else if (_x>=mc._x+mc._width+speed) {
_x = mc._x+mc._width;
speed = 0;
} else if (_y<=mc._y-_height+fall) {
_y = mc._y-_height;
jump = false;
fall = 0;
} else if (_y>=mc._y+mc._height-jumpSpeed) {
if (!jump) {
fall = jumpSpeed;
} else {
_y = mc._y+mc._height;
fall = 2;
}
jumpSpeed = 0;
jump = false;
} else {
if (_x<mc._x-_width+(mc._width/2)) {
_x = mc._x-_width;
} else {
_x = mc._x+mc._width;
}
}
}
}
}
[F8] Target Frame Doesn't Work?
Hey all, I made a menu in flash with buttons that use getURL to link to pages in other frames. I used the getURL in this format: getURL("pagename.html","targetname"); but for some reason, the URLs load in new windows instead of the correct frames! I matched all the frame names and this still doesn't work. Am I missing something obvious?
Thanks in advance!
Frame Jump Doesn't Work
Hi all, i got a question, i'm building a Flash Learning Object using SCORM, that's why i have to read a variable X in the first frame and if X > 1 i have to jump to the X frame.
I already had the code to jump to the next frame for a Next Button
PHP Code:
this.btn_nextframe.addEventListener(MouseEvent.CLICK, function() {gotoAndStop(currentFrame + 1) });
So i thought that i just had to write
PHP Code:
if (int(sco.SCO_location) > 1) gotoAndStop(int(sco.SCO_location));
But it doesn't work... it just stay in the first frame and (it seems) a movieclip in that frame goes to frame X.
If i use gotoAndPlay instead of gotoAndStop my flash jump to the second frame (even if X is not 2) and hold there.
So how to make a frame jump in the right way?
On HitTest Go To Next Frame? Why Doesn't This Work?
Ok so I put this little hittest box at that takes u off the path and makes u go to the other screen, I put these actions on it:
onClipEvent(enterFrame) {
if (this.hitTest(_root.Hero)) {
gotoAndStop("Woodhaven1");
}
}
But when ever the "Hero" walks on it it doesn't teleprt u to the other frame ("woodhaven1")... Can someone plz tell me what I'm doing wrong.
Thanks!
Koolaz Games
Stop(); In First Frame Doesn't Work. Why?
Hi!
I sometimes run in to this weird problem where my stop(); frame doesn't actually stop. I have a movieclip named NestingMc which I bring to the stage via actionscript. Inside my NestingMc I have a movieclip ChildMc. ChildMc has a timeline on it's own and on the first keyframe of that timeline I have written a simple stop(); command. But my ChildMc doesn't actually stop in the first frame it just plays to the next keyframe that has a stop(); command.
Anyone?
Array - Using Push To Add Value From A Different Key Frame Doesn't Work
Hey
This one has got me. I have a simple array on the actions of a button, in a movie clip on frame one. The array contains three values:
myarray [1,2,3];
On release, the playhead advances to frame 5 of my MC and does a few loops then runs through some 3 conditional statements. In each one I attempt to add a value to the end of myarray using the push method:
myarray.push(1)
Problem is, nothing is added to myarray. I thought it was a path problem so I used this.myarray, and _root.myarray to no avail.
The only way push or splice for that matter seem to work is if they are in the on release action with the original array?
What the hell's going on. And any suggestions.
Thanks
Frame Rate Doesn't Work Anymore
frame rate doesn't work anymore
i though what happens if i plave 0 by the frame rate but the movie doesn't play ofcourse so i wanted to put it back but if i enter 5 and i want to play the movie i made it turns back to 0 please help a newbie!!!!!
Calling A Frame Label In Mc Doesn't Work :-)
im using MX
calling a frame label in mc doesn't work :-)
here is my label in the GreenPaketaLeft MC : EndStart
the mc is placed on the _root stage and im trying to call him and tell him to play. like this:
gotoAndPlay("_root.GreenPaketaLeft.EndStart");
i tried to load this action as in a clip_event :
onClipEvent (load) {
gotoAndPlay("_root.GreenPaketaLeft.EndStart");
}
the result is that the mc("GreenPaketaLeft") return to his starting point and doesnt work as i ordered him to
:-(
please help
:::NeoSwf:::
GetURL In Last Frame Doesn't Work When Is In An Html
Hi there, i need your help, i been using the flash 8 since it came out and i had problems sicne then.
The first and urgent, seems that flash script has trouble with the navigator, it doesn't communicate. Problems with frames, and problems with loading html...
Let me explain more clearly: i need that my .SWF at the end load an html site in self, it works using the getURL in the last frame, yes so wheres is the issue?, this is it: it works when i execute the .SWF file (outside of an html page), but ofcourse we need to put this .SWF file in html, well i did it, and what happend? it doesn't work, yes, still wondering why!!!
Now after i notice, neither my buttons work with the same instruction, so, i don't know if it's a matter of re-installing the flash but, there is something wrong, either with frames in netscape, explorer etc..they told me that i have to put the target="_self" where the flash file is (frame) but it doesn't work either, so i wonder if there is a flash master who can help me, probably i'm missing something!!! thanx guys!!!
MC Telling Another MC To Go 2 Frame Doesn't Work But Once In Sequence Of Frames
I am really at a complete loss here. I have been working on a flash project for 3 weeks, and it has finally all come together save for the very last step. The step is thus:
I am making a website navigation tutorial, and in the tutorial you go to a step, and then hit the play button and it demonstrates the use of the page. Since I don't want a big encrouching flash popup that fills the screen, the tutorial screencap within the project startes at 50%, then sizes up, in a masked window, onto the important parts.
Now then, becaus this tutorial has 9+ steps to it, i wanted to stay away from hard coding when it was easy to. As a result, when they hit the play step button on a tutorial step page, a timeline plays that changes the _Xscale and _Yscale properties of the screencap, and at the same time runs that screen caps simple 5 frame timeline, centering the important region as it is zoomed in on on the screen. Got all that? Click a button, changes X Y scale values and moves along small separate timeline. Now here is where it gets nuts.
The client wanted a blade runnery style transition (whatever.) so the timeline that changes the XYscale has a strobe everyother frame, as per the effect in the movie. So rather than have timeline (play) I have a timeline (next frame) every so often. And when they wanna zoom out I can just use timeline (previous frame). Easy simple. Fantastic I am done.
Nope.
What happens, upon hitting the button, is that the little motion tween timeline plays the first frame, and then stops. Doesn't play anymore. Period. I replaced next frame and previous frame with got to (1, 2, 3, 4, 5) and the same thing happened. I can't have misspelled the target since the first one worked and I cut and pasted that one. And I didn't cut and paste it wrong. I checked. So please, good people of flashkit, the best damn flash learning site I have ever seen, please you people help me. I feel ended here.
Preloader Doesn't Work -> 1 Frame Crammed With Data
greetings to all members,
I just included a preloader into my current swf. Problem is, the first frame of the movie loads 80 % of the file(library is the one to blame I guess). But since the preloader doesn't start until all frames of it's scene are loaded I got a blank site when opening the swf in a browser and after loading is completed the preloader doesn't even show up because the main scene is already established.
My question: How can I force Flash to load the preloader scene frames first and/or suspend the library loading till later frames?
I already tested changing the loading order(top to bottom and vice versa), didn't show any effect. I also scanned several tutorials on the theme but they all didn't load that much data in the first frame. Any help on this problem would save quite some of my brains.
thank you for your attention
GoToAndPlay Random Frame Doesn't Work In Browser
I have a movie and I would like it to start at a random frame... it works great when i preview it, but it doesn't work when I publish it to my browser. Any help would be greatly appreciated.
Code:
_root.onLoad=function() {
var random_frame:Number = random(6)+1;
switch( random_frame ) {
case 1:
gotoAndPlay(2);
break;
case 2:
gotoAndPlay(100);
break;
case 3:
gotoAndPlay(150);
break;
case 4:
gotoAndPlay(200);
break;
case 5:
gotoAndPlay(250);
break;
case 6:
gotoAndPlay(300);
break;
case 7:
gotoAndPlay(350);
break;
}
}
Any suggestions?
GoTo Doesn't Work With LoadMovie In One Single Frame?
hi folks, here's my scenario:
I need to have 3 single labelled frames/cells: anime1a, anime1b, and anime1c in the main timeline. They need to be single cells because I am using onKeyPress Previous and Next as navigation... like a manual slideshow.
these three cells each has a goToAndPlay action that targets a same external movie -- anime.swf, but to different frames. Now the problem is, since anime.swf is an external movie, I need to call it up with loadMovie ("anime1.swf", "target"); but this causes the movie to play from the beginning even if I state
stop ();
tellTarget ("target") {
gotoAndStop (2);
}
the goTo action doesn't seem to register.
if I don't do a loadMovie in every cell, and do it only right at the beginning, it works fine, but I have problem displaying the correct movie once I bring in a second set of cells targeting at another movie.
What should I do?
Drag Drop And Button Help
Hi.. I really need help with D&D..
I made a MC. that appears when you press a button (with gotoAndPlay action, not anything fancy). and this Movie clip is draggable.. Easy.
But there is a problem.. I have a button inside of this movie clip that when you press it, it goes back to the frame I initially have my button to pop this window up. The problem is. I can't make it to work, as it drags along with the MC window. Any ideas??
I hope I made myself clear ^^;
Thanks in advance.
Help With Drag And Drop Button?
alright, im looking on a way to have a drag and drop button (guessing thats the correct term). I want to have a place on the page where there is a specific area where a button (each linking to a different page) will be dragged into. When the button is dropped into the area, the link opens. Idk how hard it woudl be to do, or have any idea how to tackle this...but its something i really want to do with my site, and wondering if anybody knew any script or technique for doing it.
Any questions email me illigx@zuppa.com , or reply.
thanks
Help With Drag And Drop Button?
alright, im looking on a way to have a drag and drop button (guessing thats the correct term). I want to have a place on the page where there is a specific area where a button (each linking to a different page) will be dragged into. When the button is dropped into the area, the link opens. Idk how hard it woudl be to do, or have any idea how to tackle this...but its something i really want to do with my site, and wondering if anybody knew any script or technique for doing it.
Any questions email me illigx@zuppa.com , or reply.
thanks
A Drag And Drop Button
Hi all!
I have a sphere that you can drag and drop. When you release a button on the sphere, a small menu extends out. I know how to make the sphere drag and drop with from the actions frame. but any button that is on the sphere does not activate the little sliding menu that extends from it. Any ideas on why this button won't work? Is it that the extending menu is an animation inside the sphere_mc and the button there can't be read?
Any help on this would be great! Glad to see the forum is up and running again. I love this place! Thank you very much in advance.
Peace!
Randy
[F8] Clip Loads If AS Is On Root Stage, But Doesn't Work When I Put It On The Frame I Want
I'm confused. the following code (which tries to load an external .swf onto the stage) works when it's the only thing in the .fla file, when it's on the _root stage, but when I put it inside my movie in a sub-clip, it does absolutely nothing -- no event handlers are called for the movie load event, and nothing shows up on the stage. I can only tell the code is being called because of the trace("1").
why would this work only on _root and how can I work around this?
thanks in advance,
Gum P.
code:
trace("1");
createEmptyMovieClip("xcIntro", this.getNextHighestDepth());
var mclListener = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace("movie loaded");
}
mclListener.onLoadStart = function(target_mc:MovieClip) {
trace("movie load started");
}
var intro_mcl:MovieClipLoader = new MovieClipLoader();
intro_mcl.addListener(mclListener);
intro_mcl.loadClip("test.swf", xcIntro);
[Flash8 & HTML] - Linking To Frame Just Doesn't Work. Need An Advise.
Hi
I can't make the Flash actionscript "getURL" link to an HTML Frame.
It's 3 days now that I'm Breaking my head trying to figure that out.
I'm working on:
- Mac PowerBook G4.
- with Flash 8.
- Dreamweaver for HTML.
- Browsers: FireFox & Safari.
I'm trying to create an HTML Frameset with 2 Frames ("up" and "down", in one of them ("up") there's a Flash navigation Panel and the other Frame ("down") is the target Frame to load the HTML's into.
I read a lot of tutorials (including the Kirupa-tutorial here: http://www.kirupa.com/developer/flash5/frames.htm), most of them says the same, but non of them works.
Whenever I target my file (in Flash, using "getURL") to "_self", "_top" or "_parent", it works just fine and loads the file to the right Frame.
Whenever I change the targeting to the Frame's Name ("up" or "down", as mentioned), it loads the file to a new browser window (which means, it doesn't find the target).
I assure you that it is not a problem of misspelling or so.
I followed the instructions of the Kirupa-tutorial, in the link above, step by step, and it didn't work too.
I'm attaching a zip file, containing 2 of my (not working) testing files.
If there's anyone here who can help, please check this out and see if you see any mistakes.
Or even just let me know if it works/doesn't work on your system.
THANKS A LOT
Sharonyc
Button Scroll Works But Drag Bar Doesn't (Scrolling MC)
Hi there,
I followed a tutorial that enabled me to scroll an MC with buttons and a drag-able bar. The original tutorial was for a vertical scroll, but I changed everything Y to X and modified what I thought were the correct things, to convert it all to a horizontally scrolled MC, but alas, only the buttons work. The drag bar does a weird thing when you click it, and scrolls vertically and moves up on the stage. I have been experimenting for hours but my brain is squish. Can anyone pleeeaasse help me figure out what Im going wrong?
Here is a link to a page that shows the SWF, and you can download and please look at my FLA:
http://www.lucid-life.com/scroll-mc.html
Many many many thanks in advance,
Cheska
Sound Object - Doesn't Work When Calling Previous Timeline Frame?
Hi everyone.
I'm having this problem that is more theory rather than code and I'm wondering if anyone has had the same issue.
I'm using the sound object in flash to script all my sounds. Everything is fine, exept - when there is a sound playing (looping for example), and my MAIN timeline is called to a previous frame - the sounds just stop working.
Does the sound object not allow sounds to play when called to a previous keyframe?
Wondering if someone has had this problem.
Thanks alot!
Button Problem With Drag And Drop
Ello,
I recently took a tutorial on how to drag and drop.
It works.
What i want to do is be able to drag the car image on to the screen then change the colour of it by click a corosponding coloured button.
This all seems to work fine but the corosponding colour button follows the draged car around on the screen.
How do i get the colour button to stay in one specific place with out putting it in a diffrent movieclip/graphic.
I have uploaded what i have done with this post.
Thanks loads
Aidans
Button Click While Using Drag And Drop
hi
I have a movie clip containing picture and buttons over it.I want to move the entire mc using drag and drop.While doing this the buttons are not working,can anybody help me out?
Drag'n'drop(again):submit Button
Hi
I have a drag and drop thing where there is 4 good dropzones and 4 bad drop zones. That all works fine but I want the submit button to appear when all of the objects are in a dropzone. I have the following code for this:
Code:
function checkStatus() {
var total;
for (i=1; i<8; i++) {
total = this["dragText_"+i].inDropZone;
}
if (total == true) {
this.btn_ok._visible = true;
} else {
this.btn_ok._visible = false;
}
}
The problem is that if I drag the last item first, the submit button shows. I want the submit button to show no mater what order the items are dropped on the targets.
Does this make sense?
Would appreciate the help, cheers
Reset Drag And Drop Using A Button
I am creating a simple holiday card using drag and drop to create a snowman. I followed a tutorial on drag and drop from lynda.com which uses two external actionscript files, a method with which I am not terribly familiar. The tutorial included no way to do a reset button and I can't seem to figure out how to do it and which file I should even use to do this. Is there anything anyone could do to help?
Here is DragGame.as:
Quote:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import DragDrop;
import BS;
import BR;
import BT1;
import BT2;
import EC1;
import EC2;
import BC1;
import BC2;
import BC3;
import BC4;
import BC5;
import BC6;
import BC7;
import CN1;
import HM;
import LBA;
import LE;
import LH;
import LS;
import MS;
import RB;
import RE;
import RM;
import RS;
import SC;
import SG;
import SS;
import TH;
import TS;
import WH;
public class DragGame extends MovieClip
{
private var bs:BS;
private var br:BR;
private var bt1:BT1;
private var bt2:BT2;
private var ec1:EC1;
private var ec2:EC2;
private var bc1:BC1;
private var bc2:BC2;
private var bc3:BC3;
private var bc4:BC4;
private var bc5:BC5;
private var bc6:BC6;
private var bc7:BC7;
private var cn1:CN1;
private var hm:HM;
private var lba:LBA;
private var le:LE;
private var lh:LH;
private var lm:LM;
private var ls:LS;
private var ms:MS;
private var rb:RB;
private var re:RE;
private var rm:RM;
private var rs:RS;
private var sc:SC;
private var sg:SG;
private var ss:SS;
private var th:TH;
private var ts:TS;
private var wh:WH;
private var _totalPieces:Number;
private var _currentPieces:Number;
And here is DragDrop.as:
Quote:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
public class DragDrop extends MovieClip
{
public var _targetPiece:*;
public var _origX:Number;
public var _origY:Number;
public function DragDrop()
{
_origX = this.x;
_origY = this.y;
this.addEventListener(MouseEvent.MOUSE_DOWN, dragMovie);
this.addEventListener(MouseEvent.MOUSE_UP, dropMovie);
this.buttonMode = true;
}
private function dragMovie(event:MouseEvent):void
{
this.startDrag();
this.filters = [new DropShadowFilter()];
this.parent.addChild(this);
}
private function dropMovie(event:MouseEvent):void
{
this.stopDrag();
this.filters = [];
}
/*public function disable():void
{
this.buttonMode = false;
this.removeEventListener(MouseEvent.MOUSE_DOWN, dragMovie);
this.removeEventListener(MouseEvent.MOUSE_UP, dropMovie);
}*/
}
}
Button Within Drag And Drop Layers, Please Help
Hi, I am trying to have several drag and drop movie files which look like a load of photographs that can be moved around the page, but each with a button that clicks on to another frame. Can this be done?
I have done the drag and drops fine and I have also done one on its own grouped with a button which works but when I have several of these in a file, they all seem to get stuck together and wont move independently. I have attached examples of what I am trying to do. (oh I also want the next frame to stay still, not move with the other stuff)
Thank you to anyone that can tell me how to have both at the same time!
Drag'n'drop Score=6, Show Ok Button. Please Help
Hi all,
Im building a drag and drop learning tool for kids. there are 6 dropzones and 12 dragable items. I have it that the ok button is set visible=false. So everytime you drag an item and drop it onto a dropzone it adds a score 1. I want the ok button to be visible when all 6 of the dropzones are filled. so i put in the following:
btn_ok._visible = 0;
if (_root.score ==6){
(btn_ok._visible = 1)}
But this does'nt seem to work
I would be really greatfull if anyone could give me a hand on this one
Thanks
Drag/drop Button In Mc Loaded Into Empty Mc
Hi there folks
I have a drag and drop button in a mc that also has a set property for scale. This mc loads into an empty mc on my main stage. It works fine in IE but in some versions of Netscape, it scales and drags the whole movie clip instead of only the button. Any suggestions?
thanks!
ogm
Drag ,drop Window And Then A Close Button?
ok i have made a small window to drag and drop ,,it works fine .but i have a button on this window ,,so when the user drags and then drops the window ,now i want the user to be able to close it ..i can set 1 or the other (1 it drags and rops but cannot close it ?2 it doesnt drag but you can close it ...i have tried many things to get this to work ..its slowing my work progress down and i cant figure it out ?? thanks for your help on this !
Why Doesn't My Button Work?
In a movieclip which is called box3, I put a button in it that I had made before. In the edit mode of MC box3 I went into the object actions for the button. I put in this:
on (release) {
tellTarget ("box3") {
gotoAndPlay (50);
}
}
I wanted the MC to jump to frame 50 when the button is pressed (released). But when I run the movie (I put the MC on the main scene first) I can't click the button. It doesn't even change, it's just there like any other object.
Please help!
Thanx...
/Peter
|