Drop-Down Meny
Hi! New to this forum from today I did the
Creating Drop-Down Menus by Syko
But when i try the meny button i get this error message
"**Error** Symbol=main, layer=button, frame=1:Line 1: Mouse events are permitted only for button instances on(rollOver) {
**Error** Symbol=main, layer=invisble, frame=20:Line 1: Mouse events are permitted only for button instances on(rollOver) {
Total ActionScript Errors: 2 Reported Errors: 2 "
I'm farly new to Flash, so i don't know that much about actionscript, but i did everything from the tutorial and it still doesn't work.... what am i doing wrong !!!!!!
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-09-2004, 03:17 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Drop-Down Meny
Hi!
New to this forum from today
I did the
Creating Drop-Down Menus
by Syko
But when i try the meny button i get this error message
"**Error** Symbol=main, layer=button, frame=1:Line 1: Mouse events are permitted only for button instances
on(rollOver) {
**Error** Symbol=main, layer=invisble, frame=20:Line 1: Mouse events are permitted only for button instances
on(rollOver) {
Total ActionScript Errors: 2 Reported Errors: 2 "
I'm farly new to Flash, so i don't know that much about actionscript, but i did everything from the tutorial and it still doesn't work.... what am i doing wrong !!!!!!
Stupid Drop-down Meny
@¤#"!¤"#"#¤ ... i got the stupid drop-down meny to work... but when i try to put it in a flash movie it doesnt work....
PLEAS... what have i missed here?? The drop-down meny is a graphic... could be the problem? If so can it be converted to work as a button... ?!?! So many question from the newbies
Stupid Drop-down Meny
@¤#"!¤"#"#¤ ... i got the stupid drop-down meny to work... but when i try to put it in a flash movie it doesnt work....
PLEAS... what have i missed here?? The drop-down meny is a graphic... could be the problem? If so can it be converted to work as a button... ?!?! So many question from the newbies
RIGHT CLICK MENY :(
When you make your flash 5 site into a HTML file you right click on the page and it says "About flash 5" or something like that, How do I make that go away?
Problems With MC Meny
Hi everybody! Here's my thread, i've got 6 scenes and 1 MC with buttons that "will" controll the hole thing, the thing is that i've given the buttons inside the MC the order to play frame 1 in scene 1 and so on for the 6 scenes with six different buttons, button 2 scene 2 frame 1... ( i've called scenes 1, 2, 3... and so on....) but it seems that it just keep sending it to frame1 inside the MC, i want it to send me to the scene i've told it... i've tried with labels and didn't work either... please help!!!!! this is really important for me :-)
Here's the file
http://www.geocities.com/danieldmm/whatimeant.fla
[Edited by gutt666 on 04-02-2002 at 03:21 AM]
..::Advanced Meny::..
I wonder how to do a meny that is -say 4 buttons, when I mov over the first button a thing moves around the firsta button and stays there, and when i move to say button 3 the thing moves from button 1 to button 3......now to the question, anyone got a actionscript fot this one?
and the other question is how to do a text that appear on the(and follows the pointer to) pointer when moving over at text or a picture?
www.razorclean.com
Most Amazing Meny Ever
I wonder how to do a meny that is -say 4 buttons, when I mov over the first button a thing moves around the firsta button and stays there, and when i move to say button 3 the thing moves from button 1 to button 3......now to the question, anyone got a actionscript fot this one?
and the other question is how to do a text that appear on the(and follows the pointer to) pointer when moving over at text or a picture?
www.razorclean.com
Advanced Meny ?
How do I do this thing that moves when i move over the meny and stays there, check out this site to understand what i mean........... http://www.swift3d.com/v3/default.asp
/Fredrik
Yugop Menü
Hallo i have make the yugop menü now i want to ad an link.
On Press go to next Scene.But it wont work.
mayby you know this error.
Thanks
Hirachie Menü
hi
i would like to create a smal animation.
i want to present a hirachie of a small company
---for each person (name, adress, info, picture)
- it must be easily to add new persons
.........
has anyone evermade something similar ?
thx for your help
Meny Problem
Hi,
I've make a meny with 3 alt and u should be able to choose between them with 2(1) diffrent buttom(s). (Up and Down or only space/select).
alt1 <-
alt2
alt3
[knp_change_alt] or [knp_change_alt_up]/[knp_change_alt_down]
the marked "alt" are the focused.
And to confirm the "alt" you press Enter/start
How do I get this too work?
(my english isn't the best )
Greetings Mikael
How To Make Sub Meny?
Hi!
Have a small problem. I just started playin in flash and doin my first site, so this page really helped me out! Uhm, my problem is quite hard to explain for me cus im swedish n all...
But here it is hope u understand! I want to make a submeny under the main meny. For example: | INFO | STUFF | OTHER |
(and when i klick on INFO other options shows)
INFO > ME, THE SITE, WORK
then here is the problem, how do i do this so when i have klicked on INFO that the sub meny stays even if i change scene. I use the time line WAY to much, very bad to put in movieclips and stuff like that. So plz help me...
Thanks!
How To Make Sub Meny?
Hi!
Have a small problem. I just started playin in flash and doin my first site, so this page really helped me out! Uhm, my problem is quite hard to explain for me cus im swedish n all...
But here it is hope u understand! I want to make a submeny under the main meny. For example: | INFO | STUFF | OTHER |
(and when i klick on INFO other options shows)
INFO > ME, THE SITE, WORK
then here is the problem, how do i do this so when i have klicked on INFO that the sub meny stays even if i change scene. I use the time line WAY to much, very bad to put in movieclips and stuff like that. So plz help me...
Thanks!
Remove Right Click Meny
Hello,
How do you remove the menu that pops up when you right click on the movie in the browser for Flash MX? I knew in Flash 5, but forgot. Thanks
Horizantal Rotating Meny?
does any one have a tutorial on how to make a horizantal image scroller?
http://amazon.com/music-rock-classic...pf_rd_i=507846
something like that.. u might have to refresh a few times to see it.
Flash 4 Meny Movie Clipp
Hej
i have a menu with movie clipps including buttons.
and the mouse over and out works verry good, but i cant tell the button to go to next scen help somebody.
Meny Folow Boxresizing? [2004 MX]
Hi
How do you do to make the meny folow the boxresizing?
In my X i have 2 buttons that i can change the box Whit but i can´t seem to get them to folow the boxresizing like in my example?
Can someone please take alook my test.
// Moahawk
Trouble With My Meny, Wont Retract
in the scene "4004", I have these menus on the top that I put together with the help from a file I found on here.
When you go over the "how to populate" icon in the upper right hand corner, the menu slides down, but it does go back up and hide when your mouse leaves the menu!
I am sure Its something very simple I have left out, but dang it. I cant figure it out.
Also, I have a template, that when you go over it, it expands. I need that template to blow up so the viewer can see the template a bit more clearly, but my mouse only works if he clicks right in the middle, and not in the full template size.
Thanks.
Trouble With My Meny, Wont Retract
I have been on this project for a while. Im a newbie so, its only fair I have tons of problems lol
in the scene "4004", I have these menus on the top that I put together with the help from a file I found on here.
When you go over the "how to populate" icon in the upper right hand corner, the menu slides down, but it does go back up and hide when your mouse leaves the menu!
I am sure Its something very simple I have left out, but dang it. I cant figure it out.
Also, I have a template, that when you go over it, it expands. I need that template to blow up so the viewer can see the template a bit more clearly, but my mouse only works if he clicks right in the middle, and not in the full template size.
Thanks.
here are the files in case you want to see them lol
http://www.pileofgarbage.com/start.fla
swf file
Nice Meny I Wont To Connect To XML
I´w found this nice script and i wonder if ther is any one that knows how to connekt it to XML and then open URL:s , .SWF:s or just open different text discritions in a text box. I hop someone understand whot i wont despite my bad english.
/M
Nice Meny I Wont To Connect To XML
I´w found this nice script and i wonder if ther is any one that knows how to connekt it to XML and then open URL:s , .SWF:s or just open different text discritions in a text box. I hop someone understand whot i wont despite my bad english.
/M
Complex Problem: Meny + Movie Problems
Hi guys
This is a rather complex problem that i dont think you can handle..
I have a meny ( meny.swf ) that have a movement when i click on, lets say meny1. When i have done the first movement i get to frame 2. There i load a new movie ( movie1.swf ). The problem is that when i am in the middle of the second movie ( movie1.swf ), you can still press some of the meny links.
When a person presses the meny link in meny.swf i want a smooth outgone from the loaded movie ( movie1.swf ) to the movement in the meny.
How do i do this? Is there an example that i can look at?
I know that it is a rather complex problem! The files are to big to attach here..
Any solutions anyone? Any example that i can look at?
Regards
Lunkan
Arrow Keys And Enter Meny System
Hi,
I am trying to create a retroish game and have a few features working but now need a menu system. Most older games use the arrows keys and enter for menu navigation.
i was wondering if such a meny system has already been created as it is a simple feature that i am sure someone has made before. If you do know of one can you post it here or give me a link?
thanks in advanced
Complex Problem: Meny + Movie Problems
Hi guys
This is a rather complex problem that i dont think you can handle..
I have a meny ( meny.swf ) that have a movement when i click on, lets say meny1. When i have done the first movement i get to frame 2. There i load a new movie ( movie1.swf ). The problem is that when i am in the middle of the second movie ( movie1.swf ), you can still press some of the meny links.
When a person presses the meny link in meny.swf i want a smooth outgone from the loaded movie ( movie1.swf ) to the movement in the meny.
How do i do this? Is there an example that i can look at?
I know that it is a rather complex problem! The files are to big to attach here..
Any solutions anyone? Any example that i can look at?
Regards
Lunkan
Drag And Drop MC, Involves Polygonal Boundary, Drop Into Trash.
Hello. This is my desperate problem:
I am creating a circuit diagram designer.
There is basically instructions on the left, in a scrolling textbox (taken care of) and above that a rectangle with a bunch of components in it.
You need to be able to drag the circuit part from the side bar (a duplicate, so that the original remains in the same spot), and to a square on the grid on the stage of this program(Should snap to place...). Each clone should be able to be moved. Like so: You Press on a MC to drag it, the thing you are dragging to the stage is of course a clone. You release the mouse button, so it drops on the grid. It snaps into place. *Oops, you made a mistake. You press on it again, it is draged by your mouse to another square, and does not make a clone. *mind Changes... I dont want to use this one any more. You press on the MC, drag it to a bin which animates to show you the MC is being dragged over it. You release, the MC in question is deleted/removed...
You need to be able to rotate circuit parts by clicking on it so that it highlights, then pressing space bar.
It must also be possible to delete a duplicate by dragging it to the trash (an image/ MC), and last but not least, it is required to save the contents of the stage, or print them off.
Please note that to print it off, there are 2 input boxes outside the stage. One for the title, and one for the Users' Name. When they click on the print button, the two dynamic text fields must retrieve the values from the box outside of the programs' stage.
One Last detail: The cloned objects to be dragged around net to be in a six co-ordinate polygonal boundary, so that no-one can place any objects outside of the stage.
If anyone can help me, i would greatly appriciate it. I need to get this done asap. The graphics have been taken care of, it is just the coding to be done now. HELP, HELP PLEASE!
Thanks - Matt K
Cant Make Apple Drop When Drop Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye
go here for the fla.
Cant Make Apple Drop When Drop Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye
go here for the fla.
Cant Make Ball Drop When Drop Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye
go here for the fla.
Cant Make Ball Drop When Drop Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye
go here for the fla.
Cant Make Ball Drop When Drop Button Is Clicked
alright so what im trying to do is make the apple drop when i click the button. but right now whenever i drag it and let go it falls when i let go. and another thing i want to do it make the timer restart when i click the drop button. thanks bye
go here for the fla.
Drag&Drop Duplicate Movie With Drop Target
Hi There...
I'm creating a game where people can design their own cell phone by adding diamonds to it, a "Bling Phone" if you will. You will be able to add 4 types of diamonds to it, change the phones skin, add music to it, give it a name etc etc
I've got it to a stage where it when you click on a diamond(mc) on the stage it duplicates a hidden diamond(mc with a button inside) off stage and you can drag it around etc and then click save. Theres a script which grabs the instance name, x and y position of every diamond on the stage and stores it into a multi dimensional array which will be fed into a mysql database for retreival purposes at a later date.
Now my problem is i would like to be able to use the phone(mc) as a drop target but i'm not sure where to put the droptarget script. does it go on the original MC diamond or the duplicated mc diamond with the button inside it ?
Once a diamond has been dropped onto the phone i would also like it if the user then drags the diamond off the phone it gets deleted. I think i've got it half working but my variables which keep track how many diamonds are on stage dont appear to be updating.
I've attached the .fla file to this post if some is interested in taking a look and helping me out. The droptarget script is only on the blue diamond so far.
Any help would be much appreciated.
Thanks
Rob
Drag And Drop - Multiple MC's On To A Single Drop Target
Hi All
I am struggling with a drag and drop excercise.
I have 15 movie clips that need to be dragged over a single drop target in a specific order. i.e 1,2,3,4, when the correct movie clip is dragged to the drop target a movie within the drop target needs to advance a single frame to display the result of the correct movie clip being dragged over the drop target.
Would I be correct in thinking I need to use some kind of array to compare the clip that is being dragged to the frame position of the drop target?
I have the bones of this working and need advice / help on getting the clips to work in the specific order required. I can post my code if needed.
Thanks in advance.
btw - am using Flash MX 2004 Professional
[fmx] Drag And Drop With Multiple Drop Locations
Hi
I am trying to make a draggable object have two drop locations, but it will still only drop to one. Please if anyone can help me or notice my mistake it would be really appreciated.
on (release) {
if (_root.DragMotor._droptarget == "/Socket2") {
_root.DragMotor._x = _root.Socket1._x;
_root.DragMotor._y = _root.Socket1._y;
_root.CheckMotorDrop();
} else {
_root.MotorDropped = 0;
}
if (_root.DragMotor._droptarget == "/Socket1") {
_root.DragMotor._x = _root.Socket2._x;
_root.DragMotor._y = _root.Socket2._y;
_root.CheckMotorDrop();
} else {
_root.MotorDropped = 0;
}
function CheckMotorDrop () {
//set the speech bubble to give information
_root.txtSpeech = "You have added a motor to the circuit.";
setProperty(_root.DragMotor, _width, 55);
setProperty(_root.DragMotor, _height, 55);
_root.MotorPowered = 1;
_root.DragMotor.play();
_root.MotorDropped = 1;
}
Thanks for your time, Matt.
Drag And Drop With Additional Drop Area
Hi there i have a little project on at the moment, an educational game for children, where items need to be dragged from one position to another, but with the possibility of being dragged to a seperate holding area first, before being dragged to their final resting area.
i have this code which deals with a straight 'a to b' drag and drop function:
Code:
setProperty(_root.boing,_visible,false);
function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);
this.beingDragged=true;
};
clip.onRelease = clip.onReleaseOutside=function () {
stopDrag();
this.beingDragged=false;
if (eval(this._droptarget) == targ) {
this.onTarget = true;
_root.targ.gotoAndStop(2);
} else {
this.onTarget = false;
_root.targ.gotoAndStop(1);
}
};
//the variables below will store the clips starting position
clip.myHomeX = clip._x;
clip.myHomeY = clip._y;
//the variables below will store the clips end position
clip.myFinalX = targ._x;
clip.myFinalY = targ._y;
clip.onEnterFrame = function() {
//all these actions basically just say "if the mouse is up (in other words - the clip is not being dragged)
// then move the MC back to its original starting point (with a smooth motion)"
if (!this.beingDragged && !this.onTarget) {
this._x -= (this._x-this.myHomeX)/5;
this._y -= (this._y-this.myHomeY)/5;
//if the circle is dropped on any part of the target it slides to the center of the target
} else if (!this.beingDragged && this.onTarget) {
this._x -= (this._x-this.myFinalX)/5;
this._y -= (this._y-this.myFinalY)/5;
setProperty(_root.boing,_visible,true);
}
};
}
dragSetup(circle_mc,targetCircle);
dragSetup(circle2_mc,targetCircle2);
dragSetup(circle3_mc,targetCircle3);
which i have then tried to adapt to 'a to b possibly via c':
Code:
function dragSetup(clip, targ, drop) {
clip.onPress = function() {
startDrag(this);
this.beingDragged = true;
};
clip.onRelease = clip.onReleaseOutside=function () {
stopDrag();
this.beingDragged = false;
if (eval(this._droptarget) == targ) {
this.onTarget = true;
this.onDrop = false;
_root.targ.gotoAndStop(2);
} else if (eval(this._droptarget) == drop) {
this.onDrop = true;
this.onTarget = false;
_root.targ.gotoAndStop(1);
} else {
this.onTarget = false;
this.onDrop = false;
_root.targ.gotoAndStop(1);
}
};
//the variables below will store the clips starting position
clip.myHomeX = clip._x;
clip.myHomeY = clip._y;
//the variables below will store the clips end position
clip.myFinalX = targ._x;
clip.myFinalY = targ._y;
//the variables below will store the clips end position
clip.myDropX = drop._x;
clip.myDropY = drop._y;
clip.onEnterFrame = function() {
//all these actions basically just say "if the mouse is up (in other words - the clip is not being dragged)
// then move the MC back to its original starting point (with a smooth motion)"
if (!this.beingDragged && !this.onTarget && !this.onTarget) {
this._x -= (this._x-this.myHomeX)/5;
this._y -= (this._y-this.myHomeY)/5;
trace("didn't drag anywhere");
//if the circle is dropped on any part of the target it slides to the center of the target
} else if (!this.beingDragged && !this.onDrop && this.onTarget) {
this._x -= (this._x-this.myFinalX)/5;
this._y -= (this._y-this.myFinalY)/5;
trace("correct!");
} else if (!this.beingDragged && !this.onTarget && this.onDrop) {
this._x -= (this._x-this.myDropX)/5;
this._y -= (this._y-this.myDropY)/5;
trace("teacher drop area");
}
};
}
dragSetup(circle_mc, targetCircle, dropPlace);
dragSetup(circle2_mc, targetCircle2, dropPlace);
dragSetup(circle3_mc, targetCircle3, dropPlace);
any ideas where i'm going wrong? it looks right to me but only ever seems to work when you drag 'a to b'
thanks,
dave.
Drag And Drop - When Drop Targets Overlap
Hi,
Please see
http://www.paraminionstudios.com/dump/PleaseHelp.zip for the files I'm requestiong help on (upload tool is not working).
Drag and drop the power generator "icons" on the left of the screen into the designated areas in the 3d scene to "install" power generators along the side of the building.
I have 4 designated regions in a 3d rendered scene. there are 4 dragable power generator "icons" on the far left of the screen. When the generator icons are dragged and dropped upon one of the 4 targets, the target mc advances to frame 2 of the target mc, and the generator icon disappears (actually the generator icon mcs simply advance to frame 2 of the mc.. a blank kframe). Frame 2 of each of the targets contains a small graphic of a generator that fits the perspective of the 3d scene.
my problem here is that my target MCs overlap slightly. This is causing some issues. if you have already "installed" generator 1, and you then go to drag another icon just below target1, flash is getting confused because of the overlapping. Is it possible to change the instance name of the target after dropping a generator icon on the target so that the script doesn't get confused? the layer order doesn't seem to have any bearing on anything here as I had hoped.
The file is located (upload tool isn't working) at:
http://www.paraminionstudios.com/dump/PleaseHelp.zip
On "vacation", working for a client. never fun.
Movie Clip Palette And Drop And Drop
Hi,
I'm just playing around with flash and was experimenting with UI's when i became stuck at a problem. I'm trying to create a movie clip palette (i.e. some container where movie clips would be listed) where the user can drag and drop the mc's (let's call them pMC) onto the center stage, which has three mc's (let's call this mMC). When the user drops the dragged pMC onto one of the main mMC's, i want the mMC to become the pMC. Also, when i drag and drop the pMC, i want a copy of the pMC to stay in the palette.
I'm not even sure if flash is capable of doing this. If you have any suggestions or ideas please post.
thanks in advance!
-rsdl
Drop Down Menus Drop Down UNDER HTML - HELP
Hello-
I am creating a classic dropdown menu system (5 top elements, multiple elements below) and I have the tutorial and a couple of samples. The menu looks great.
However it drops down below the HTML that is absolute positioned near it.
I have made the movie transparent, and then positioned the html within the space of the movie. The HTML is on top.
I tried z-order (in IE) but to no avail.
Any ideas?
I am doing this to move away from a "frames" site.
Drag And Drop : Drop Options
I have some simple drag and drop code here that works fine. But it is set to let each object go to only one "dropZone". I would like be able to have each object be able to go to any of the drop zoned named "dropZone1, dropZone2, dropZone3....". I wouls also like to have is so you can't put multiple object in one zone. Basically, if the zone is being used, the object will again revert back to it's original place. Actionscript is preety new to me so I have trouble with format. I have tried a bunch of stuff that seems like it would work, but I get wierd results. any help would be much appreciated, thanks.
onClipEvent (load) {
this.origX = this._x;
this.origY = this._y;
}
onClipEvent (mouseDown) {
if (this.hitTest(_parent._xmouse, _parent._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_parent._xmouse, _parent._ymouse)) {
this.stopDrag();
// see if the dropZone conatins the center of this mc
if (_parent.dropZone1.hitTest(this._x,this._y,true)) {
// center it on the drop zone
this._x = _parent.dropZone1._x;
this._y = _parent.dropZone1._y;
} else {
// return it to its original location
this._x = this.origX;
this._y = this.origY;
}
}
}
Drag And Drop To Any Drop Target
Hi guys....I am trying to create some more generic code for a project im on....infact you guys have already helped me lots in getting it up and running!
I have basicly got it where all the dragObjects and assigned functions within a for loop and therefore been assigned to their own dropTargets...all working fine, however a situation is needed where if a user drops a clip onto anything rather than a hit area it doesnt just register as an incorrect drop.....at the moment a drag that misses a dropTarget will be the same as one that is dropped onto an incorrect drop target and thats just a bit unfair for them as it means they have used up one of only two chances!!!
basicly I need to know if its possible to obtain using the coding style that i already have been whether a drop is onto any of the drop targets before than going to chec if its the correct one or not....sorry for the long winded talk but seemed the only way i could explain!!!
the code i'm using is below
Code:
var Xpos:Number;
var Ypos:Number;
var objects:Number = 2;
for (i = 1; i <= objects; i++) {
// assigning the on press events to the dragObjects
this["dragObject"+i+"_mc"].onPress = function() {
this.startDrag(true);
// assigning the original X and Y of the dragged clips
Xpos = this._x;
Ypos = this._y;
}
// assinging the on release events to the dragObjects
this["dragObject"+i+"_mc"].onRelease = function() {
// finding the number of the dragObject to use in the submitAnswer function
objName = this._name
dragNumber = Number(objName.substr(10, 1));
submitAnswer(dragNumber);
}
}
// function to assertain whether the drop was a successful one - whether dropObecjt1 was dragged on dropTarget1 and so on
// the number is passed from the onRealease function
function submitAnswer(dragNumber:Number) {
this.stopDrag();
// if its dropped onto its correct target then turn the button off, place ontop of its target
if (this["dragObject"+dragNumber+"_mc"].hitTest(this["dragTarget"+dragNumber+"_mc"])) {
this["dragObject"+dragNumber+"_mc"].enabled = false;
this["dragObject"+dragNumber+"_mc"]._x = this["dragTarget"+dragNumber+"_mc"]._x+50;
this["dragObject"+dragNumber+"_mc"]._y = this["dragTarget"+dragNumber+"_mc"]._y+50;
trace ("knob jockey");
} else {
// if it is dropped onto a wrong target then chuck it back to where it started!
this["dragObject"+dragNumber+"_mc"]._x = Xpos;
this["dragObject"+dragNumber+"_mc"]._y = Ypos;
}
}
thanks for any help!!
Drag And Drop To Any Drop Target
Hi guys....I am trying to create some more generic code for a project im on....infact you guys have already helped me lots in getting it up and running!
I have basicly got it where all the dragObjects and assigned functions within a for loop and therefore been assigned to their own dropTargets...all working fine, however a situation is needed where if a user drops a clip onto anything rather than a hit area it doesnt just register as an incorrect drop.....at the moment a drag that misses a dropTarget will be the same as one that is dropped onto an incorrect drop target and thats just a bit unfair for them as it means they have used up one of only two chances!!!
basicly I need to know if its possible to obtain using the coding style that i already have been whether a drop is onto any of the drop targets before than going to chec if its the correct one or not....sorry for the long winded talk but seemed the only way i could explain!!!
the code i'm using is below
Code:
var Xpos:Number;
var Ypos:Number;
var objects:Number = 2;
for (i = 1; i <= objects; i++) {
// assigning the on press events to the dragObjects
this["dragObject"+i+"_mc"].onPress = function() {
this.startDrag(true);
// assigning the original X and Y of the dragged clips
Xpos = this._x;
Ypos = this._y;
}
// assinging the on release events to the dragObjects
this["dragObject"+i+"_mc"].onRelease = function() {
// finding the number of the dragObject to use in the submitAnswer function
objName = this._name
dragNumber = Number(objName.substr(10, 1));
submitAnswer(dragNumber);
}
}
// function to assertain whether the drop was a successful one - whether dropObecjt1 was dragged on dropTarget1 and so on
// the number is passed from the onRealease function
function submitAnswer(dragNumber:Number) {
this.stopDrag();
// if its dropped onto its correct target then turn the button off, place ontop of its target
if (this["dragObject"+dragNumber+"_mc"].hitTest(this["dragTarget"+dragNumber+"_mc"])) {
this["dragObject"+dragNumber+"_mc"].enabled = false;
this["dragObject"+dragNumber+"_mc"]._x = this["dragTarget"+dragNumber+"_mc"]._x+50;
this["dragObject"+dragNumber+"_mc"]._y = this["dragTarget"+dragNumber+"_mc"]._y+50;
trace ("knob jockey");
} else {
// if it is dropped onto a wrong target then chuck it back to where it started!
this["dragObject"+dragNumber+"_mc"]._x = Xpos;
this["dragObject"+dragNumber+"_mc"]._y = Ypos;
}
}
thanks for any help!!
"Drop" Sound When A Drop Hits The Water
Hello all...
I just wanted to ask: how do i trigger a sound as a drop hits a water surface?
I'm fairly new to flash, and don't know much about sound-triggering, or whether the drop AND the water need to be separate movie clips, the same movie clip, etc...
Thank you in advance for your help...
Haider
How Do I Get Component Drop-down Menus To "Drop-Up" Instead Of Dropping Down?
Hi,
I've been working on this website that has a component drop-down menu that needs to "drop-up" instead of down. How can I get it to do that?
I have another drop-down menu that is "dropping up" on the home page of the site that I am working on. I think it is doing that because it is positioned at the very bottom of the stage (movie). There is no room for the drop-down to be displayed, so it automatically goes up instead of down. However, there's another two drop-down menus that positioned at the bottom of the stage and for some strange reason they drop-down instead of up.
To see the working "drop-up" menu, click here. This is a testing server, as the site hasn't been launched yet. To see the stubborn drop-down menus that keep dropping down, when they should be "dropping up" then you'll have to enter in a 'test' booking. Select a branch (eg: Sydney), then type in "12345678" for the phone number, then type in a 'Contact Name' (your name or whatever) and then click on "Quick Pickup". You will then be taken to a page where you'll be able to see the two drop-down menus at the bottom on the left-hand side.
Any help will be greatly appreciated.
Blastbum
Drop Target In "drag And Drop Game"
Im very much confused that how the code is wrong here..?on (press)
{
startDrag (this, false);
}
on (release)
{
stopDrag ();
if (_droptarget eq _root.cpu)
{
_root.score = int(_root.score + 1);
gotoAndStop(2);
}
else
{
_root.score = int(_root.score - 1);
gotoAndStop(2);
answer.gotoAndPlay("wrong");
} // end else if
}
Here im prepairing a game where i had palce this script inside a movie clip,having two option Correct amd Wrong,
I had created a box name keyboard
where an image of keyboard when placed it should show that its correct,and..if the movie clip calledkeyboardbutton is placed outside then it shoul show its wrong.
keyboardbutton is the instance name for that keyboard,
Actually its a game showing the Process of flow of operation in Computer..
Where i had also used the CPU and Monitor..please anyone help me out here...
here is a sample file for that:
Flash Drop Down Menu Like Fireworks Drop Down Menu
Is it possible to make a drop down menu in flash that drops down on top of html on the webpage? (i'm not sure how to describe this, what I mean is a drop down menu like the one used on Launch.com) I know this is possible in fireworks, but I want the buttons to have flash rollovers... is it possible to first off do this in flash or 2nd import my flash to fireworks and then make the drop down from there? If anyone could point me towards a tutorial or movie that does this that would be great. Thanks
Drag Abd Drop, Rollover When Drag Is Over Drop Target?
Hi, im using Flash MX 2004.
I am building a drag and drop, and I have a MC that can be dragged around the stage. The trouble im having is trying to make the drop location do something when i drag the MC over/off it.
I have the following code which works.
objectToDrag.onMouseMove = function() {
if ((objectToDrag.hitTest(dropper)) && (component._beingDragged == true)) {
dropper._alpha = 50;
temp++;
trace("working"+temp);
}
}
This will make the clip i am dragging the draggable MC over change alpha, but for the life of me I cant figure out how to get the alpha to change BACK, after the draggable MC is taken away from the 'dropper'.
Is there a better way that hitTest??
Cheerz,
Dwayne
Help With Drop Down Nav Bar... ?
hi, i'm new to flash and i've tried doing the tutorials on this site for drop down nav/menu bar... and also i tried following the model provided by flash (5)... and i thought i had what seemed to be the right setup however it still doesn't work... and i've gone through about 50 pages of these posts to find the answer but i still haven't found it...
i have both sets of buttons created, but when i preview the movie, the main button, when scrolled over, doesn't pull out the other menu... the button functions in and of itself however nothing else works.
i could send the file if it'd be easier to look at... i have the action layer set to stop then "shown" and the script as
On (Roll Over)
Go to and Stop ("Shown")
End On <and the reverse script for the hidden button to reverse and show the initial button>
and it doesn't work... please help!
Drop Down
This is very imbarising but I need a tutorial on how to make drop down menus in flash. Its been quite a while since I played in a.s. and ive forgotten.
|