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


Similar Posts:


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 :: Stopping A _root.onMouseDown = Function()?

Oct 7, 2003

i have a:

Code:
_root.onMouseDown = function(){
someAction

[code].....

View 4 Replies

Professional :: Buttons Do Not Work When In MovieClips?

May 8, 2010

I'm trying to create a portfolio site and I'm running into some problems. I've built my main site on the timeline and all my buttons work fine the AS is very simple:
function goForward(event:MouseEvent):void {
if(currentFrame == totalFrames) {
gotoAndStop(1);
} else {
nextFrame();
}} next_btn.addEventListener(MouseEvent.CLICK, goForward);

But when I make Movie clips of a scenes with buttons in them (children?) to try and simplify the site, AS doesn't seem to recognize the instance name for the button in the Movie Clip. I get an error message:
1120: Access of undefined property next_btn.

I've put an invisible button over the mc and given it the next_btn instance name and it works although I would like to fix the buttons in the MC properly. Is it better to condense a site into movie clips and single frames or should I just have a long linear timeline that spans many frames?

View 3 Replies

ActionScript 2.0 :: Make Function To Process Few Movieclips At The Same Time?

Sep 4, 2007

I have a problem when few movieclips calls the same function, every movie clip when it is onMouseOver give to the function their properties witch function process.

If i OnMouseOver a few movieclips at the time the function cant calculate every movieclip alone... Maybe i have to put some array.. ??? i dont know..

On OnMouseOver the movieclips move i random direction and when i passes 15 seconds they return to their original place..

View 5 Replies

ActionScript 2.0 :: Cant Make Function Work

Jun 1, 2004

I was reading Kirupa Chinnathambi's function tutorial and I was trying to make my own function, but it's not working! Here it is:[code]

View 9 Replies

Professional :: Calling A Function For All Movieclips?

Feb 7, 2010

I am creating an interactive map which is attached, what I want when you hover over any movieclip the alpha decreases and when you mouse off it goes back to 100% aplha. I can certainly do this, but I only know how to do it by referencing each movieclip first! For example:

[Code].....

View 6 Replies

ActionScript 3.0 :: Any Way To Make StartDrag Function Work Better?

Jan 13, 2010

When you are dragging a movieClip on the stage, it generally works fine. But if you are performing some calculation or hitTest while you dragging, the location of the cursor and the movieClip starts to go unsynched. For example, in the following code, I am running an ENTER_FRAME handler while you drag a box, and this onEnterFrame_Box method contains a bogus for loop to slow down the process. The drag & drop works snappy if you comment out that for loop... But if you bump up that 100 to something like 200, Flash Player runs quite slow, and the location of the box won't match where your mouse cursor is...

ActionScript Code:
var box:Sprite = new Sprite();
box.graphics.clear();
box.graphics.beginFill(0xCCCCCC, 1);
box.graphics.lineStyle(1, 0x999999);
box.graphics.drawRect(0, 0, 100, 100);
[Code] .....

View 2 Replies

ActionScript 2.0 :: Make E To HitTest F To Get Something Else Function But They Won't Work?

Sep 6, 2011

Lets say that I got movieclips A,B,C,D in my scene and E,F which only come into scene when A hitTest B and C hitTest D.I was able to make the A+B and C+D hitTest functioning properly. But when E,F came into the scene, I tried to make E to hitTest F to get something else function but they won't work.# note that there is some short animation before E & F come into scene.I am pretty sure all the instance names are named properly.

View 5 Replies

ActionScript 2.0 :: Listener In Order To Make OnRelease Function Work?

May 20, 2007

Do I have to use a listener in order to make the onRelease function work? Right now it doesn't and I think it's because the png isn't loaded before the onRelease function is invoked.[code]

View 3 Replies

Professional :: Make F5 Key Work?

Nov 30, 2010

I cant find any conflicting assignments in keyboard preferences.

View 6 Replies

Professional :: Can't Make Hyperlink Work

Nov 10, 2010

When I test the movie my hyperlink works fine, but when I publish it, doesn't work. I'm not experienced with ActionScript. Here are some screen shots of what I got...

View 3 Replies

Professional :: Make Code Hinting Work In Flash CS5?

May 1, 2010

I would like to use code hinting in the flash CS5 IDE.But the IDE is constantly building the code hinting cache, so i cant use it?

View 12 Replies

Flash :: Professional - Infocaster Wants 5 (can't Make Video Work)

Jun 28, 2010

I run a small digital signage business and need to be able to use Client provided Flash files. Problem is Harris Infocaster's built in video player is version 5 (yes, it is 2010 already). I made a 15 second clip with three photos and some text, looks okay BUT I want to include video an endless error messages when attempting to Export to Flash. Any takers on a solution.

View 1 Replies

Professional :: Make Buttons Work In Drop Down Movieclip In Flash?

Feb 17, 2010

I am trying to make an index page with buttons for a photography site.the entire page is built in flash so far. I have created a drop down menu that is a Movieclip with 5 buttons.I can not seem to assign an external web page to each buttons that are under the movie clip drop down menu.   Is this a possible? The Movie clip is run by mouse-over the word "studio Gallery" button. This drops down the 5 gallerbuttons (Portrait, children, wedding, Artistic Babies, etc...).  In Flash 8 Pro I know I can assign an external web page named children on the main page but how do I assign these to the buttons in the drop down once the movieclip is made.  Is this where I need to use folders with extra layers in the folder to make it work?

View 6 Replies

Professional :: Can't Make Music On / Off Button Work For Movie Built In CS5

Aug 10, 2010

This Message Used To Be Entitled:"Can't make music on/off button work for my movie built in CS5..."But after literally WEEKS of being on this forum (& desperately seeking the answer in numerous ways) do you mean to tell me there is ABSOLUTELY NO ONE ON THIS FORUM that knows how to make a music/sound button work correctly? [code]Perhaps it's a simple adjustment,.

View 11 Replies

Professional :: Make Drag And Drop Work On A Check Answers Button?

Feb 20, 2012

I ve got a drag and drop code working, but what I really want to do is have a check answers button that tells the user, you have none correct, or two correct or all wrong... I have one target area, and 3 correct answers (out of 7) so I would like to let the user put as many ansers on the target as they want and then check if they have any correct, also a reset code would be nice to put everything back where it started... I tried to break my code up but the events then went mad, Here is what i have so far, it works instantly and lets crrect answers stay and incorrect bounce back..
 
stop();
yes1.visible=false;
allcorrect.visible=false;
doit.text="drag over the words that mean Vision";

[Code].....

View 1 Replies

ActionScript 2.0 :: Make A Graphic Visible When "complete" Cuepoint Is Detected, But Function Doesn't Work?

May 24, 2007

I'm using Flash 8 (in case you need know what version I'm using).There's three flvs I have assigned a cuepoint, "complete". The goal is to make a graphic visible when "complete" cuepoint is detected, but this function seem doesn't work, any feedback on function?:

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);[code]....

View 1 Replies

Professional :: Call Create A Public Function To Make Something Happen In Another .swf?

Feb 16, 2012

I am trying to create a public function, i have a decument class with all of my variables in it, I have worked out how to bring in external .swf files, now  I need a way to have an even trigger something on a separate .swf So at the moment I have a flunction that works on the parent
 
stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);
function mousePosition(event:MouseEvent) {
if(mouseX>=125)

[Code]....

View 4 Replies

Professional :: "Align" Function Doesn't Work?

May 20, 2011

my align function has stopped working. I am using CS4, so I tried downloading the trial CS5, but it doesn't work there either. So, what am I doing wrong?

View 10 Replies

ActionScript 3.0 :: Disable RollOut Function On Movieclips On Click Function?

Sep 13, 2009

I'm doing a basic site with frame labels on the main timeline whose name corresponds to the btn names. A simple  otoAndPlay(evt.target.name); I have a basic navigation setup of 7 mcs with mouse eventlisteners for CLICK, ROLL_OVER and ROLL_OUT.
 
Example:
prepare.addEventListener(MouseEvent.CLICK, navigate);plans.addEventListener(MouseEvent.CLICK, navigate);retire.addEventListener(MouseEvent.CLICK,

[Code]....
 
Does anyone know a better way to do this so when my mcs are clicked they display the rollover content/art? In essence I'm trying to achieve that when the user clicks a btn it goes to that "page" and the corresponding btn stays highlighted. Pretty standard web navigation technique but I just don't know what the best way to do this in flash is and with  how my site is setup.

View 1 Replies

ActionScript 3.0 :: Width Doesn't Work - How To Make It Work

Apr 21, 2010

I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.

I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

View 4 Replies

ActionScript 3.0 :: Declaring A Variable In A Function: Either The Function Or The EventListener - Doesn't Work

Nov 27, 2009

I have a set of Cue Points in an FLV I'm playing. It's an interactive quiz, so the idea is that flash will change a variable, theAnswer, to a different letter depending on which question it is. The answer to question 1 is B, question 2 is D, etc. Either the cue point event listener isn't working, or else it is working and Flash isn't declaring the variables. 1120: Access of undefined property theAnswer. I literally can't find a single problem with my code. I have an almost identical Event Listener further down which works.

[Code]...

View 4 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

Professional :: Testing Movieclips That Have Nested Movieclips?

Oct 21, 2010

I want to test mc animations without having to hit F12 to see if they work correctly. For instance, if I have an animation movieclip and then I make another movieclip and drop that aforementioned movieclip within, and animate [via the timeline or library preview] I'm unable to see on-the-fly what my animation looks like... it only shows the top most nest, unless I F12 it.

So if I have a character blinking eyes (one movieclip) and then I create another movie clip of the face, and put that aforementioned movieclip within, the preview animation within the library does not show how it'll be viewed when F12'n it.,,,, it'd be great to see your animations on the fly.

View 1 Replies

Actionscript 3 :: Function From A MouseEvent Activated Function Will It Not Work Properly?

Jan 3, 2012

I am working with AS3 to build a very simple mp3 player on my site. So far the play and pause button work fine, but when I try to move the slider then click the pause button, it doesn't pause, and then clicking the play button again causes it to play a new file.I'm assuming that for some reason when I call the playMp3 function from my MouseEvent, it's within an object or something and not at the root, so it's like loading a new sound file, but I don't know how to fix that.URL...

View 2 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







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