HElP - Drop Mc Where Mouse Is Clicked - Check My Code
Try to make an mc appear on screen when you mouse down. They are duplicated at the point where you clicked. This code seems to wrok for just 2, but it uses the master as it second drop...the var live seems to go up by 2 each press also...any ideas what i've done wrong or any examples of this..cheers stu..code below
onClipEvent (load) { amount = 5; } onClipEvent (mouseDown) { if (_root.live<=4) { for (i=0; i<=amount; i++) { duplicateMovieClip(health, "health"+i, i); _root.live++; _x = mouse._x; _y = mouse._y; } } }
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-26-2002, 11:49 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Check If Mouse Has Been Clicked
For keyboard keys, you can do something like the following:
if (Key.isDown(Key.UP)) {
//statements for movement...
Is there a way to check whether the left mouse button has been clicked in the same manner?
if (mousePress or whatever) {
//statements for movement...
What would be the best way to do this?
Thanks
Using An IF Statement To Check If The Mouse Has Been Clicked?
Hey all,
I'm trying to write an if statement so that when the user clicks on my button i tween some content in.
Here is my AS Code:
ActionScript Code:
if (news.onRelease == true){
function newsContent(){
easeType = mx.transitions.easing.Elastic.easeOut;
var begin = 0;
var end = 70;
var nbegin = 250;
var nend = 180;
var time = 0.9;
var mc1 = newsTitle;
var mc2 = nContent;
boxTween = new mx.transitions.Tween(mc1, "_y", easeType, begin, end, time, true);
boxTween = new mx.transitions.Tween(mc2, "_y", easeType, nbegin, nend, time, true);
}
}
Cheers in advance all
Check Mouse Position On MC For Drop Down Menu
I am ALMOST done with this god forsaken site. Its taken 10 years off my life, i swear.
ANYWAY. Im trying to make some drop down menus for my side bar. Ive got the button inside a movie clip so that onRollOver it changes that movie clip (inventoryOver_mc) to the 2nd frame (where the drop down menu is). If i write an AS for inventorypop_mc to change the inventoryOver_mc back to the first frame onRollOut, it works exactly how i want....BUUT, the user might still have his mouse over the button, or the user can take his mouse off the button without touching the menu and the menu will still be there.
Im pretty sure this is a simple task, but my brain is too fried to work it out. I can make a fully dynamic inventory, and a dynamic detail page based off of the inventory page, but a DROPMENU has got me stumped.
Mouse Detect Doesn't Work, Please Check The Code
Hi,
What is wrong with that code , it doesn't work
if (_root._xmouse > 390) {
_root.don.gotoAndPlay(6);
} else if (_root._xmouse < 390) {
_root.don.gotoAndPlay(2);
}
There is a mc, intance name "don", that I want to act depending on mouse position.
Thanks for your help
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.
How To Check Whats Been Clicked On?
hi guys
I'm trying to figure out how to know what item on the stage has been clicked on.
i've got the following mouse listener code:
var mouseListener = new Object();
mouseListener.onMouseDown = function(){
trace("hi");
}
Mouse.addListener(mouseListener);
So this code tells me when the mouse has been clicked, but it doesn't tell me what item has been clicked on (e.g. a movieclip). Can anyone point me in the right direction?
Many thanks
Check If All Btns Are Clicked
hi guys ,
i need a very simple interactivity to work on .. i have 6 btns on stage and only when all are clicked i want my next event to take place ..say i want to trace("done ") when all are clicked .. but the user can click the btns in any order..
pls help
If Statement To Check If Scrollbar Has Been Clicked
Hello, i was curious as to whether anyone would be able to help me solve a problem i am having. it starts that firstly i am unable to hyperlink separate sectors of my dynamic text field in my scroll box. so i had the idea of creating fully transparent buttons over the top of each of the items to use as the hyperlinks. The issue is, i need to find a way in which i can change the transparent buttons _y. values so as they move when the scrollbar moves down or up, so that they still hang over their corresponding text
This is why i come to the question, does anyone know the condition i need in the if statement to check whether the scrollbar has been pressed/dragged etc, so that i can then change the _y. values of my invisible buttons to suit.
Thankyou to ANYONE who replies.
Script Help To Check Which Button Is Clicked
hi
This is the scenario.
i have some buttons on the stage, and i have a movie clip where i have some boxes poping up for the buttons clicked. i am able to open up the respective boxes but what i want to do to close already popped up box on click of another button(i have the animation for closing of the boxes also).
i understand i need to assigna a variable for the click and parse some conditions.
can anybody help me in getting the code for it.
Thanks for any help
cheers
GugZ
INDIA
Check Which Element Of The Array Was Clicked
I have 24 elements set and pushed to an array with this code:
Code:
gridArray = new Array();
for (var x:uint=0 ; x <6 ; x++ ){
for (var y:uint=0 ; y<4 ; y++){
var c:Tile = new Tile();
c.x = x*77 + 45;
c.y = y*77 + 5;
addChild(c);
gridArray.push(c);
}//end of for
}//end of for
then i assign listeners :
Code:
public function new_set(){
for (var i:uint=0 ; i<24 ; i++){
gridArray[i].tile_anim.gotoAndStop(anim);
gridArray[i].addEventListener(MouseEvent.CLICK, wrong_click);
}
//choose a random tile
var r:uint = Math.floor(Math.random()*24);
gridArray[r].tile_anim.gotoAndStop(anim+1);
//assign a different event listener
gridArray[r].removeEventListener(MouseEvent.CLICK, wrong_click);
gridArray[r].addEventListener(MouseEvent.CLICK, good_click);
}//end of new_set()
I need to know what to put in the function
Code:
function wrong_click(event:MouseEvent):void{
trace("Are You blind you *******?!?");
}
to make the CLICKED element gotoAndStop(2)?!?
I tried some weird stuff like this.gotoAndStop(2), or gridArray[this].gotoAndStop(2), but thise were only my guesses. Of course they didn't work. How can i do that?
Check Which Element Of The Array Was Clicked
I have 24 elements set and pushed to an array with this code:
Code:
for (var x:uint=0 ; x <6 ; x++ ){
for (var y:uint=0 ; y<4 ; y++){
var c:Tile = new Tile();
c.x = x*77 + 45;
c.y = y*77 + 5;
addChild(c);
gridArray.push(c);
then i assign listeners :
Code:
public function new_set(){
for (var i:uint=0 ; i<24 ; i++){
gridArray[i].tile_anim.gotoAndStop(anim);
gridArray[i].addEventListener(MouseEvent.CLICK, wrong_click);
}
//choose a random tile
var r:uint = Math.floor(Math.random()*24);
gridArray[r].tile_anim.gotoAndStop(anim+1);
//assign a different event listener
gridArray[r].removeEventListener(MouseEvent.CLICK, wrong_click);
gridArray[r].addEventListener(MouseEvent.CLICK, good_click);
}//end of new_set()
I need to know what to put in the function:
Code:
function wrong_click(event:MouseEvent):void{
trace("Wrong Click");
}
to make the CLICKED element gotoAndStop(2)?!?
I tried some weird stuff like this.gotoAndStop(2), or gridArray[this].gotoAndStop(2), but thise were only my guesses. Of course they didn't work. How can i do that?
Cant Make Apple Drop When 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.
Drop Down Menu Problem? It Won't Go To The Frame (scene) When Clicked
I have made a movie with many scenes and keyframes in them. Then I have made a sample drop down menu from a tutorial that I have found on www.help45flash.com. I ahve made the menu as a separate movie clip and have asigned to buttons in that menu tyo go to a frame in some other scene (so the menu is in scene one and I have asigned an action to a button in the menu to go to a frame 2 in the scene 2). But it doesn't work, when I test the movie and click the button the movie doesnt go to a specified location. Why?
Please help me because I need this urgent!
Thank you very much!
Go To Where Mouse Was Clicked
I have this code that makes my MC (named "Block5") go to where the mouse was clicked on stage.
Can some one help me change this code so that I would need to select (click on) Block5 first then click on the spot I want It to go to before It moves ?
Code:
onClipEvent (load) {
_x = 290.0;
_y = 145.0;
speed = 5;
}
onClipEvent (mouseDown) {
endX = _root._xmouse;
endY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
With this code Block5 already knows I want It (and not another block) to move to where I clicked on stage
Action When Mouse Clicked Outside Of Swf?
hey guys long time no post..
anyways im in need of a little help.
I have am swf movie overlayed on a html with absolute positioning etc.
Its a menu slideout for the site im creating..
anyways i was wondering if theres a way you can tell a flash movie to go to a particular frame when the mouse is clicked outside of the flash movie.
Im still using flash 5 btw.. dont like mx at all (action scripting is easier in 5 i reckons
SCROLL DOWN/UP While Mouse Is Clicked
With some help from this forum - I found the code I needed to make my text scroll down/up when the mouse button is held down.. so thank you.
Now, I'd like to apply the code to the next frame, which pulls another external text file. If someone can help me with how to modify the following code to make it work for another frame/text file.... PLEASE DO!!
also, here's a link to see my file in action. (this is before i added the code to make the scroll down/up work when mouse is clicked, because it is only working on one territory)
http://www.berningmarketing.com/stag...ing/zones.html
MY CODE:
var lafayette_req:URLRequest = new URLRequest ("lafayette.txt");
var lafayette_ldr:URLLoader = new URLLoader (lafayette_req);
lafayette_ldr.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
lafayette_txt.htmlText = event.target.data;
}
var upPressed:Boolean;
var downPressed:Boolean;
this.addEventListener(Event.ENTER_FRAME, everyFrame);
function everyFrame(e:Event):void
{
if(upPressed) {
lafayette_txt.scrollV --;
}
if(downPressed) {
lafayette_txt.scrollV ++;
}
}
function startScrollUp(event:MouseEvent):void
{
upPressed = true;
}
function stopScrollUp(event:MouseEvent):void
{
upPressed = false;
}
function startScrollDown(event:MouseEvent):void
{
downPressed = true;
}
function stopScrollDown(event:MouseEvent):void
{
downPressed = false;
}
up_btn.addEventListener(MouseEvent.MOUSE_DOWN, startScrollUp);
up_btn.addEventListener(MouseEvent.MOUSE_UP, stopScrollUp);
up_btn.addEventListener(MouseEvent.MOUSE_OUT, stopScrollDown);
down_btn.addEventListener(MouseEvent.MOUSE_DOWN, startScrollDown);
down_btn.addEventListener(MouseEvent.MOUSE_UP, stopScrollDown);
down_btn.addEventListener(MouseEvent.MOUSE_OUT, stopScrollDown);
[F8] Loading And Unloading External SWF Code Issues, Code Check Please
Okay, I'm still clumsy with AS and I'm having problems loading and unloading external SWFs. I have SWFs created by others in Captivate that need to be controlled by a main menu. I created the menu and buttons and have been trying to code it so that with the button click, the appropriate external SWF loads in an empty movie clip, plays, and then closes at the final frame and returns to the menu. So far, I can get it to load, but then I'm stuck as I'm not sure what I'm missing as far as it reading the frame numbers.
Here's the code I've written. I can't seem to get my idea for the onEnterFrame function checking the frames to work.
What am I missing? Can anyone offer any suggestions or guidance? Thanks!
Code:
this.createEmptyMovieClip("clip1", 1);
myfirst_btn.onRelease = function() {
clip1.loadMovie("externalswf1.swf");
}
mysecond_btn.onRelease = function() {
clip1.loadMovie("externalswf2.swf");
}
mythird_btn.onRelease = function() {
clip1.loadMovie("externalswf3.swf");
}
clip1.onEnterFrame = function() {
if (clip1._currentframe == clip1._totalframes) {
// remove move clip1 and return to menu
clip1.removeMovieClip();
}
}
Mouse Image Change When Clicked
Hello, thanks for reading. I've got this:
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
setProperty("", _x, getProperty("_level0",_xmouse));
setProperty("", _y, getProperty("_level0",_ymouse));
}
What I would like to happen is that when I click the mouse, it changes the image.
I've got the mouse as a movie clip with an "off" image with a stop on that frame and an "on" image with no action.
I thought it would be a this.gotoandplay(2), but I can't figure it out. I just need the on image to be on for a quick frame.
Thanks for the help.
jorge
Overlayed Window When Mouse Clicked...
Hi there,
I need to learn how to do the following...
I have a list of text (bullet points) down one side of the page...
> I want to be able to click on each point...
> When clicked (or rolled over - doesnt matter really), I want a slightly transparent window to appear (can just appear of fade in or wipe in - doesnt matter) WHERE THE POINTER CLICKED showing a more detailed bit of text describing the bullet point.
> I also want to window to include a little "X close" button in the corner...
Does that make sense?
Is this possible in MX? - Im sure it is...
I would search for it but i dont know what to search for!!
Any help would be much appreciated!
Kind regards,
Ben
PS I guess im after something like these adverts you see on yahoo ect, when the ad floats over the text behind but isnt actually a new explorer window... and you hit close to hide it... make sense??
Moving A Clip To Where Mouse Clicked
I have a movie clip that I would like to travel to where the user clicks on the stage. Thus far, I can make the clip "pop" over to where the mouse is clicked, but not travel in a smooth manner. Here is the script I'm working with:
Code:
onClipEvent(mouseDown){
xPos = _root._xmouse;
yPos = _root._ymouse;
if (xPos>_level0.clip._x){
do {_level0.clip._x += 10;
} while (xPos>_level0.clip._x);
}
else {
while (xPos<_level0.clip._x) {
_level0.clip._x -= 10;
}
}
if (yPos>_level0.clip._y){
do {_level0.clip._y += 10;
} while (yPos>_level0.clip._y);
}
else {
while (yPos<_level0.clip._y) {
_level0.clip._y -= 10;
}
}
}
The next step in this process is to orient the clip to face the direction it is traveling towards (ie: where the click occured on the stage) - if it makes things easier to fix now rather than later.
Any help is much appreciated.
How To Move Half-way To Where Mouse Clicked?
Hey everyone, I've got a (hopefully) simple question, and I'm no trig master so I was hoping someone can suggest a solution.
Let's say I have a function that acts like a 'charge-up' power bar... when you click, it increases a variable on ENTER_FRAME until you let go:
ActionScript Code:
var charge:Number = 0;function Start():void { stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDn);}function mouseDn(event:MouseEvent):void{ stage.addEventListener(Event.ENTER_FRAME, startCharge); stage.addEventListener(MouseEvent.MOUSE_UP, stopCharge);}function startCharge(event:Event):void { if (charge<100) { charge ++; powerBar.msk.height = charge; //trace(charge); } else { charge = 100; //trace("100%"); stage.removeEventListener(Event.ENTER_FRAME, startCharge); }}function stopCharge(event:MouseEvent):void { charge = 0; stage.removeEventListener(Event.ENTER_FRAME, startCharge); stage.removeEventListener(MouseEvent.MOUSE_UP, stopCharge);}Start();
What I'd like to do is use this "charge" variable, so when I release the mouse it will use this function:
ActionScript Code:
function moveToClick(event:MouseEvent):void { // create target area var targetClickX:Number = mouseX; var targetClickY:Number = mouseY; var newTargetX:Number = targetClickX*(charge*.01); var newTargetY:Number = targetClickY*(charge*.01); trace("TargetX: "+newTargetX); trace("TargetY: "+newTargetY); // move to target xMovement = new Tween(circleMC, "x", Back.easeIn, circleMC.x, targetClickX, 1, true); yMovement = new Tween(circleMC, "y", Back.easeIn, circleMC.y, targetClickY, 1, true);}
This function moves an MC to where you clicked on the stage.
My basic idea is that I want to specify a 'max distance' the "circleMC" can travel, and use the 'charge' variable to determine how far the MC will go in the direction of the mouseclick... 100% power will go the 'max distance' in the direction you clicked, 50% will only go half the max distance.
So I'm asking:
How can I create a "maximum distance" that the MC can go towards a point (i don't want it to just go wherever you click), and how can I shorten this distance based on the 'charge' variable?
Please help!
*BONUS*
Also, using the trajectory of pointing at the mouse and the power from the powerBar, how can I make a random Wind direction that will alter the MC's normal path?
THANK YOU IN ADVANCE! You guys are the best!
OnMouseWheel Only Fires After The User Has Clicked The Mouse Once
I have a basic onMouseWheel set up:
Mouse.addListener(clip_mc);
clip_mc.onMouseWheel=function()
{
trace("onMouseWeel fired");
}
In the real application it does a lot more than this of course, but this is the essential point to demonstrate the issue. I have noticed that if the user has not clicked the mouse, the mouse wheel event doesn't fire. If the user has clicked anywhere (not even on the listening clip) then the mouseWheel event will fire.
I have tried inserting:
clip_mc.onMouseDown();
clip_mc.onPress();
clip_mc.onRelease();
clip_mc.onMouseUp();
as a hacked effort to trick the mouse broadcaster into thinking a mouse click has occured but that doesn't work.
I just want to have it so my mouseWheel event will work without requiring the user to click their mouse once first. It isn't the end of the world, but it would really add that nice last touch of polish to my applicaiton if I could figure this litle guy out.
How Do I Make A Movie Clip Appear Where The Mouse Is Clicked?
Hi,
I'm making a simple spot-the-ball the game and if the user clicks in the incorrect place then I would like to make a cross appear where they have clicked i.e a movieclip appears at the position the mouse has been clicked. I would prefer to attach the code to the button as I understand this a little better.
can anyone point me in the right direction?
Many thanks
Bev
[F8] Help. Integrate Cpu Check Code With Preloader Code
Hi, guys!
I was looking for a way to do a cpu check over the userīs computer and then, based on the userīs cpu speed, redirect his browser towards one of two different versions of the same flash movie (letīs say, a "light" one without effects and a "full" one with all the effects). Iīve already got a fine working preloader, and Iīve found a nice cpu check code here in this forum. The problem now is that I am not able to put them together. Something like, after a mouseclick, perform the cpu check and after that load a movie based on the previous cpu check...
I am posting my fla and the original cpu check fla that Iīve found here to show what Iīve got so far.
Thanks in advance!
Turn Mouse Pointer Into Dynamic Draw Tool When Button Clicked
i have a button with an instance name of drawBtn, i need this to be the trigger button that turns my mouse pinter into a line drawing tool when pressed down and dragged about the stage, i do not need straight lines but free line drawings.
i have found this code which almosst does what i need yet i need this effect to be only on when the pencil button has been hit then and double clicking to turn this effect off.
I have enclosed an fla and an mx2004 hope this is clear to someone.
createEmptyMovieClip("Line",1)
;Line.lineStyle(1,0x000000,100) ;
onMouseDown = function ()
{
Line.moveTo(_xmouse, _ymouse);
onMouseMove = function ()
{
Line.lineTo(_xmouse, _ymouse);}}onMouseUp=function()
{
onMouseMove=null;
}
Drag / Drop Then Check
Hi!
I have followed so many tutorials on this damn subject!!!
I would like people to be presented with four numbers on tiles on a screen where they have to drag the four tiles into numerical order (smallest to largest) and drop them on four tile spaces at the bottom of the screen.
A) How do you do this?!
B) Can the numbers on the tiles be randomly changed to give numbers between 1 and 100?
Cheers - trying to make teaching the number system in my primary school a little more exciting!!
Drop Down Menu...pls Check The Error.
Hi,
First of all, thanks Kirupa for the drop down tutorial It really helped me a lot. Anyway, it seems there is a small error in mine. I was wondering if someone willing to help me on this.
URL : http://i7test.com/flash/navigation_new.html
Try this :
mouseOver to About Us , then move to What's New.
While ur mouse pointer still in What's New move to the Our Wines
My question is, why the drop down menu from About Us can't hide right away when u did above activities.
Let me know if I should explain it more clearly. Thanks a bunch before.
Drag & Drop Check Answers
Hi,
I've been trawling around the internet all afternoon, but am still unable to find a tutorial of what I want to do. This must have been done a million times, and I'm sure someone must know of a resource to help me out - or maybe help me themselves?
Problem - I'm doing a basic drag & drop test - where you have to drag & drop six items, matching them to the six relevant answers. I want the user to be able to make their decisions and then click a button to check their answers - i.e. "You scored 4 out of 6".
I've been playing with drag and drop for a few days, so have got the basic premise of how it works, so please forgive me if you answer and I don't fully understand.
Help would be greatly appreciated
Down State In Drop Down Menu-then Return To Up State When Other Button Is Clicked?
Hi - nice to meet everyone,
The drop down menu I'm referring to is located in the main movie. The menu is a movie clip with the buttons inside and I have each button as 'track as menu item' in the properties. The buttons are linked to external swfs that load into an empty movie clip on the main stage. Everything loads perfectly no problem. The problem is that I can't seem to figure out the right code to put on the sub-menu items/buttons in the drop down menu to show the 'down' state when the corresponding movie is loaded (i.e., about-main button, philosophy [menu item], philosophy movie loaded). Then get it to go back to the 'up' state when another button is pressed in the same drop area part of the menu? I hope I explained myself clear enough without confusing anyone!
I would appreciate any help - I think I'm going to lose my mind - this is driving me crazy!!
Thanks - Allee
Drag/Drop Multple Items With Check And Continue
Hi,
I'm trying to have the user drag and drop multiple items and when they get all 4 correct the movie would continue playing. I've set up the drag and drop portion in a frame, not on the individual items. I cannot get a checkAll function to work all in the same frame of code. Any help greatly appreciated!
Here is my drag and drop code:
var mcRed:MovieClip;
var mcOrange:MovieClip;
var mcYellow:MovieClip;
var mcGreen:MovieClip;
mcRed.onPress=
mcOrange.onPress=
mcYellow.onPress=
mcGreen.onPress=function()
{
this.startDrag();
}
mcRed.onRelease=function()
{
this.stopDrag();
if (this.hitTest(targetRed))
{
this._x=78;
this._y=298;
}
else
{
this._x=675;
this._y=391;
}
}
mcOrange.onRelease=function()
{
this.stopDrag();
if (this.hitTest(targetOrange))
{
this._x=234;
this._y=290;
}
else
{
this._x=510;
this._y=405;
}
}
mcYellow.onRelease=function()
{
this.stopDrag();
if (this.hitTest(targetYellow))
{
this._x=428;
this._y=290;
}
else
{
this._x=110;
this._y=405;
}
}
mcGreen.onRelease=function()
{
this.stopDrag();
if (this.hitTest(targetGreen))
{
this._x=630;
this._y=290;
}
else
{
this._x=300;
this._y=405;
}
}
How To Check If A Drag & Drop Exercise Is Completed And Then Use A Dynamic Text Box
I am using FlashMX. I have just completed a drag and drop exercise with 6 targets. I would like to have a dynamic text box say "Congratulations" when all six mcs are in the right target.
My drag and drop code on each MC looks like this:
PHP Code:
on (press) {
_root.bringToFront(this);
startDrag(this);
}
on (release) {
stopDrag();
if (this._droptarget=="/box1"){
setProperty(this, _x, 303);
setProperty(this, _y, 62);
}else{
setProperty(this, _x, 489);
setProperty(this, _y, 153);
}
}
I tried adding this to the first frame:
PHP Code:
var finish=0;
if(finish==6){
textbox="Congratulations!"
}
Then to the drag and drop code I tried adding (after setProperty(this, _y, 62)
PHP Code:
finish=finish+1;
I also put a trace on the variable finish. It traces to 0 when the .swf loads, but doesn't pick up on the "finish=finish+1;". Anyone know what I'm doing wrong or what else I could try?
Mouse Check
is there a way for me to check if the mouse leaves the flashplayer window???
i mean when i scroll the mouse out of the window it sets the mouse coords to last coords the window seen it (the place where the mouse left the window)
i want it to check and tell me if the mouse is out of the flashplayer window!!!
IS there a way???
Check -mouse Down
I have 12 buttons, they are all different mc's.
Each one has an instance name - b1,b2,b3...
Each button has frames named (none-over-"down"-out).
How do I make it so if I click on a button-mc it looks to see if any button-mc's are on frame "down" if so, it tells that button-mc to go to and play "out" else they stay where they are.
I've tried a few variables and also searched for a similar post but can't find anything. I managed to do it manually, telling each button but this takes me a long time to update so I was looking for an alternative script.
Any help would be great...THANKS.
Check What's Under The Mouse?
I have a movieclip that lists a bunch of song artists, and I need to find out which movieclip is underneath the mouse at a given time.
They are all different sizes so I can't run a simple for loop.
The only thing I could think of would be to add each movieclip to a huge array and then loop through the array checking each item's position and width/height to determine whether the mouse lies over that specific item.
That seems REALLY inefficient though...
Any help?
Can Check This Code For Me Please?
Hello chaps.
I am trying to get a flash swf embedded in an html document to pull up a new html page (e.g. mypage.htm) and specify the browser dimensions and no toolbar, and all that guff.
I have the following code, but it doesn't seem to work. any ideas? I kinda need this one quickly!
on (release) {
getURL ("javascript:window.open('http://www.yourdomain.com/yourpage.html','windowName','width=400,height=160, top=0,left=0,toolbar=no,scrollbars=no,resizable=no ,menubar=no,status=no,directories=no,location=no') ; void(0);");
}
Cheers.
Chris.
Code Check Please
What's wrong with the if and else actions below? I know I'm missing something easy...
--------------------------------------
on (rollOver) {
gotoAndStop(12);
}
on (rollOut) {
gotoAndPlay(11);
}
on (release, releaseOutside, keyPress "p") {
ifFrameLoaded ("profile", 16);
gotoAndPlay("profile", 1);
} else {
gotoAndPlay ("interface", 28);
}
}
:: Check My Code ::
Im having trouble with a form in flash. I have everything setup but it doesnt work. It uses an external .php3 file and i think something might be wrong.
If someone knows how to create these forms could I send you my fla and .php3 for some help?
thanks
n
Please Check My Code.
Hi.
Im trying to make buttons that alphatween on mouse
over. "But1" is my mc with the alpha tween. I've checked this
a dozen times and must be missing something stupid.
Heres my bot script.
onClipEvent (enterFrame) {
if (but==1) {
tellTarget ("_root.but1") {
gotoAndPlay (2);
}
} else if (but==2) {
tellTarget ("_root.but1") {
prevFrame ();
}
}
}
Can Someone Check Out This Code?
The following code puts a mouses X value in a dynamic text field and works fine as an independant .swf......when I try to load this .swf into another, the code no longer works. I'm assumsing there is something wrong with path structure when its "included", thats why I included the "this"'s...maybe not? Could use help.
Thanks in advance.
this.onEnterFrame = function () {
this.stageX = _root._xmouse;
this.stageY = _root._ymouse;
};
this.xText_mc.mytext.text = stageX;
|