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




How Do I Know When The Mouse Is Released?



I made a custom scrollbar for this website I'm making and I ran into a problem. To me it's not really a problem but everybody else hates it with a passion (because they don't know how to ignore it).

Most people will expect a scrollbar to stop moving when they're somewhere on the page, not in contact with the scrollbar and release their mouse.

But since a button's actions in flash are so limited (as far as I know) "on(release)" won't work when you're not touching the scrollbar any longer. So now I ask, how can I get around this? My client won't give me a break until I solve this. =< Help!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-02-2007, 05:07 PM


View Complete Forum Thread with Replies

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

Mouse Released Outside Stage
Hello,

Is there any way to know when the mouse has been released outside of the stage?

I am building a flash video player with a scrubber bar. When the scrubber starts dragging everything works fine. But if I release the mouse outside of the stage, the mouse_up event doesn't fire. And when I come back onto the stage, the scrubber is still being dragged by the mouse.

Break Loop When Mouse Is Released?
Is there a way to make a movieclip rotate until the mouse is released. So something like this

on (press) {
while (mouse_is_down) {
_root[_root.last_clicked]._rotation += 1;
}
}

Streaming Media Stops When Mouse Released
Hi,

Im attempting my first flash website and all is going well so far and really enjoying it… apart from one issue:

I wish to stream an external audio when a certain frame in a flash movie is reached (the movie is actually the animation for the "Down" phase of a button)

I have used two lines of actionscript at frame 290 as follows:

myMusic = new Sound(myMusicMc);
myMusic.loadSound("url to file", true);

As this is a button the mouse button is held down in order to reach frame 290, the audio then starts to stream and continues to even when the mouse button is released...perfect.

This works fine when published as flash however the problem comes when it is published to HTML, once the mouse button is released the audio stops, even though it still says "transferring data" at the bottom left of the browser.

Is there something im missing? The reason I used action script instead of just the stream event is so that the audio would continue when the button was released.

Wasnt sure which area to post in but as as im using actionscript...

Any help would be greatly appreciated

Returning Released Button To Original State When Another Button Is Released
i am playing with 3 buttons, 2 duplicated from the original and each of them are movies. when mouse over a button it pushes it down, when you mouse off it pops back up, when you click it it fades from blue to red. i want to make it so when you click one of the other buttons it will return the button to frame one where it's popped up again, how should i do this? im sure it's action scripting but it seems to be beyond me. im on aol as ironmikec34 if that will make it easier to explain, thanks!

Mikey C

Button, Released Or Not Released...
would someone be as so kind to show me an example of how one might code to know if a button has been released and if that button has been released to stay in its "off" state.

i have a bunch of MC's with empty buttons and when you rollover, the parent movie gotoAndPlays frame 2. when you rollout it reverse plays these frames. on release i want it to stay put at the off state. and when you rollover again i don't want it to go back to frame 2 and replay. does that make sense

i think i could probably figure this out eventually but i am just so tired of looking at it and having it not work properly.

it'd just be wonderful to hear other solutions, techniques and any suggestions to maybe get a new perspective on this. thanks...

Released?
How can I test to see when a key is released?

[F8] When Key Is Released...
Hi folks,

I've got some lovely code using Key.isDown to do some stuff when a key is pressed which is working fine. However I'd like to alter it to do the same stuff when the key is released instead. I've read the relevant posts in the forum and searched Flash Help but have thus far been unsuccessful in my attempts with the Key.addListener method (I find it difficult, admittedly). So I'm wondering if anyone can look at my code and suggest how I go about changing the code to do the stuff I want when the key is released.

onClipEvent (enterFrame) {
// move the player
var speed = 41; //controls the distance the player moves
if (dead == false) {
if (Key.isDown(Key.RIGHT) && this._x<450) {
_root["player"].gotoAndStop(2);
this._x += speed;
} else if (Key.isDown(Key.LEFT) && this._x>50) {
_root["player"].gotoAndStop(4);
this._x -= speed;
}
if (Key.isDown(Key.DOWN) && this._y<350) {
_root["player"].gotoAndStop(3);
this._y += speed;
} else if (Key.isDown(Key.UP) && this._y>50) {
_root["player"].gotoAndStop(1);
this._y -= speed;
}
}

Thanks in advance,
ScareBBear.

When Will The FMS 3.0 Be Released?
Hi all,
Anybody has idea that when will the FMS 3.0 be released?
How can I contact to adobe via e-mail? I can't see any email address in the official site...

Thanks a lot!

Dswf Ver 0.0.0.24 Released
direct download here
http://pinoccc.top263.net/down/dswf_0_0_0_24.zip

Whats dswf

* a disassembler of swf, can show you byte code inside

WhatsNew
* support file drag & drop
* support command line parameter
* show character id in those symbol define tags
* fix some small bugs
[Edited by pinoc on 02-18-2002 at 08:52 PM]

The JGenerator 2.1 MX Is Released
Hello all,

We are happy to announce the release of JGenerator 2.1 MX!

Please visit out site: http://www.jzox.com

The JGenerator 2.1 (MX) fully supports Macromedia Flash MX format and
is now the only tool which supports server-side Flash MX components and generates
Flash MX dynamic content.

But not only is this good news for JGenerator users, it also enables content
created via Macromedia Generator to be updated to Flash MX.

With JGenerator MX you develop a JGenerator application using all Flash MX capabilities.
A new JGenerator component palette is installed into Flash MX, and components are
accessed by dragging and dropping onto the stage, ready to edit the parameters.

Attention to all Macromedia Generator customers! For a limited time, until August 31, 2002,
you can purchase JGenerator 2.1 MX for discounted price! For details please visit http://www.jzox.com/buy.jsp

--
Sincerely,
JZox Customer Service
support@jzox.com

Apollo Is Released
As topic, oh yes.

Checking If A Key Is Released...after Something.
'lo Flashkit. I've got an interesting problem...

I've been making a platforming game, and like the old classics, I want to make sure you can't just hold spacebar down to keep jumping when you touch the ground. For example, if you just hold spacebar (my jump button) and the char jumps, the second he touches the ground he jumps again. This is just, plain, silly.

Maybe I'm just really tired, but I can't think up an efficient way to do this.

The idea is that if you press the button to jump, you have to repress is AFTER he touches down to jump again. You can't press it, release it in midair, and press again before he lands. I feel like I should be able to know this, but it's bugging me, and everytime I figure a decent way to do it I end up without fourteen boolean variables all flicking on and off...

Is there an easy way to do this? Normally, I'd put this in the Games section, but this is more general Actionscripting...

Released Status
Hi

How can I build a released status for this 6 mcs? (which are 18 indeed)
I know theoritically how it should be done, but I'm stacked how the for loop should be built in this situation.

Thanks for help


PHP Code:



for (var i = 1; i<4; i++) {
    this.gal_slider["slider"+i].mc1.ID = i;
    
    this.gal_slider["slider"+i].mc1.onRelease = function() {
        gal_info.text = titel[0];
        th_Slider.setGal(thumbnails1, images1, 1);
    };
    this.gal_slider["slider"+i].mc1.onRollOver = function() {
        gal_info.text = titel[0];
        this.OVERCLIP1.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc1.onRollOut = function() {
        gal_info.text = titel[0];
        this.OVERCLIP1.fadeIn(5);
    };
    this.gal_slider["slider"+i].mc2.onRelease = function() {
        gal_info.text = titel[1];
        th_Slider.setGal(thumbnails2, images2, 2);
    };
    this.gal_slider["slider"+i].mc2.onRollOver = function() {
        gal_info.text = titel[1];
        this.OVERCLIP2.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc2.onRollOut = function() {
        gal_info.text = titel[1];
        this.OVERCLIP2.fadeIn(5);
    };
    this.gal_slider["slider"+i].mc3.onRelease = function() {
        gal_info.text = titel[2];
        th_Slider.setGal(thumbnails3, images3, 3);
    };
    this.gal_slider["slider"+i].mc3.onRollOver = function() {
        gal_info.text = titel[2];
        this.OVERCLIP3.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc3.onRollOut = function() {
        this.OVERCLIP3.fadeIn(5);
    };
    this.gal_slider["slider"+i].mc4.onRelease = function() {
        gal_info.text = titel[3];
        th_Slider.setGal(thumbnails4, images4, 4);
    };
    this.gal_slider["slider"+i].mc4.onRollOver = function() {
        gal_info.text = titel[3];
        this.OVERCLIP4.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc4.onRollOut = function() {
        this.OVERCLIP4.fadeIn(5);
    };
    this.gal_slider["slider"+i].mc5.onRelease = function() {
        gal_info.text = titel[4];
        th_Slider.setGal(thumbnails5, images5, 5);
    };
    this.gal_slider["slider"+i].mc5.onRollOver = function() {
        gal_info.text = titel[4];
        this.OVERCLIP5.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc5.onRollOut = function() {
        this.OVERCLIP5.fadeIn(5);
    };
    this.gal_slider["slider"+i].mc6.onRelease = function() {
        gal_info.text = titel[5];
        th_Slider.setGal(thumbnails6, images6, 6);
    };
    this.gal_slider["slider"+i].mc6.onRollOver = function() {
        gal_info.text = titel[5];
        this.OVERCLIP6.fadeOut(5);
    };
    this.gal_slider["slider"+i].mc6.onRollOut = function() {
        this.OVERCLIP6.fadeIn(5);
    };


Stop Mc When Key Is Released
Hi. I have a movieclip called holder, when you press the key UP or DOWN it will play. The problem is that when you release the key the movieclip will keep playing until it finishes, what I want is that when you release the key it will inmediately goto and stop at frame 1. Any help will do.

Thanks

Flash 4 Released When?
I just need to know what year Flash 4 was released. I'm thinking 1999 but I'm not sure...

Apollo Released
For those of you who haven't heard yet, the Apollo Runtime and SDK are now up on Adobe Labs :)

My Soukuban Game Released~
it is version1.0 now~

any suggetions will be helpful for me.

http://www.actionscript.org/forums/a...=&postid=52225

What The Web Can Be - Macromedia Released New Products
http://www.macromedia.com/software/m...4_green_082403

Making It So A Key Must Be Released To Do An Action Again
Subject says it all. Is there any good way to make it so if you press Spacebar, for example, that something will happen, but the user must release spacebar before doing it again?

MC Fade Out When Button Released
Hello Flash Kingdom

I have a movie clip on the main stage, this contains a few buttons and another movie clip(of a graphic moving across screen in a loop).

Im trying to make it so that when a button is pressed the mc containing the graphic loop fades out

I realise this problem is fairly common but after reading similar postings over the last few days I cant seem to get anything to work.

can anyone help with a quick and easy actionscript solution?

Andy

Flash Kit Desktop Released
Check out this new Desktop Application. It allows you to scan the Flash Kit forums (What you are reading now) from your desktop. The built in browser allows you to read the post, and the Application has some nice animated effects. Its a simple to use application with some nice eye candy that will allow scanning the Flash Kit forums for new content a breeze. Installs in about 1 minute automatically.

CLICK HERE TO CHECK IT OUT

This is Version 1.1. I would like some feedback. But please remember, there is only so much you can do with a "one way" XML feed.

TweenManger Class Released
Hi,
just released TweenManager and tweenManagerEvent, two as3 classes to manage Tweens.

They are part of Lab19, a repository of open source code. Hope to upload examples soon.
svn is at http://lab19.googlecode.com/svn/trunk/


further info at:
http://officinanessuno.blogspot.com/...9-is-open.html

When Was Flash Player 6.0 Released?
when was Flash player 6.0 released?

thanks

Does Anyone Know How To Drag And Keep Dragging Once Released?
I can't seem to wrap my head around this code. I really like how these crazy little critters keep multiplying but once you drag them onto the canvas they stick and are no longer draggable! Please help. I have attached this fun little file.

Thank you in advance!
kelly


Here is the code:
for (var i = 0; i < _root.icon_mc._totalframes; ++i) {
var newName:String = "icon_mc" + i;
var clip:MovieClip = _root.icon_mc.duplicateMovieClip(newName, 10000 + i);
clip.gotoAndStop(i + 1);
clip._x = iconX + i * spacing;
clip._y = iconY;
clip.homeX = clip._x;
clip.homeY = clip._y;
clip.icon_btn.onPress = function() {
startDrag(this._parent);
};
clip.icon_btn.onRelease = function() {
stopDrag();
_root.iconReleased(this._parent);
};
}

Fractal4D Finally Released
Get the release here! http://mattkenefick.com/blog/2008/11...first-release/


Originally mentioned in this thread as a concept: http://www.kirupa.com/forum/showthread.php?t=312712

VectaDraw | | Source Code Released
http://www.vectadraw.com

finally got around to releasing the source code

laterz -- cyberfunk

Flash MX 6.40 Released. Version Stability Is ...
Hi everyone -- I'm hoping to start a thread here for people who have downloaded either/both the browser plug-in and/or Flash player 6.40.

Please share anything you have discovered to be different between this build and the previous -- good, but more importantly bad.

Thanks!!
[Edited by Bug Squasher on 07-22-2002 at 02:59 PM]

Change A Button’s Color After It’s Released.
Hi, I have a button with a dynamic text on it. The text is in blue , when ever the user is ‘mouse over’ the button the color of the text changes to red. I want the color to stay red if the user presses the button, I don’t want to disable the button after it is pressed. Is there any way to do it inside the button frames/script. Have anyone here ever used ‘textField.textColor’ ?

Please reply if you have any ideas,

Thanks.

Deleting A Button From Stage When It Is Released
I am making a jeopardy-type game for school. when someone presses the button, i want it to go to a web page and then make the button disappear, but to no avail. i did see, though, that in the "actions" section of the drop down menu in the action window, there is a choice for "delete". i typed the symbol name of the button i want to disappear, and everything else works fine, but the button won't disappear. Any help is appreciated.

Shared Fonts Manager Released
http://www.sharedfonts.com
free for developers and web-design companies.

Shared Fonts Manager Released
http://www.sharedfonts.com
free for developers and web-design companies.

Sound When Button Is Pushed And Released?
Does anyone know how I can play different sounds for when a button is pushed (clicked on) and for when a button is released. I figured out how to tie a sound to a button but don't know how to make seperate sounds for these two mouse click actions. How would I set this up?

thanks
marshall

Internet Explorer 7 Released Today
The Beta version of the new IE 7 was released today. I am using it right now and it is really amazing. Much improved all around, security, tabbed browsing, slimmer look and design, more viewable area....very cool!!!!
You can get the Beta download HERE

Make Object Fall When Released?
I want an object (ElementFe_mc) to fall to a table top (_y=412.4) when released...
I thought this would be simple but it doesn't work...
Here's the code I've tried...

Code:
ElementFe_mc.onRelease = function(): Void {
this.stopDrag();
if (ElementFe_mc._y < 412.4) {
this._y++
}
}

[F8] Keydown Detected Long After Key Is Released
I am using Key.isDown for the arrowkeys to control my game.

I just discovered, when you have held down an arrowkey for some time, then after you release it, it takes some time, before Key.isDown starts not registering it as down anymore.

This problem only happens if I use scrollRect to scroll my background. When I comment out just the line, where I set the scrollRect, the key problem is gone, and it reacts instantly.

I have no idea why scrollRect would affect this, but if I can't fix it, I can't use scrollRect, wich sucks. Any ideas?

Alternatively, another way to test if a key is down.

If Lsat Button Released Then Play...?
i need to get something to play and then skip to a frame based on the last button pressed, is this possible?
i was thinking along the lines of...

stop();
*if lastbutton released was btnHOME
gotoAndPlay(52);
}

can you control the timeline based on past events?

thanks

Make Object Fall When Released?
I want an object (ElementFe_mc) to fall to a table top (_y=412.4) when released...
I thought this would be simple but have been unable to make it work...
Here's the code I've tried....

Code:
ElementFe_mc.onRelease = function(): Void {
this.stopDrag();
if (ElementFe_mc._y < 412.4) {
this._y++
}
}

[F8] Keydown Detected Long After Key Is Released
I am using Key.isDown for the arrowkeys to control my game.

I just discovered, when you have held down an arrowkey for some time, then after you release it, it takes some time, before Key.isDown starts not registering it as down anymore.

This problem only happens if I use scrollRect to scroll my background. When I comment out just the line, where I set the scrollRect, the key problem is gone, and it reacts instantly.

I have no idea why scrollRect would affect this, but if I can't fix it, I can't use scrollRect, wich sucks. Any ideas?

Alternatively, another way to test if a key is down.

Class Definition Memory Never Released ?
Hi all.

Investigations on a previous matter in another thread made me think also of this potential memory annoyance.

When a class is defined in Actionscript, using 'class' definitions attached to movieclips, that class definition is created and referenced from _global by the class name:

class foo
{
public function foo()
{
trace( "FOO!" );
}
public function stuff()
{
...
}
}

ends up with

_global.foo --- references ---> [Function (foo constructor)] -- "prototype" --> references [Object] -- "stuff" --> references [Function (foo stuff)]

When a movieclip is placed with this class associated, it will essentially be able to 'New' an object with foo's prototype as it's own __proto__

When the swf file defining this class is unloaded, however, the class definition still exists on global. After performing some tests I found I could delete this reference and the class definition would be released from memory if there were no outstanding references to it.

So my thought is : for a given swf that loads/unloads lots of potentially varied classes, the memory footprint of class definitions will never decrease (unless references are explicitly removed - which has it's own problems). I would have thought for a large application with a decent lifetime that this could potentially be a problem, especially on low footprint mobile architectures?

Does anybody know of a sane way of mitigating this ? Does Flash provide any functionality to perform cleanup of stale class defs ?

Bit of a kooky one, but I'm interested

Thanks !
Will.

TweenMax Released - TweenLite On Steroids
(Similar message posted in the AS2 forum, but wanted to let you ActionScript.org AS3 folks know too...)

The latest addition to the TweenLite family, TweenMax, was just released. It builds on top of TweenLite and TweenFilterLite and adds features like two kinds of bezier tweening (regular bezier and bezierThrough which allows you to define points through which the bezier should travel), pause/resume, sequencing, and LOTS more.

TweenMax can do everything TweenLite and TweenFilterLite can do, plus more. Same syntax. 8Kb. AS2 and AS3 flavors.

I put an interactive sample of the bezier tweening on the blog, so you can play with it a bit and see how the bezierThrough and normal bezier stuff works, and it writes sample code for you, so you can see exactly how your changes affect the code.

www.TweenMax.com

There's a comparison chart there that shows which features are part of which class. Oh, and there's also a new speed test for bezier tweens.

Enjoy!

Flash Player 10 Beta Released
Hi friends,

http://sara-intop.blogspot.com/2008/...-released.html


Flash Player !0 beta is released.....


~sara~

Moving Image When Button Released
this is old and I used to know but forgotten over time. How do you scroll an image across to a certain point when a button is released?

Preferably with easing.

Cheers

Flash MX 2004 7.2 Update Released
This update to Flash MX 2004 (Ellipsis) increases developer productivity by making the application lighter and more efficient to use. The updater offers substantial improvements in performance and stability and more comprehensive documentation"

Improvements include:

Faster initial launch time

Compile times up to twice as fast

More than 400 additional code examples

Additional documentation on working with components

Fixed over 2000 documentation issues

A scrollbar component

Numerous usability improvements

Over 100 bug fixes:
» 34 crash bugs found and fixed!
» 7 lost/corrupt data bugs
» 1 memory leak bug
» Many bugs surrounding double-byte fonts and IME
» MX files no longer fail to Save As
» When using forms, screen code is now correctly saved

Here is the update

You can also find info here

Version 2 Of The OpenSource FLV Player Released
There is a full list of changes on the site. Basically the code was cleaned up a ton, a bunch of embed parameters were added (mute, volume, autoload), a ton of redundant code was removed, the slider works a lot better, it comes with a javascript tool to make the embed code, and it automatically gives the nofullscreen version to people with Flash player 8.

I'd recommend everyone who is using the old version update. If you don't want to change to the new style of embed code, you can at least paste over your old swf file.

http://www.trenttompkins.com/Downloa...er-2-Beta.html

Btw, what features would you guys like to see added to this player? I'm thinking the ability to have it load a still image on the first screen, and some easy embed functions for PHP.

Version 2 Of The OpenSource FLV Player Released
Now with it's own domain, http://www.osflv.com .

Let me know if you find any bugs.

~Trent

TweenMax Released -- TweenLite On Steroids
Just wanted to let the Kirupa family know that the latest addition to the TweenLite family, TweenMax, was just released. It builds on top of TweenLite and TweenFilterLite and adds features like two kinds of bezier tweening (regular bezier and bezierThrough which allows you to define points through which the bezier should travel), pause/resume, easier sequencing, and LOTS more.

TweenMax can do everything TweenLite and TweenFilterLite can do, plus more. Same syntax. 8Kb.

I put an interactive sample of the bezier tweening on the blog, so you can play with it a bit and see how the bezierThrough and normal bezier stuff works, and it writes sample code for you, so you can see exactly how your changes affect the code.

www.TweenMax.com

There's a comparison chart there that shows which features are part of which class. Oh, and there's also a new speed test for bezier tweens.

Enjoy!

Moving Image When Button Released
this is old and I used to know but forgotten over time. How do you scroll an image across to a certain point when a button is released?

Preferably with easing.

Cheers

Streamcast Player Beta1 Released
Free to Download
www.streamcast-player.com

Demo Application
www.on-cinema.tv

Flash Professional 9 Alpha ( Released )
&nbsp;
Woohoo!

The first alpha ( preview ) version of the Flash Profession 9 authoring environment has been released.





The Flash Professional 9 ActionScript 3.0 Preview is the only planned "preview release" of the next version of the Flash authoring tool before the final version ships in 2007. The only "new" features exposed in this very early preview of Flash 9 are those related to publishing ActionScript 3.0 content to Flash Player 9. This includes integration of the new ActionScript 3.0 compiler, the new "Document Class" feature which allows users to assign a class to the main timeline, and a new publish target for Flash Player 9. There are other useful features planned for ActionScript development but they are not being made publicly available at this time.

Flash Professional 9 ActionScript 3.0 Preview

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