ActionScript 1/2 :: .onMouseDown Makes All The Screen Clickable

Sep 1, 2009

I've got this really weird problem. I have the following code:

[Code]....

The thing is, after I setup the onMouseDown, Anywhere I click on the screen run that function, not only the listMask movieclip! The movieclip is just a plain rectangle that was drawn by code, nothing special, no hidden graphics. Even if I don't draw anything in the movieclip, the whole screen is still clickable (as well as areas outside the screen, if we maximize the player window). This movieclip was created with .createEmptyMovieClip

View 3 Replies


Similar Posts:


IDE :: Masking Multiple MovieClips Makes Only One Clickable

Sep 10, 2009

I'm having a really strange problem with movieclips that use a mask for reflection. On my main timeline i'm creating two instances of a movieclip named 'item'. In item.as i'm calling cacheAsBitmap and setting a gradient movieclip as a mask. When I run the clip I am only getting the clickable hand icon when I hover over the first clip. However, if I comment out 'this.mask = mask_mc' then both clips are selectable.

Main Timeline
Code:
var item_mc = new item();
item_mc.x = 0;
item_mc.y = 100;
addChild(item_mc);
[Code] .....

View 1 Replies

ActionScript 3.0 :: Reflection Mask On Multiple Movies Makes Only One Clickable

Sep 11, 2009

I'm having a really strange problem with movieclips that use a mask for reflection. On my main timeline I'm creating two instances of a movieclip named 'item'. In item.as I'm setting buttonmode and cacheAsBitmap to true, then setting a gradient movieclip as a mask. When I run the movie I am only getting the clickable hand icon when I hover over the first clip. However, if I comment out 'this.mask = mask_mc' then both clips are selectable.

Main Timeline
Code:
Select allvar item_mc = new item();
item_mc.x = 0;
item_mc.y = 100;
addChild(item_mc);
var item_mc2 = new item();
[Code] .....

View 5 Replies

ActionScript 3.0 :: Why Does Full Screen StageDisplayState, Makes Videos Full Screen?

Sep 29, 2011

i am creating an interactive application that will run independantly on a computer.I have implimented the full screen stage display state to a btn, and it works great!

-------code-----
import flash.display.StageDisplayState;
function goFullScreen():void
{

[code].....

however as soon as i add a video [i will be adding several] the video takes on the full screen property, and that is not the desired effect.I have used several diff ways to import the video but as soon as i call the full screen, it goes to an all black screen.

View 1 Replies

ActionScript 2.0 :: Refreshing Makes Previous Screen Show?

Jul 23, 2009

The code that I'm working on is HUGE (over 10 .as files, each with 1000+ lines), so I won't post any of it, but you should be able to follow the general idea.

What I'm doing is loading movieclips within movieclips.

For example, let's say I have a movieclip with a black background and two buttons. When I click on one of the buttons, it loads an XML file which contains labels and images and data. However, this XML file is loaded INTO the same movieclip, so that it is kinda on top of it. That means that the black background is completely covered up by the new images loaded. However, since the XML file is getting changing data, I have a refresh function which removes the XML movieclip and loads it again.

The problem is that when the XML movieclip gets removed temporarily to refresh, the black background and buttons underneath can be seen and that doesn't look very good.

The code is too extensive for me to figure out how to put everything into a new movieclip dynamically.

What I thought of doing was to create a movieclip in between these two movieclips which displays a blank white screen. I got that to work, but I had a few problems with the back button because now it needed to remove two mcs instead of one. However, that is also working now. Is there a better way to do this instead of creating a blank mc?

The ACTUAL problem I have is this: When the page refreshes, the labels from the XML file remain...which makes it look ugly before the pictures get loaded. I think that this might just be that the labels load a lot faster than the pictures, thus, giving the illusion that they never refreshed in the first place; I'm not sure about that though. Is there any way to get the images to load before the labels get reloaded (if they do in fact get reloaded)?

View 1 Replies

Professional :: Version 10.2 Freezes Computer And Makes Screen Melt?

Feb 16, 2011

I'm having trouble with my computer and the latest version of Flash. What happens is that everytime i get in contact with a flash-based media on the internet (Youtube, banners, games, etc.) my computer freezes and after 15 seconds it starts 'melting', as in the pixels slowly turning blue and black. This happened right after i installed the latest version of Flash. I have to take the battery out of the computer to get it working, which is offcourse not healthy.
 
Does anybody have an idea what this is due to and how it can be fixed? I am pretty desperate.

View 1 Replies

Flash :: Adding Components To Flex 4 App Makes Screen Go Blank?

Aug 2, 2010

I've been adding some components to a Flex 4 app (it was originally Flex 3 but has been ported). Some of these components make the app go blank when it loads. I'm not even able to see the loading progress bar. Just white.

For example, adding

<s:controlBarContent>
<s:Button label="Admin" />
</s:controlBarContent>

To the root tag causes this. I also was able to make it happen when I tried setting a custom components skin from my style sheet instead of from the skinClass property.

View 1 Replies

Flash :: Make A Animation That Makes An Object Move Across The Screen To A Certain Point?

Sep 1, 2011

I want to make a flash animation that makes an object move across the screen to a certain point, depending on what is typed into a text box, and i want many of these moving objects at once, so that you can type in a number and then the object moves to that point. Can this be done?I have used flash but have done verry little with the actions of flash, so please walk me through any actions that will need doing

View 1 Replies

ActionScript 3.0 :: (Touch Screen) - Add A Little Box In The Bottom Left That In Not Clickable?

Sep 16, 2010

I have a touch screen computer and I want to make a little flash game for it.

picture this: the game screen will be like

[code ....]

now since its touch screen I can tap the screen and that is like a mouse click.urrent I have it so on a mouse click my hero will move to the mouse click coords.now I want to add a little box in the bottom left that in NOT clickable because I want a shoot button there and I dont want the char to move there so like this

[code ...How can i make a little box like that which will not detect a mouse click?

View 6 Replies

ActionScript 2.0 :: OnMouseDown Return What's Hit?

Nov 30, 2004

Is there a way to return what's hit when the user clicks? Like if what's hit is a movieClip or a button and so om...

View 1 Replies

ActionScript 2.0 :: OnMouseDown And Up - Stop Working?

Feb 8, 2009

I'm trying to make a notepad - when you hold the mouse down you can draw like a pen and when you release the mouse it stops drawing. At the moment I can just get it to update after every click.

Writing.as:

ActionScript Code:
//This class is to 'write' wherever the person drags the mouse
class Writing {[code]...............

View 1 Replies

ActionScript 2.0 :: Disabling The OnMouseDown Event?

Sep 5, 2009

I am playing a movie clip onMouseDown event. There are total 10 movieclips in array. I want to disable onMouseDown event while movie is playing.PHP Code:

onMouseDown = roll2;
function roll2(){
shimArray = new Array("ani1", "ani2", "ani3","ani4","ani6", "ani7", "ani8","ani9","an

[code]......

View 3 Replies

ActionScript 2.0 :: Deactivating The OnMouseDown Listener?

Sep 22, 2009

the code:

---
function react(menu_item, textFile){
if(menu_item.hitTest(_root._xmouse, _root._ymouse, true)){
onMouseDown = function(){

[code]....

Goal: deactivate the "onMouseDown" listener after the mouse button is released.

Limitation: "OnPress" is not an option because it interferes with other code.

View 2 Replies

ActionScript 2.0 :: Define An OnMouseDown Area?

Jan 25, 2007

I'm creating an animated menu that I'd like to 'stow away' when the user clicks anywhere but the Menu button.I know this involves adding a mouse listener for an onMouseDown event, but I'm not sure what or how to define this...Is it possible to define an entire area (my site) minus a specific area (the menu button) for an onMouseDown event?

View 3 Replies

ActionScript 2.0 :: Ignoring Interface On OnMouseDown

Mar 19, 2007

The issue is that I am making something that has many buttons, and rather making a variable that has it turn true onMouseOver (when I go over an interface object, the variable wont let the click register), making clicking not register, and then register onMouseOut (when I leave the interface object, clicking is registerable) for every single button, I rather have it auto recognize if I am actually hitting the root object like shown in my attachment.

View 6 Replies

ActionScript 2.0 :: StartDrag / OnMouseDown / OnMouseUp?

Aug 23, 2009

i need some help with my startDrag function, i have something like this right now:

ActionScript Code:
target_mc.my_thumbEvnt.onMouseDown = function() {
if (this.target.hitTest(_root._xmouse, _root._ymouse, true)) {
my_mc.startDrag(false, 0, 0, -my_mc._width+Stage.width, 0);
}

[Code]...

View 3 Replies

ActionScript 2.0 :: Calling Function Triggered By OnMouseDown?

Jan 27, 2003

I'm having problems with calling a function triggered by onMouseDown.

Code:
_root.myMC.onMouseDown = function() {
_root.x = _root._xmouse;
_root.y = _root._ymouse;
startDrawing(270,75,x,y);
}

The idea is that the function 'startDrawing' only has to execute when I click on the mc 'myMC' which contains a (filled) square, a sort of a drawingboard. However, it also executes when I click anywhere else in my movie.

View 3 Replies

ActionScript 2.0 :: FMX LoadMovie And OnMouseDown Event - Gets Executed

Jul 18, 2005

I've got a very simple movie clip that is supposed to load an external .swf into an empty clip that gets created when you click on one of the clip instances on the stage.

[Code]....

The empty movie clip gets created (I assume), and the .swf gets loaded in, but when you click anywhere on the stage, this code gets executed, basically loading the .swf back in. It's only supposed to execute when you click on "about_mc" . What am I missing, besides a brain?

View 2 Replies

ActionScript 2.0 :: Attach Multiple Movies With OnMouseDown For Each?

Dec 1, 2005

I am having problems with attaching multiple instances of the same mc, and tring to get an onMouseDown event for each of them.

The problem is that if I mousedown on one of the attached mc's, then all the attached mc's will trigger the onMouseDown event instead of only the one I clicked on.

the trace returns "onMouseDown called on 1" ...."n" instead of a single trace statement.

code:

function createSlideIcons(num){
var targetMC:MovieClip = this.form1.slideNav.slider;
var spacer = 5;

[Code]....

View 2 Replies

ActionScript 2.0 :: Stopping A _root.onMouseDown = Function()?

Oct 7, 2003

i have a:

Code:
_root.onMouseDown = function(){
someAction

[code].....

View 4 Replies

ActionScript 2.0 :: OnMouseDown - Return What's Hit When The User Clicks?

Nov 30, 2004

Is there a way to return what's hit when the user clicks? Like if what's hit is a movieClip or a button and so om...

View 1 Replies

ActionScript 2.0 :: Using OnMouseDown To Remove Objects In An Array?

Nov 27, 2002

How on earth do I use the onMouseDown event to remove objects generated by an array?

I'm still programming (if my bumbling can be called that ) the game I discussed in the 'Random Object Generation' thread and I'm using the basic framework of the array function that h88 gave me. Everything is working fabulously, but getting the things to disappear onMouseDown is a problem - it doesn't work.

Oh, and if I reference Target.prototype.onMouseDown and tell it it to this.unloadMovie, it unloads every single target on the screen instead of the one your mouse is actually over, making for a fairly... lame... game. I'm pretty sure it's because every single clip generated by the array is a Target prototype instance and so when the MouseDown occurrs, it unloads every Target movieClip. And I am using a hitTest in the Target.prototype.onMouseDown command, so that doesn't solve anything...

View 4 Replies

ActionScript 2.0 :: AS 2 Deactivate OnMouseDown When Clicking On Scrollpane Component

May 25, 2011

I have a CS3 scrollpane component with a movieclip loaded into it that the user can scroll up and down and side to side. In the movieclip I have a PNG and a drawing function that essentially lets the user drag and draw a yellow highlight box on the PNG. So onMouseDown the drawing function starts, onMouseMove the box size is set based on where the user puts the cursor and onMouseUp the box is actually drawn.

My problem is that if the user clicks on the scroll pane dragger bars (for lack of a better term) it draws a box where they clicked and dragged the scroll bar. how I could disable the onMouseDown if the user is interacting with the scrollpane?

I have tried setting X&Y conditions, but if they only work if the user is at the bottom right corner of the image. I also tried making an invisible button that would change a variable on rollOver and rollOut but that messed up my scrollpane somehow.

here is my drawing code if that helps at all:

PHP Code:

//
var myClipNames:Array = ["mc0", "mc1", "mc2", "mc3", "mc4", "mc5", "mc6", "mc10", "mc11", "mc12", "mc13", "mc14", "mc15"];
var i = 0;

[Code].....

View 1 Replies

Professional :: Make The OnMouseDown Function Also Work Within The MovieClips?

Jun 15, 2010

Is there a way to make the onMouseDown function also work within the MovieClips area in this code example?  It seems like the two functions are conflicting.
 
attachMovie("nutrition","nutrition",4,{_x:715, _y:370});
nutrition.gotoAndPlay();
nutrition.onPress = function():Void{

[Code].....

View 2 Replies

ActionScript 2.0 :: Activating ClipEvent OnMouseDown Without Clicking The Mouse?

Jan 8, 2009

I've written a lot of code, and I have a ton of onMouseDown clipEvents, but now I want to user just to be able to mouse over instead of clicking. Is there any code that will automatically activate all onMouseDown functions in your program?

View 7 Replies

ActionScript 2.0 :: OnPress, OnMouseDown, OnRelease - RollOut Animations Are Not Played?

May 28, 2007

Have you ever noticed that problems arise when you use movie clips as buttons, script their functions with AS and then, rather than simply clicking on one of them, you click and hold down. The main problem is that rollOut animations are not played.

For example lets say you have 2 buttons next to each other and you click one and hold down on your mouse, then move to the next button, you'll see that both buttons now display the rollOver state.

Is there any way around this? I test this on almost every flash site I visit and only a small few seem to be able to get around it. Usually I don't mind so much because users will rarely click and hold imo, but for the site I am building at the moment I really want to finally know how to get around it. I've noticed it does the same thing no matter what event handler I use.

View 4 Replies

Bug Makes Scripting Impossible?

May 6, 2009

This is sooo anoying! I can't type anything properly! The longer a line gets, the further the blinking line thing intersects with what you typed, and punctuation obstructs the text

View 3 Replies

ActionScript 3.0 :: Url Makes Flash Act Differently?

Mar 23, 2010

Does anyone have an idea as to why this happens?The dropdown menus work fine (they are a flash app)The dropdown menus do not work.I'm unfamiliar with how to make a redirect if they just type the url without the 'www'

View 4 Replies

Loading An External Swf Into A Mc Makes The Mc Disappear?

Jul 4, 2011

I have this script on a specific frame and when this frame is called it should load an external movie into a mc that I have on my stage. The mc is named as holder and thumbURL down there is a vatiable which holds the name of the swf I'm trying to load into the holder.

My problem is that the mc dissappears when I try to load this new swf into it. Could it be something with relative/static paths?

onEnterFrame = function(){
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();

[Code]....

View 1 Replies

Flash :: Flex 4 - What Makes A GC Root

Apr 3, 2010

What are the rules for something to be a GC root in Flash? I'm using the Flash Builder 4 profiler, and I'm finding odd things are labeled as GC roots in the object reference details (e.g., an Image control that is no longer in the display list, nor static).

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved