OK, I somehow screwed up in my example. The browser is supposed to shake on pressā¦ Dammit !\r\rpom 0] \rConcerning your hole thing, just attach a movie on press. Iām making an example, wait a sec, he he he.
Arghhh!! I canāt upload !!\rAnyway thatās what you have to do : make your hole movie clip. In your library, right click the hole, choose āLinkageā, and export it under the name āholeā. Then put an empty movie clip on your scene, and add this code :
onClipEvent (load) {\r\r        i = 0 ;\r\r        function trinity () {\r\r                i++;\r\r                attachMovie("agent", "t"+i, i);\r\r                var mc = this["t"+i];\r\r                mc._x = _xmouse;\r\r                mc._y = _ymouse;\r\r        }\r\r}\r\ronClipEvent (mouseDown) {\r\r        pressing = 1;\r\r}\r\ronClipEvent (mouseUp) {\r\r        pressing = 0;\r\r}\r\ronClipEvent (enterFrame) {\r\r        if (pressing) {\r\r                trinity();\r\r        }\r\r}
About that window, just put a if test here and there in the mouseDown handler.\rpom 0]
yeah thanx Pom! youāre the best! just one thing!!\rthe movie attaches on the screen, yes. The thing is that it attaches everywhereā¦now i want it to attach ONLY on window. (only on a particular MC)
Heās the one who showed me how attachMovie workedā¦ But I did that code myself (feel the pride in the voice ? )\rJust change the code a little bit :
onClipEvent (mouseDown) {\r\r if (_root._xmouse < 350 and _root._xmouse > 50) {\r\r if (_root._ymouse < 300 and _root._ymouse > 100) {\r\r pressing = 1;\r\r }\r\r }\r\r}
Or if your window is a clip, you can use hitTest (). Tell me how this works.\r\rpom 0]
sorryā¦but i think that this has no senseā¦what does this code have to do with this what i want?\r\rI meanā¦if i paste this code into the window clip actions then nothing happens and if i change the code in hole clip (in the place where onClipEvent (mouseDown) is) error shows up!\r\rBut in this code isnāt any information that hole SHOULD appear on window and that the hole SHOULDNāT appear on white backgroundā¦get it?
sorryā¦but i think that this has no senseā¦what does this code have to do with this what i want?\r\rI meanā¦if i paste this code into the window clip actions then nothing happens and if i change the code in hole clip (in the place where onClipEvent (mouseDown) is) error shows up!\r\rBut in this code isnāt any information that hole SHOULD appear on window and that the hole SHOULDNāT appear on white backgroundā¦get it?
OKā¦ That was an example. I guess errors occur because of the āandā. Make that ā&&ā and the errors should go.\rNext thing, it has nothing to do with a window whatsoever because that code tells Flash to attach movies only if the mouse is located within a certain area (that 350, 150ā¦ figures). Iāll try and make an example with collision detection, wait a minute.\r\rpom 0]
Working. Put that code to the window movie clip
onClipEvent (enterFrame) {\r\r if (this.hitTest (_root._xmouse,_root._ymouse,true)) {\r\r _root.overlord = 1 ;\r\r } else {\r\r _root.overlord = 0 ;\r\r }\r\r}
All you need to do then is to change a little bit of the code in the empty movie clip
onClipEvent (enterFrame) {\r\r if (pressing && _root.overlord) {\r\r trinity();\r\r }\r\r}
Happy now ??\r\rpom 0]
Example here :
thanks to youā¦my work will be on top 50 in NG!\r(donāt worry, i have put a credit for ya too!)
i know this is not hard! but i just canāt do it!\r\rokā¦i have a movie clip (hammer). Now. When i drag (hammer) and drop it on other movie clip, i want that movie clip to start playing. \r\rget it? this is the one last thing i need (i think)!
Change the code a tiny bit :
onClipEvent (enterFrame) {\r\r if (pressing && _root.overlord) {\r\r trinity();\r\r _root.window.play () ;\r\r }\r\r}
Can you show us the final effect when itās online ?\r\rGood luck.\r\rpom 0]
sure why not! and you mean the final game?\r\rheck iāll even give you the darn source code if you want!\rand i forgot to askā¦can i acctually put your credit on the game with the name āPomā?
one more THING not QUESTION \r\rcan you give me the source code of a rubber? you knowā¦when you pull a rubber and thenā¦oh you know!\r
the thing with drag ān drop MC on other MC and then the other MC starts to play. It doesnāt work!\r\rletās start from beginning!\r\rI have a MC on the stage called āgirlā which you can drag around the stage. The other MC is called āboyā and the poor little fellaā canāt be dragged! But when i drag and drop the MC called āgirlā on āboyā, the MC āboyā starts to play and the girl dissapears.\r\rthatās REALLY REALLY one last thing!
In the girl movie clip :
onClipEvent (enterFrame) {\r\r if (this.hitTest (_root.boy) {\r\r this.visible = 0 ;\r\r _root.boy.play () ;\r\r }\r\r}
should work. I didnāt try it, post back if it doesnāt work.\r\rpom 0]
i thought that this was over but it isnātā¦sorry!\r\rRemember my first question? when you press the mouse and the MC attaches? wellā¦i have many more objects on the stage. The thing is that when i click on a hammer and press on a screen there are holes (because of breaking) and when i press on some other object that i want to use e.g. knife, i want that object to have itās own MCās that are attached to the stageā¦that means if i choose the hammer as a tool, there will be holes on the screen when i click. And when i use knife as a tool, there is a cutting on the screen when i click. Get it?\r\rEvery MC that is draggable has itās own MC that will be attached when clicked with it. (this is a simple explanation)\r\rThank you!
anyone? please? I PROMISE that this is the last thing i need to complete the game.
this script doesnāt work:
onClipEvent (enterFrame) {
if (this.hitTest);(_root.boy) {
this.visible = 0 ;
_root.boy.play () ;
}
}
it sez:
Clipboard Actions: Line 2: ā)ā expected
if (this.hitTest (_root.boy) {
if i do this
if (this.hitTest) (_root.boy) {
then it says ; expected
Itās
if (this.hitTest (_root.boy))
pom 0]