Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




PC Users Need To Double Click My Mac Made Buttons



And I can't figure out why. No one has mentioned it before but suddenly now someone did. I made the button "on release" and "on press" and neither works. A Mac viewer needs to click only once but PCers need to click twice. Any help would be appreciated.



FlashKit > Flash Help > Flash Newbies
Posted on: 02-05-2007, 04:37 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Why The Double Click On My Buttons?
I'm curious to know why, and how to remedy, the fact that my buttons require a double click the first time they're clicked to cause the "onRelease" actions to occur.

It may help to know that I have two actions being called when the button is clicked. Is there a way to remedy this????

Thanks!
Myanna

Why Is Double-click Necessary For Buttons?
I'm working in MX and know just enough to get my rudimentary website up, but one problem I'm having is that all of the buttons I've created which link to URLs require two clicks for them to work (once published or when I'm testing the movie in the authoring environment).

Can anyone tell me if there's a way for me to get the to work with a single click? I've set the action to get the URL as "on press"--wd it help to have it some other way? Thanks for any help.

[F8] Double Click Buttons
I'm trying to set up a double click button / event, which will open a new movie clip in a project I'm building. The project uses a button nest inside a movie clip, and a startDrag / stopDrag script to allow several movie clips to be dragged about the stage. I want to set up each movie clip to open a new movie clip over the over top when double clicked.

Here's the script with controls the drag.

on (press, dragOver) {
startDrag(_root.one);
}
on (release, rollOut, dragOut) {
stopDrag();
}
on (press, release, dragOver, dragOut) {
_root.x +=2;
_root.about.swapDepths(_root.x);
}

Thanks for any help you can give.

Single Click Button Requires Double Click
I noticed that some buttons in all of my .swf's were taking
two clicks to get them to work. After you double click them
once they work fine. I made a very simple movie to demonstrate
my problem. Please tell me if this problem is occuring for you also.

Thanks,
Anavrin

My .SWF file My .FLA file

Button Taking A Double Click Instead Of A Single Click
I have an on(release) button on a friends web site but it seems to be taking a double click to get through to the next page and also on that next page too clicking on the images takes a double click. Below is the AS I have on the button, similar on all other buttons too!

on(release){
getURL("http://www.brayglassworks.com/gallery1.htm", "_self");
}

http://www.brayglassworks.com

Thanks for any advice

Mac Users Not Able To See Flash MX Site Made On A PC.
I am trying to figure this out I have the flash detection kit setup before the actuall site so I thought I was covered but they still are unable to view the site. Is there some sort of code I have to embed into the html or the actual flash file so that they can see the site. When they try to log in all they see is a white screen with text that is like html code saying to redirect to the macromedia site ect... Just curious if anyone knows a good way of enabling mac users to see the site. Thanks for the help.

[NEW USERS] - You Can't Post Links Until You've Made 5 Posts
As the title says

Until you have been a member at the forums for 30 days and made 30 posts, you will be a restricted user. This means that you will be unable to: Create a signature to appear at the bottom of your posts; Upload an avatar for use in your profile; Change your user title to any custom text. Post in the shoutbox on the forums index. Upload attachments into post.In addition, the first five posts of any users will have URLS and EMAIL ADDRESSES automatically purged from them. This is intended to deter people from signing up with the intent of spamming.

Forum rules and Guidelines - Full list of forum rules and guidelines.

christo

How Can I Enable Single Click And Double Click
I want to single click a button then it will play movie and double click a button will play another movie.

Can anyone give some suggest?

How To Differentiate A Single Click From A Double Click
Hi guys

I'm having a mission trying to differentiate between single and double clicks.

A double click is made up of two single clicks so if i do a trace of when the mouse is double clicked, the result will be:

single click
double click


How can I make the trace just
double click

and not

single click
double click
??

Here's the code that goes on my button:
Code:


Code:
on (press) {
if (!_root.click) {
timer = getTimer()/1000;
_root.click = true;
} else {
timer2 = getTimer()/1000;
}
if ((timer2-timer)<.25) {
trace("double click");
} else {
trace("single click");
timer = getTimer()/1000;
_root.click = true;
}
}

Thanks for any ideas

[F8] Single Click Acting Like A Double Click
I am trying to troubleshoot a problem that has come up with some flash-based courses. These have been developed over the last few years, so they've been developed in MX2004 and Flash8, but the basic code (AS2) is the same across the board.

Each course has a series of swf files (pages) that get loaded dynamically, when the user clicks a "next" button. They have been working fine until recently. Now a small number of users are experiencing something odd...

When these users click the next button (a movieClip called mcNext), the next page loads, and then immediately, the page after that loads. It's as if the user clicked twice, or double-clicked.

So far, it looks like it might be a browser version/plug-in version specific error, as it's only happening with I.E. 7 and Flash player 9.0.124.0

here's (a simplified version of) the code:


Code:
mcNext.onRelease = function() {
thisPage++;
pageChange();
};

function pageChange():Void {
pageNum.text = thisPage+" of "+totalPages;
thisMCL.loadClip("page"+thisPage+".swf", mcContentHolder);
}
Anybody experiencing anything similar?

thx!

How To Differentiate A Single Click From A Double Click
Hi guys

I'm having a mission trying to differentiate between single and double clicks.

A double click is made up of two single clicks so if i do a trace of when the mouse is double clicked, the result will be:

single click
double click


How can I make the trace just
double click

and not

single click
double click
??

Here's the code that goes on my button:

Code:
on (press) {
if (!_root.click) {
timer = getTimer()/1000;
_root.click = true;
} else {
timer2 = getTimer()/1000;
}
if ((timer2-timer)<.25) {
trace("double click");
} else {
trace("single click");
timer = getTimer()/1000;
_root.click = true;

}
Thanks for any ideas

Double-click (I Know It's Possible, But How?)
For an example of what I am attempting, Please check:
http://ecko.com/complex

Nice, right.
So far I have made a custom cursor.

Now, how do I script a double click event that goes to the interface movie clip???

I know you know...please help

Sasha Bad

Double Click
In my upcoming website:
http://www.nachorevolution.com/xex.html
On the yellow page the NR is dragable i figured that out. But now I want to make it so when one double clicks it will getURL. I can't figure out how to do this? any suggestions?

Double Click
I am making a move where I have three main mc's(red, green, purple). In each mc is a button. each button opens another mc that relates to the main mc... they will be named: red2, green2, purple2. What I would like is to click on the button in the red mc and open tell the red2 to goto another frame, and when I click on the same button again the mc will go to the first frame again. Along with that I want the other mc's green2 and purple2 togo to their first frame if not already there. and likewise for all the main mc's

---- any one?

Double Click?
Hello!
Does anyone know a way to get a doubleclik with a Movie Clip?

Any help on this would be grat!
Thanks a lot.

Double Click Help
I have three buttons, each button has a corresponding mc. I would like each button to tell its corresponding mc if it is at the 1st frame go to 3rd and any other frame go to the 20th frame.

any ideas???

Double Click?
id there a double click function in flash mx?

if not how would i do this using flash 5 techniques?

tnx

They Double Click Right By Me
I'm making a software simulation using screen shots and invisible buttons.

I'm using this button script graciously supplied by a board member:

"create an input textbox, give this the variable name answer1 add the frame actions

Selection.setFocus("answer1");
stop();

and on the same frame also place a button.

add the following acrions to the button

on (release) {
studentAnswer = answer1.toLowerCase();
correctAnswer = "what the answer should be";
if (studentAnswer == correctAnswer) {
gotoAndStop(someFrame);
}
}"

The student is expected to fill in an input text blank correctly before he is allowed to move on in the tutorial. Much to my horror, what they've discovered is, if they double click (instead of single clicking like they're instructed to do), they skip right past the text blank and are taken to the next page of instructions. Is there any way of preventing this in the swf file?

Thanks, Mike

Double Click
Why do I have to double-click on links within my movie? My external links are all single click.

Thanks!
Jeff

Double Click Help
I'm trying to set up a double click. I have a nav system that is a box the width of the stage and rests at the very bottom of the stage. When you click anywhere on the stage it slides up to that point. When you make a slection it goes back to it's original y position. I want to make it so that the user has to double click to bring the menu up though cause the single click interferes with my other buttons. I know I need to come up with a timer variable of some kind but I'm not quite sure how to do this. Any suggestions? I've included my .fla file. Please help me. Thanks.

Help With Double Click
First let me explain the set up of my movie. Create a square the size of the stage and turn it into a MC. Place it at the bottom of the stage so that only about 20-30 pixels of it are showing. Add this code to the MC...

onClipEvent (load) {
var valid = true;
newY = _y;
origY = _y;
Yspeed = 3;
a = 1.6;
d = 1.9;
}

onClipEvent (enterFrame) {
Yspeed = ((_y-newY)/a+Yspeed)/d;
_y -= Yspeed;
}

onClipEvent (mouseDown) {
if ((valid == true) and (_root._ymouse < 300)) {
newY = Math.ceil(_root._ymouse);
valid=false;
}else{
if ((valid == true) and (_root._ymouse > 300)) {
//if the mouse is below the minimum for the nav to show, it puts it at this point so it can be seen
newY = 300;
valid=false;
}
}
}

Now, I want to make the onClipEvent(mouseDown) occur on a double click. I'm not sure how to go about setting this up. Any help would be greatly appreciated. I've included my .fla file, it was created on a Mac though so sorry PC people. Please help me. Thanks for your time everyone.

Double Click
Hi,
I was just reading a tutorial of flash recognizing the double click feature:
http://www.spoono.com/flash/tutorial...l=double_click

I was wondering if there's another approach that could possibly be more practical. Please advise, thanks.

Why Double Click?
okay so i finished my first program.. i had a start button n everything.. but to start the movie.. for some reason u have to click the button twice.. n i didn't kno why.. so i need some help.. its just one scene.. n i made one layer just for a stop in the beginning.. n then i made a button layer. .where i placed the button on the stage n had this in the script..
code: on (release) {
MyButton.onPress = function() {
gotoAndPlay(2);
};
}
What should i change?

Double Click
how can i make a button when i make double click on it , the button can open notpad

Double Click?
Why when i double click on a button why does it take me to the last scene of my movie how do i stop this happening??

J

Double Click
Can you make it where if you click on something the double click funtion will not work. For example, when you double click on my button if you click once no problem it goes to correct frame. If you double click it will go to correct fram on first click then the frame next to it on the second click. www.drywallparts.com

Double Click ....
Hii can annyone help me ....
I have a mc button soo i want when i double click on it i want it to run to the next scene or an url i want..?

can annyone help me on this plsss......
hope sooo therefore there is anny profesional here

Double Click?
Can you make a button need to be "double-clicked"
to execute an action?

Double Click
there is a new stupid thing on flash

before you can use the flash navigation or website you have to
activate it by cliking on de flash page or pressing the space bar
is there a code that can remove that anoying activation press thing

i gues that the code has to be in the html source
can someone help me out plz

thx

Double Click MC?
I am trying to create a function where if a user double clicks on a particular mc the mc will reset itself to its original zoom and position...however, I cannot get this feature to work correctly...when I do get the feature to work, I cannot drag and pan the mc...if the feature is disabled, I can drag and pan the mc...here is the code I came up with to double click reset the mc...but it does not work...can someone help?

code:
_root.click = false;
_global.CAD.onPress = function() {
if (!click) {
timer = getTimer()/1000;
_root.click = true;
}
else {
timer2 = getTimer()/1000;
if ((timer2-timer)<.25) {
_global.zoom._xscale = _global.zoom._yscale = mc_scale;
_global.container._x = mc_X;
_global.container._y = mc_Y;
} else {
timer = getTimer()/1000;
_root.click = true;
}
}
}

_global.CAD.onRelease = function() {
delete _global.CAD.onPress;
delete _global.CAD.onRelease;
delete _global.CAD.onReleaseOutside;
}

Double Click
Hi, i was checking out the tutorial at:

http://www.actionscript.org/resource...ons/Page1.html

But i can't seem to download the attatchment file :"DoubleClick.zip".

Could anyone try to explain how i can assign things in the time line? (btns mc's and such) Plus if there is any more actions need to be set?
Makeing the code work in general.

I would really appreaciate it


(wants to make a point and click game XD)

Double Click
Rather New to flash... having issues with my action script requring two clicks on the on (release) function..... any suggestions.. (thanks in advance)

Double Click
is it possible to assign a double click in AS2?

No Double Click At All
Hi guys. I never really dealt with double click in flash, but I've been always thinking it's just the same as any mouse event handling. Here is the simple test code I've made:

ActionScript Code:
package
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;

    public class PureAS3Test extends Sprite
    {
        public function PureAS3Test()
        {
            if( stage )
                init();
            else
                addEventListener(Event.ADDED_TO_STAGE,init);
        }
       
        private function init(event:Event=null):void
        {
            removeEventListener(Event.ADDED_TO_STAGE,init);
           
            var sprite:Sprite = new Sprite();
            sprite.x = 0;
            sprite.y = 0;
            sprite.graphics.beginFill(0xff0000);
            sprite.graphics.drawCircle(0,0,100);
            sprite.graphics.endFill();
           
            addChild(sprite);
           
            sprite.addEventListener(MouseEvent.DOUBLE_CLICK,onDoubleClick);
        }
       
        private function onDoubleClick(event:MouseEvent):void
        {
            trace("double click");
        }
    }
}

I'm really sick of clicking that red circle, but I got no event firing at all. I've changed windows double-click settings, have made another testing mouse listeners (all of them are firing) and all the things... None of them made effect.

What am I doing wrong???

IE Double Click
Anyone know how to get past the IE Double Click. I've created a flash animation where the entire background image is a URL link. In every browser (on the Mac and PC), except Internet Explorer on the PC, the user clicks once on the image and is taken to the appropriate page. BUT in IE, on the PC, the user has to click twice. WHY GOD WHY? Please help!

Why Double Click?
Hi,

I've set up the on release, get url link on a flash button to add to my HTML page.
However, I need to double-click for it to work (for it to link to the other page). Is this accurate? How can I get it to function on a single-click?

thanks!

Double Click
Hi

I want to add a double clik detect to a movie clip which works fine and dandy if the movie clip jsut has gaprhics in it. However, i really could do with having th emovie clip also house other movie clips. But when i od this the double click doesnt seem to work. heres the cide bewlow:

var bubble:MovieClip;
bubble = new bubble_container();
this.addChild(bubble);
bubble.doubleClickEnabled = true;
bubble.addEventListener("doubleClick", doubleClick);

bubble.addEventListener("click", singleClik)

function doubleClick(event:Event){
trace("im double clikked");

}

function singleClik(event:Event){
trace("im single clikked");
}

is there a way of basically listenting for anything in bubble being double clicked?

thanks v much in advance

a

Why Does My Mc Need A Double Click
I have frame labels and buttons set up to cause an action .. It will work but it takes two clicks on the button ...
It is a simple flipping page forward and back in a book ///
the actionscript is a simple on mouse event click.. frames are named each with a stop action in layer below ... but when I want it to repeat a gotoAndPlay("back") i must click twice .
it must be simple but I am confused ??





























Edited: 02/28/2008 at 09:44:41 AM by mrMajk

How Do You Do A DOUBLE CLICK?
I have a MC in my project that acts as a popup window only it is really just a movie clip. One that loads hi-res pictures AND... here's the important part....
has a startDrag() action attached to it so that the user can move the picture aside if they so desire.

However to close this window, I'd like to have the user DOUBLE CLICK with the mouse. They should be able to double click anywhere on the movie clip or even anywhere else... it doesnt matter really. The thing is, how do I listen for a double click in ActionScript??

There no method for the built in classes that I could find.

On Double Click Help
I have a button that has an on(press) and an on(release) handler, which makes an movieClip start and stop drag.
I want to add a double click handler also. To where you double click on the same button and something will happen, something like when you double
click the top bar of a window (PC) and it maximizes the window.

Can any one show me some AS that can have this?

THX!

Double Click
Along with my Multi Key class I was needing for a recent project, I have also been required to write a few applications that needed some minor double click detection. I took this opportunity to write a very simple class for detecting double clicks. It's really easy to use and has served it's purpose for me, if anyone wants to elaborate on, or use this class.. please feel free. I have included an example of the class and the code in the fla, and also a zip file with a ready example. Take Care.

DoubleClick.as:

ActionScript Code:
import lists.*;class DoubleClick{    // the target we are checking if is double clicked    private var target:MovieClip = null;    // the amount of time before the second click doesn't count as a double click    private var DELAY:Number = 300;    // a flag specifying whether or not the first click has been made    private var firstClicked:Boolean = false;    // the id of the interval that gets set to destroy the second click    private var intID:Number;    // the list that stores all objects listening for events    private var listeners : ListenerList;    /* Constructor */    public function DoubleClick(target:MovieClip)    {        this.target = target;        // listen for events from the mouse        Mouse.addListener(this);        listeners = new ListenerList();    }    // is called everytime the users presses the mouse    private function onMouseDown():Void    {        if (target == null || target.hitTest(_xmouse, _ymouse))        {            if (!this.firstClicked)            {                this.firstClicked = true;                intID = setInterval(killInterval, this.DELAY);            }            else if (this.firstClicked)            {                invokeOnDoubleClicked();                this.firstClicked = false;                killInterval();            }        }    }    // destroys the interval, making sure the double click gets destroyed    private function killInterval():Void    {        this.firstClicked = false;        clearInterval(intID);    }        // adding and removing listeners    public function addListener( o : Object ) : Boolean    {        return listeners.addListener(o);    }    public function removeListener( o : Object ) : Boolean    {        return listeners.removeListener(o);    }    // inokes the onDoubleClicked() event in all listeners    private function invokeOnDoubleClicked() : Void    {        for (var i:Number = 0; i<listeners.count; i++)        {            listeners.getListener(i).onDoubleClicked();        }    }}


FLA code:

ActionScript Code:
// create a new instance of DoubleClick,  you can either pass in the movieclip you want to double click// or pass in nothing if you just want to listen for double clicks anywherevar dc = new DoubleClick(test_mc);// create a new instance of a listener object_obj = new Object();// our double click object is going to call onDoubleClicked() on all listeners, so we will need to define that function_obj.onDoubleClicked = onDC;// we then add _obj as a listener of our DoubleClick objectdc.addListener(_obj);// this is the definition of our onDoubleClicked() functionfunction onDC() : Void{    output.text = "You double clicked the movieclip";}

-Michael

Double-click
Anybody got a script for double-click. I'm guessing it's just a timer from the first click because there is no double-click event.

Double Click
Has anyone actually used the MouseEvent DOUBLE_CLICK handler successfully? I cant seem to use it. The example in the help file which includes the DOUBLE_CLICK handler doesnt work either.

Its not critical for me as I can create my own double click handler but it would be good if the documented methods actually worked!

Double Click
Hey Guys,
I have read through the help file in Flash but I can't make heads or tails of what they are saying on the matter.

Is it possible to call a function on double click?

Thanks in advance,
flash_boy

Double Click MC?
I am trying to create a function where if a user double clicks on a particular mc the mc will reset itself to its original zoom and position...however, I cannot get this feature to work correctly...when I do get the feature to work, I cannot drag and pan the mc...if the feature is disabled, I can drag and pan the mc...here is the code I came up with to double click reset the mc...but it does not work...can someone help?


ActionScript Code:
_root.click = false;_global.CAD.onPress = function() {    if (!click) {        timer = getTimer()/1000;        _root.click = true;    }     else {        timer2 = getTimer()/1000;        if ((timer2-timer)<.25) {            _global.zoom._xscale = _global.zoom._yscale = mc_scale;            _global.container._x = mc_X;            _global.container._y = mc_Y;        } else {            timer = getTimer()/1000;            _root.click = true;        }    }}_global.CAD.onRelease = function() {    delete _global.CAD.onPress;    delete _global.CAD.onRelease;    delete _global.CAD.onReleaseOutside;}

Double Click Or Not Double Click
Well I've got a bug in my code, where a button has to be double clicked to work.

Just wondering what is the standard distinction for the difference between single and double click.

my code


ActionScript Code:
ns.seek(0);
subtitles._visible = true;
sign._visible = true;
signer = 1;
signCode = 1;
_root.button(_root.butVT);

the idea is that it runs a function only when the above button is pressed, but it doesn't seem to work the first time you press the button any ideas?

How Do You Do A DOUBLE CLICK?
I have a MC in my project that acts as a popup window only it is really just a movie clip. One that loads hi-res pictures AND... here's the important part....
has a startDrag() action attached to it so that the user can move the picture aside if they so desire.

However to close this window, I'd like to have the user DOUBLE CLICK with the mouse. They should be able to double click anywhere on the movie clip or even anywhere else... it doesnt matter really. The thing is, how do I listen for a double click in ActionScript??

There no method for the built in classes that I could find.

Double Click MC?
I am trying to create a function where if a user double clicks on a particular mc the mc will reset itself to its original zoom and position...however, I cannot get this feature to work correctly...when I do get the feature to work, I cannot drag and pan the mc...if the feature is disabled, I can drag and pan the mc...here is the code I came up with to double click reset the mc...but it does not work...can someone help?

[AS]
_root.click = false;
_global.CAD.onPress = function() {
if (!click) {
timer = getTimer()/1000;
_root.click = true;
}
else {
timer2 = getTimer()/1000;
if ((timer2-timer)<.25) {
_global.zoom._xscale = _global.zoom._yscale = mc_scale;
_global.container._x = mc_X;
_global.container._y = mc_Y;
} else {
timer = getTimer()/1000;
_root.click = true;
}
}
}

_global.CAD.onRelease = function() {
delete _global.CAD.onPress;
delete _global.CAD.onRelease;
delete _global.CAD.onReleaseOutside;
}
[/AS]

Double-click?
What is the best way/easiest way to do a double click in Flash? Mimicing a mouse double-click trigger/effect...

Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved