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




Css Links And Mouse Events Problem



I'm not sure that the subject really articulates the problem I'm having......here's the swf so you can see what's going on....http://www.bulletfactory.com/dev/act/index.htmlInt he swf there are 4 movie clips, that check for mouse postion, and ease into place onRollover - all of this works perfectly. The problem arises on the 4th mc (picuture of the girl on the mc furthest right). The text links under "My Quest for Success on the ACT" - the css hover works great (they turn from white to a yellowish color), but the links are clicked, they do not work at all for some reason. I believe that the function I'm using to detect the mouse position is cancelling out any other mouse functions, but for some reason can't figure out how to get my text links to work.....here's a link to the fla....http://www.bulletfactory.com/dev/act/act.flaany help would be much appreciated!!!Thanks in advance!!!!!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 09-08-2005, 01:43 PM


View Complete Forum Thread with Replies

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

Mouse Events Prevent Html Links From Working?
I have a dynamic text field with HTML formatting applied. The content loaded into this field sometimes contains standard HTML links (<a> tags).

Also in the movie, there is some Actionscript code that implements onClipEvent handlers for mouseUp and mouseDown.

My problem is that the links simply aren't working: the cursor changes to the pointing hand when you mouse over a link, but clicking the link does nothing. It appears that the click is being "intercepted" by the event handlers and is somehow never being interpreted by Flash Player as a click on the link itself.

Has anyone else run into this problem?

Respond To Mouse Events Inside A Movieclip That Has Mouse Events...
I have a main MC that has a couple of mouse events associated with it (onPress mainly). There are also MC's inside this main MC that have Mouse events associated to them (onPress, onMouseMove, onRelease). The child MCs don't seem to get the mouse events (which makes sense, the parent is taking over the event)...how can I make this work? I don't want to have to delete and recreate the event handlers like 900 times as its not efficient...there has to be a better way.

Custom Mouse Cursor With Mouse Events
i'm trying to use a custom mouse cursor for a mouse over and dragging effect (an open hand and a closed hand).

the hand MC has two frames, one frame with the label "open", and one with the label "closed". i'd like to rollover an object, display the hand cursor with the "open" frame. however, when i do this, because the hand is now tracking underneath the mouse cursor, the object underneath immediately calls it's roll_out dispatcher.

how can objects underneath the hand cursor still fire their mouse event dispatchers (roll_out, mouse_up and mouse_down)?

Simulating A Mouse? Mouse Events From A Sprite?
I’m creating an app using the WiiFlash software – it allows you to interface with a Nintendo Wii Remote and use it in Flash apps. I’ve gotten to the point where I have a cursor moving around the screen as you wave the Wii Remote (‘mote) – so it’s acting as a second mouse. I’m just positioning a Sprite to the X and Y coordinates that I’m getting from the ‘mote.

Now, I need to get it to act as a true mouse and make it interact with buttons on the screen when one of the buttons on the ‘mote are pressed. What I’d like to do is have the same buttons usable with either the ‘mote or the mouse – all from the same mouse events and listeners.

Is there a way to simulate a mouse event at a specified pixel coordinate? Example, the ‘mote is at x,y:50,50 and to fire a MouseEvent.CLICK and have it work as a “real” mouse click?

The only way that I can think to do it is with hit tests – and that would get ugly I think.

Thanks!

Web Links And Javascript Events On Flash?
hiya
i thought this was easy but apparenty it is not.

ive made a small flash banner and when the user clicks on it i want it to open a new window with constraint dimensions that will contain another flash movie,

finaly when the user clicks on the flash movie(the big one not the banner) i want the new smaller window(containing the big flash) to close as well.


easy huh?

any suggestions?

thanx in advance
Alex

RollOver Events For TextField Links
Hi,

So, I have this little job to run some events from rolling over http links in a textfield. Clicking is no big deal.

Anyway, I came up with this method, using the rectangles derived from getCharBoundaries to basically calculate a hitrect for each word.


ActionScript Code:
var wordRect:Array = []var tmpString:String = introTxt.text            var strAr:Array = ["River Road", "Waikato River", "Hamilton City","Ngaruawahia"]                        var startRect:Rectangle            var endRect:Rectangle                        for (var i:String in strAr) {                startRect = introTxt.getCharBoundaries(tmpString.search(strAr[i]))                endRect = introTxt.getCharBoundaries(tmpString.search(strAr[i]) + strAr[i].length)                wordRectArray.push([startRect.union(endRect),strAr[i]] )            }                                    trace(wordRectArray)


At the moment, it just pushes the rect and string in question into an array. I'm just gonna write a class that I'll use instead of the array, which will handle dispatching back an event with the word and link's url.

I dunno, is this the best approach to this problem. Am I missing something blindingly obvious about simulating rollOver events from text links?

Triggering Mouse Events W/o The Mouse
I have a button that triggers some code and I want to trigger that same code for initialization purposes w/o the user having to click the button....how would I programmatically trigger that buttons event?

thx for the help in adv.!

Using Html Links Within Dynamic Text Fields To Trigger Events
If I load a dynamic text field with txt that contains links, is there any way I can trigger a flash event in the current window and read in an id property from the a href?

eg. I have a text file which contains names of other text files, each name is an html link, and when one of these links is clicked I want it to open the associated text file in a different dynamic text field, I'm just not sure how to a) trigger an action on the click of a link in a dynamic text field and b) get a parameter from that click at the same time.

I'm sure this problem has been addressed before but I don't know what to search on to find it. Any thoughts? I'm pretty new to this stuff.

~NH

On Mouse Events
I want to perform an action (in this case, rotate the movie clip) that will only take effect when both onmouseover and press keyboard key are true. So far, when I set it up, the action happens when _either_ event is true.

Any thoughts? Thanks.

Mouse Events
I have a button and when the mouse clicks it, I want the movie to go to a different spot on the timeline. But I don't know which actions to give it. The "on" option under Movie Control is greyed out. What am I doing wrong?

Thanks

Mouse Events
i have a button symbol that when I roll over I want a series of "dots" to cascade down. I am not having success in using OnMouseEvent (Roll Over). Any Suggestions would be appreciated.

Mouse Events
Hi,
I have an image gallery which i would like to move forward and backwards in my timeline (left mouse click to start next frame, and right mouse click go back to the previous 10 frames) Please help

See the timeline screenshot below for a better idea

Mouse Events
I need help on a mouse event. I don't know how to attach a sound to a left mouse click.

Sound File name = gunfire
custom cursor (not known if needed) = cursor


O, and does ne1 know how to link a command to the main timeline form a movieclip???


BTW im using MX 2004, Ty in advance! Billdozer.

Mouse Events
mouse events are permitted only for buttons instances on release can some body explain

Mouse Events Help
Hey all first post here so go easy

Alright my project is being made in flash cs3 with AS2.0

I have made a rewind button for a movie clip my only problem is if the user is pressing the mouse down and slides the mouse off the button(which is a movie clip) while still holding the mouse down the animation will keep rewinding. I would like it to stop on the current frame the second the mouse rolls out of the button(which is a movie clip).

below is the code I placed on the movie clip that is acting as my rewind button.

Thanks for any help and guidance!


on (press){
var videoRW;
videoRW = function(){
if((this._parent.movie_mc._currentframe - 1) >= 0){
this._parent.movie_mc.gotoAndStop(this._parent.mov ie_mc._currentframe - 1);
}else{
this._parent.movie_mc.gotoAndStop(0);
}
}
this.onEnterFrame = function(){
this.videoRW();
}
this.onRelease = function(){
delete this.onEnterFrame;
}
this.onRollOut = function(){ //this doesnt seem to work!
trace("hello");
}
}

Mouse Events
is there a way to determine if the mouse rolls off the entire .swf?

I have a vertical scrolling news bar that is supposed to scroll when the mouse is off it, but stay still if the mouse is on it. The problem is that I dont want a large buffer around the scroller to detect that the mouse has moved off the clip, I tried 10px on each side but it can still be tricked if you move the mouse off quickly.

thanks

Mouse Events Mystery?
I don't know what is happening between the following 2 movies, but movie 1 will only work if both execute on an enterFrame event. Movie 2 should really be a mouseMove event though because it offers no inertia unlike movie 1 which has to be enterFrame for the inertia part to work!

Basically:
movie 1 is a rotation / inertia with angle throw
movie 2 is a rotation only thing

Both do the same thing but movie 1's } else if (!dragging) { statement which handles the inertia part after mouseUp only executes when movie 2 is using an enterFrame event and not a mouseMove?? even though both never can run at the same time because the script identifies this with the if hitTest().
This has totally thrown me, they seem to be connected through the clipEvent although both are on totally different timelines to each other, so how changing an event type in movie 2 can effect another in movie 1, i just can't work out.

Any ideas anyone?

cheers SAM


Here's the code for the 2 movies:
MOVIE 1 (Just a simple rotation / angle throw inertia thing)


Code:
onClipEvent (load) {
var dragging = false;
var angularSpeed = 0;
var newAngle = 0;
var oldAngle = 0;
}
onClipEvent (mouseDown) {
if (_parent.platter.hitTest(_root._xmouse, _root._ymouse, true) && (!_parent.tonearm.hitTest(_root._xmouse, _root._ymouse, true))) {
dragging = true;
}
}
onClipEvent (mouseUp) {
if (_parent.platter.hitTest(_root._xmouse, _root._ymouse, true) && (!_parent.tonearm.hitTest(_root._xmouse, _root._ymouse, true))) {
dragging = false;
angularSpeed = newAngle-oldAngle;
}
}
onClipEvent (enterFrame) {
oldAngle = newAngle;
newAngle = Math.atan2(_parent._ymouse-_y, _parent._xmouse-_x)*360/(2*Math.PI);
if (dragging) {
_parent.strobeDots._rotation += newAngle-oldAngle;
_parent.platterHoles._rotation += newAngle-oldAngle;
} else if (!dragging) {
_parent.strobeDots._rotation += angularSpeed;
_parent.platterHoles._rotation += angularSpeed;
angularSpeed *= .98;
}
}


MOVIE 2


Code:
onClipEvent (load) {
var dragging = false;
var newAngle = 0;
var oldAngle = 0;
}
onClipEvent (mouseDown) {
if (_root.technics.tonearm.hitTest(_root._xmouse, _root._ymouse, true)) {
if (dragging != true) {
dragging = true;
}
}
}
onClipEvent (mouseUp) {
dragging = false;
}
onClipEvent (mouseMove) {
oldAngle = newAngle;
newAngle = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x)*360/(2*Math.PI);
if (dragging == true) {
_root.technics.tonearm._rotation += newAngle-oldAngle;
} else {
dragging = false;
updateAfterEvent(mouseMove);
}
}

Mouse Events (On Right Click?)
Hey Guys...

Ok..the screnario then...I have created a flash movie to illustrate the concepts of geometery. You can view the movie here:

http://web.wpclc.org.uk/geometery.swf

The problem being, the movie is intended for use in a classroom environment on a interactive whiteboard. The idea is that the pupils come up to the board and use the mouse/electronic pen to rotate objects and slot them into the right places, as you will see...at the moment each peice has this action applied:

on (keyPress "2") {
tellTarget (shape2) {
play ();
}
}
on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}

This example for instace rotates the shape (Triangle2) when Key (2) is pressed on the keyboard, and then the shape is dragged using a on press event. The problem being that when used on the whiteboard, pupils do not have direct access to a keyboard. Can anyone suggest a way arround this?? Maybe apply an 'On right click' action to rotate the shapes? So the movie can be used completly independant from the Keyboard.

Any suggestions would be greatly appreciated.

Kind Regards

Vector
[Edited by Vector_Drawn2001 on 10-19-2001 at 07:43 AM]

2 Mouse Events Togather?
..





Hi All..


Look at main flash in bluetooth website,,

http://www.bluetooth.com

there are 4 colored botons.. ok?

when mouse rollover on any one,
it will go up..

so far it is easy..

but , when u put the mouse on any sebbotons inside it.. the subboton have a simple effect.
BUT Boton NOT rollout.. !!

how?!


Qus in another way:

this code in frame (1) And (5) :

stop();


And this code in All ten frames: (in another layer)

on(rollOver){
gotoAndPlay(2);
}
on(rollOut){
gotoAndPlay(6);
}


And the motion is to go up between 1 to 5 frame
and to back down between 6 to 10

******* BUT *********

when i put the SAME code at evrey subboton..(to have simpe effect like the above site) .. wehn the mouse rollover boton.. it is working,, BUT when the mouse rollOver subboton, the Boton rollOut..!!!!!


what is the answer?!
how can they working togather?

THX.

Can You Detect Mouse Events On MC's?
Is there a function in flash which allows you to know if a particular MC was clicked? Or pressed? Or hovered over? Any way of detecting mouse events on MCs?

I am new to AS but I have been studying functions for 1 day and a half but I still cannot find a solution to my problem.

1)I have an MC (MC-X) with 4 specific labels

2)There are 4 other MC's(John,Tracy,Paul) on the main _root which correspond to 3 of the labels in MC-X

3)MC-X should play the correspondent of each one of the MC's everytime they are rolled over.

4)If none of the 3 mc's interact with the mouse, MC-X should stay put on its fourth default label

I believe that the switch function should be applied in this case, but how do I parse the John, Tracy and PAul?

I tried this code(updated version):





MovieClip.prototype.WhichLABEL = function (){
var SctnMC
switch(_root.SctnMC.onRollOver){
case "John":
this.gotoAndStop("johnLabel");
break;
case "Tracy":
this.gotoAndStop("TracyLabel");
break;
case "Paul":
this.gotoAndStop("PaulLabel");
break;
default:
this.gotoAndStop("defaultLabel");
}
}


Obviously it doesn't work, I feel like I am mixing everything up. I don't know it is is a synthax problem "_root.SctnMC" or if it is not the right way of calling a mouse event.

Thanx in advance!

Can You Simulate Mouse Events With AS?
Imagine you have three buttons (button1, button2, button3) on stage.
If you press button two it causes button3's visibility state to toggle to it's opposite. So if it's visibility is true the code in button2 sets it to false, and if it's false it gets set to true.

Now for the part I'd like to know...

Is there a way to code button1 so it fires the code in button2 as though it had been pressed?

Something like this maybe:

on (press) {
_root.button2.press();
}

Thanks

Mouse Events On Buttons
Hi, I'm trying to make it so when I move my mouse over a button it brings up a new .html file in another frame.
On the old version of Flash I used (Flash 4) all I did was edit the button's properties, click "on mouse event" "load url" and enter in the properties

In this latest version I can't for the life of me work out how to do it

Please help!

Jon.

Multiple Mouse On/over/out/off Events
So, I'm a moron when it comes to actionscript. I've tried learning but I suck. Anyways.



Diagram:
Mouse on ButtonA:
---->ButtonA Alhpa 50 ~> 100%
---->Buttons B+C+D alpha 50 -> 20%
---->ButtonA animation play

Mouse off buttonA:
---->Buttons B+C+D return to 50% alpha
---->ButtonA animation stops at frame 1
---->ButtonA alpha fades to 50%

Lemmy see if I can explain this in a logical way.
On the main I have 4 buttons. I want each button to be at 50% then 'fade' to 100% alpha when the mouse is over and then fade back to 50% when mouse is off. I have accomplished this using old script. I also want the other 3 buttons to fade to 20% when the mouse is on any one button, then fade back to 50% [depending on point of view, 100%].

Each button will have a movie/animation that I want to play only when the mouse is over. When the mouse goes off, I want it to finish playing and stop on frame 1. For some reason, I'm a moron and I can't even get this part to work.

I know that I have to call or name the other objects for the 20/50% alpha things, but the generic script example things don't help me.

Thanks to who ever helps or even looks at my post.

Multiple Mouse Events
So, I'm a moron when it comes to actionscript. I've tried learning but I suck. Anyways.

Diagram:
Mouse over ButtonA:
---->ButtonA Alhpa 50 ~> 100%
---->Buttons B+C+D alpha 50 -> 20%
---->ButtonA animation play

Mouse off buttonA:
---->Buttons B+C+D return to 50% alpha
---->ButtonA animation stops at frame 1
---->ButtonA alpha fades to 50%

Lemmy see if I can explain this in a logical way.
On the main I have 4 buttons. I want each button to be at 50% then 'fade' to 100% alpha when the mouse is over and then fade back to 50% when mouse is off. I have accomplished this using old script. I also want the other 3 buttons to fade to 20% when the mouse is on any one button, then fade back to 50% [depending on point of view, 100%].

Each button will have a movie/animation that I want to play only when the mouse is over. When the mouse goes off, I want it to finish playing and stop on frame 1. For some reason, I'm a moron and I can't even get this part to work.

I know that I have to call or name the other objects for the 20/50% alpha things, but the generic script example things don't help me.

Thanks to who ever helps or even looks at my post.

Block Mouse Events
How do you block mouse events from passing through a movieClip? I am creating a new movieClip on the fly that contains a jpeg the same size as my stage. When it pops up, mouse clicks will pass right through to stuff below the movie clip by default. I need to block mouse stuff from going through...

Thanks in advance for the help -

- Jmac

Disable Mouse Events
Hi!
I am new to this forum and I would like to say hi to all of you!
And now, my problem:
I am trying to build something like an Windows XP site, with desktop, folders and these kind of things.
I have several icons on the desktop. When I double click one of them, a window appears (something like an application of the specified icon). This window appears on top of the icons and the icons cannot be seen. The problem is that I can select the icons under this window and I don't want that.

Let's try explaining a little bit different so you can understand:
So, If I have a movie A (depth = 1, mouse event attached) and a movie B (depth = 2, NO mouse event attached), how can I disable the mouse event for movie A, so that my mouse doesn't change to the "hand cursor" when I move it over movie B and movie A in the same time (so movie A is an icon under movie B window)

Don't know if you understand what I mean, don't hesitate to ask questions for more info.

Thank you!

Mouse Key Events Class
Double Click
Right Click
M idle Click
Key code = ?

Simultaneous Mouse Events
Hello all,

I'm working on a visual ranking system that uses a set of concept icons that will be placed in different folders. I want to make it so that a MouseDown on the icon with start the drag and when the icon and cursor are over one of the folders, a MouseOver event will be called for the folder. Unfortunately, it doesn't seem to be working in the straightforward way. Ideas? Thanks in advance.

Auto Run Events After Mouse Out
Hi guys,

I have a header strip swf setup. Everything works fine, when you roll over the buttons, a function starts and the text comes up etc. There are 5 buttons.

What I need to do is, once the mouse is OUT of any of the buttons, the movie needs to wait a bit (to make sure the user hasnt gone onto another button) and then autorun through the buttons with pauses so that the readers have enough time to read the text.

I need to have the timer start at the beginning of the movie so that if the user doesnt mouse over or out, the autorun starts anyway.

The code for the button events are contained in seperate functions as follows:


Code:
autoRUNopportunity = function() {

targety1 = 240
targetsxy1 = 150
targetx2 = b2+space
targetx3 = b3+space
targetx4 = b4+space
targetx5 = b5+space
newcol = 0xB51729
nowtime = getTimer();
textbox = ""
textchoice =1
q=1
typetext = 1
clearInterval(ID);


}

autoRUNproduct = function() {

targety2 = 240
targetsxy2 = 150
targetx1 = b1-space
targetx3 = b3+space
targetx4 = b4+space
targetx5 = b5+space
newcol = 0xEE9B00
nowtime = getTimer();
textbox = ""
textchoice =2
q=1
typetext = 1
clearInterval(ID);
}

autoRUNmarket = function() {

targety3 = 240
targetsxy3 = 150
targetx1 = b1-space
targetx2 = b2-space
targetx4 = b4+space
targetx5 = b5+space
newcol = 0xE3007A
nowtime = getTimer();
textbox = ""
textchoice =3
q=1
typetext = 1
clearInterval(ID);
}

autoRUNincome = function() {

targety4 = 240
targetsxy4 = 150
targetx1 = b1-space
targetx2 = b2-space
targetx3 = b3-space
targetx5 = b5+space
newcol = 0x00A8EB
nowtime = getTimer();
textbox = ""
textchoice =4
q=1
typetext = 1
clearInterval(ID);
}

autoRUNteam = function() {

targety5 = 240
targetsxy5 = 150
targetx1 = b1-space
targetx2 = b2-space
targetx3 = b3-space
targetx4 = b4-space
newcol = 0x967642
nowtime = getTimer();
textbox = ""
textchoice =5
q=1
typetext = 1
clearInterval(ID);
}
These functions are exactly the same as what happens when you mouse over the buttons.

So now i need to have a timer start when the person mouses out of the button that waits for a while and then starts autorunning through these functions.

I have spent ages looking around for answers but cant seem to find any.

I am completely stumped and have a headache now, so any help is really appreciated

Thanks

Steve

Mouse Events In Class
I have a class that extends the movieclip class and adds other data parameters. One of my functions displays a txtField with some text that follows the mouse, I want to remove the text onRollOut but using the code as I have it removes the whole movie clip instead of just the specified textfield. What I'm I doing so wrong?


Code:
private var txtField:TextField;
private var text:String;

public function onRollOver():Void {
displayTextData(text:String);
}

private function onRollOut():Void {
removeMovieClip(txtField);
}
public function displayTextData(text:String) {
createTextField("txtField", getNextHighestDepth(), this._xmouse, this._ymouse, 100, 100);
txtField.text = "My Text is "+text;

this.onEnterFrame = function():Void{
txtField._x = this._xmouse;
txtField._y = this._ymouse;
}
}

public function clearDisplayTextData(txtField:TextField) {
removeMovieClip(txtField);
}

Buffer Mouse Events
Does anyone know whether Flash Buffers Mouse Clicks

I have an function that I only want to execute one call at a time, this funciton is executed by a Mouse Click. I have a boolean value which protects the function from responding to another mouse click while the function is in progress.

If I double click the mouse on the button it will complete one pass of the function and then another.

I don't think this is hindering the application now as it is waiting for one to finish before the other, however the way it is behaving suggests that Flash has buffered the second press.

Can anyone confirm this for me?

Thanks,

Nathan

Tell An MC Not To Capture Mouse Events
Besides
ActionScript Code:
mouseChildren=false;
can you specifically tell a display object not to capture mouse events... unfortunately I can't use the above.

i have MCs that pass over buttons and interfere with capturing MOUSE_OVER events. I want them to be stealth. ha.

On: Mouse Events Not Working (Mac)
After beating my head in for 2 days, maybe someone can help.

I have a button with an embedded movie. I am trying to get the button to go to "Scene 2"

on (release) {
gotoAndStop ("Scene 2", 1);
}

This, similar to all of the other on (mouseEvent) commands do not work. However, it will advance if I use on (keyPress). it will also advance if I use

on (keyPress "<Space>") {
this.onMouseDown = function() {
gotoAndStop("Scene 2", 1);
}
}

so obviously, the mouse works... sometimes. any suggestions on how to get the on (release) command to work

flash 8
AS2
Macbook

Loader Mouse Events
Hey guys, I am building an application using xmlConnector. I have two Loader instances on stage, both loading through an external xml document. I am wanting to take the Loader and apply a mouse event to it so that when the user scrolls over it, it enlarges to actual size. The loader is at a reduced size of the original document. Is there a way to make the loader expand upon mouse over? How would I do that?

My Loader instance name is ProfileAdLoader. The loader uses a list component as it's index, so when you select an item from the list, the corresponding xml and image Loads in. I tried making the Loader a movie clip, but That doesn't work. The only work around I can think of would be to place the two different sized loaders into a button, the small loader in the up state, the larger loader in the over state, but this doesn't seem right. Any help would be fantastic. I am new to using the components and actionscript. Should I have used actionscript to load in the xml instead of using the xmlConnector's binding??

Mouse Events On Video
I have a flv that I want to run whenever the mouse is over it. It is a FLVPlayback component named flvDisplay. Using MOUSE_OVER I can get it to start, but as soon as I add the MOUSE_OUT the video plays for about a second and then stops (with the mouse still over the vid). I've used both pause and stop with the same results.

Any Ideas?

BTW the video events are to show something other than the first frame before the vid starts.

Thanks in advanced.

Code follows:

Attach Code

import flash.events.*
import flash.display.*;
import fl.video.*;
import flash.net.*;

var container:Sprite = new Sprite();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "Video/OddsOfHeaven.png";
var pictURLReq:URLRequest = new URLRequest(pictURL);

pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.C OMPLETE, imgLoaded);

function imgLoaded(event:Event):void {
container.addChild(pictLdr.content);
}

flvDisplay.addEventListener(VideoEvent.PLAYING_STA TE_ENTERED,playHandler);
flvDisplay.addEventListener(VideoEvent.COMPLETE,co mpleteHandler);
stage.addEventListener(MouseEvent.MOUSE_OVER,mouse OverHandler);
stage.addEventListener(MouseEvent.MOUSE_OUT,mouseO utHandler);

function playHandler(event:VideoEvent):void {
container.visible = false;
}

function completeHandler(event:VideoEvent):void {
flvDisplay.play();
}

function mouseOverHandler(event:MouseEvent):void {
flvDisplay.play();
}

function mouseOutHandler(event:MouseEvent):void {
flvDisplay.stop();
}

Mouse Events On Video
I currently have several video objects that attach a netstream from a red5 server. I want to be able to click on them and drag them, but the video class is not a subclass of the InteractiveObject class. I've read that a video object can be embedded in a movie clip, but I haven't found how to do this. Is it possible?

Layering And Mouse Events
This seems like a common enough problem that the developers would have something to work around it.

Basically I have a movieclip setup on the stage that covers all of it. The user can mouse down and drag a rectangle across the movieclip and select stuff.

The rectangle is drawn with sprite drawRect and filled in with a color. So the problem now is that since the mouse event that draws the rectangle is attached to the movieclip, when the user tries to shrink the rectangle, the user's mouse is over the sprite instead, consequently not firing the movieclip's mouse event.

I guess I can just overlay an invisble movieclip and set the mousevents to that. But is there anyway to fire the movieclip's mouse event and "skip" the sprite's mouse event?

Mouse Events And Attachmovie
how can i get a mouse click event on an object added using attachmovie.

I have an object containing a dynamic text variable and i want to attach them to my scene then when you click one of them it returns its value.!!

Hambo

Mouse Events Problem
I need a movieclip to be a button basically because of my preloader loading up pictures. I cant seem to get it to work and I have tried a lot of things.

All I really want is it to go orange on hover in the square.

In the file included its just the top left icon i am working on, the rest are buttons (I cant use them though) it may give error about picture since you dont have it, but I just want the hover to work on the movieclip. The code for it is in the top layer on main stage. Not sure if its meant to be there. Hope someone can help

Multiple Mouse Events.
I have the following code:


Code:

fish = Number(19);

this.onRollOver = function(){
if(_level0["img" + fish]._currentframe != 3){
_level0["img" + fish].gotoAndStop(2);
this.gotoAndStop(2);
}
}
this.onRollOut = function(){
if(_level0["img" + fish]._currentframe != 3){
_level0["img" + fish].gotoAndStop(1);
this.gotoAndStop(1);
}
}
this.onRelease = function(){
if(_level0["img" + fish]._currentframe != 3){
_level0["img" + fish].gotoAndStop(3);
this.gotoAndStop(1);
}
} // end
Is it possible to reuse this for multiple different "fish" (i.e. fish = 19, fish = 25, fish = 32)?

Thanks for having a look!

HtmlText Mouse Events
I'm attempting to use a custom cursor. So I've hidden the cursor and have a custom cursor follow the mouse. I've had to make functions that get called onMouseOver and onMouseOut/onMouseReleaseOutside that toggle between my custom hand and arrow cursors. Everything has worked nicely until now.

I'm using htmlText with anchor tags that link to an asfunction to trigger an event. However, I want to be able to change my mouse on mouse over events. Any ideas on how to do this? I've tried to place the event handler on the text field, but I guess the event doesn't get called... I would put it on the text field's container, but that disables the <a> link.

I'm lost... please advise!

Draw Arc And Using Mouse Events
Hi,

i have drawn an arc using the ascb library, but i cant seem to get any mouse events to work. Just curious if this is possible.

I have tested using other methods (not in ascb), and mouse events have worked. Is it because these are Sprite?

At the moment i have:
var pen:Pen = new Pen(graphics);
pen.drawArc(xc,yc,radius,wAngle,sAngle,rLines);

and i would like to add something like:
pen.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);

but the compiler complains.

Any help much appreciated.

Mouse Events In Browsers
I am using a TextArea and a DataGrid in a small app. When previewed in the Flash Player or viewed in IE, the scroll wheel works as expected for both these components (turn the wheel, they scroll). In Firefox, however, they do not scroll when the wheel is turned.

In order to diagnose this, I set up an even listener for the MOUSE_WHEEL event on the main movie which played an alert sound. This worked fine when previewed in the Flash Player, but in either browser, turning the wheel had no effect, the sound would not play.

Can anyone explain what's going on here? I mostly just want my components to scroll in FF, but I'd like to understand why my event listener apparently stopped working in-browser.

Mouse Events On Video
I have a flv that I want to run whenever the mouse is over it. It is a FLVPlayback component named flvDisplay. Using MOUSE_OVER I can get it to start, but as soon as I add the MOUSE_OUT the video plays for about a second and then stops (with the mouse still over the vid). I've used both pause and stop with the same results.

Any Ideas?

BTW the video events are to show something other than the first frame before the vid starts.

Thanks in advanced.

Code follows:







Attach Code

import flash.events.*
import flash.display.*;
import fl.video.*;
import flash.net.*;

var container:Sprite = new Sprite();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "Video/OddsOfHeaven.png";
var pictURLReq:URLRequest = new URLRequest(pictURL);

pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);

function imgLoaded(event:Event):void {
container.addChild(pictLdr.content);
}

flvDisplay.addEventListener(VideoEvent.PLAYING_STATE_ENTERED,playHandler);
flvDisplay.addEventListener(VideoEvent.COMPLETE,completeHandler);
stage.addEventListener(MouseEvent.MOUSE_OVER,mouseOverHandler);
stage.addEventListener(MouseEvent.MOUSE_OUT,mouseOutHandler);

function playHandler(event:VideoEvent):void {
container.visible = false;
}

function completeHandler(event:VideoEvent):void {
flvDisplay.play();
}

function mouseOverHandler(event:MouseEvent):void {
flvDisplay.play();
}

function mouseOutHandler(event:MouseEvent):void {
flvDisplay.stop();
}

Spurious Mouse Out Events
Has anbody got any ideas why i am getting spurious mouse_out events when moving the mouse down or right but not up or left over a Sprite ?

Mouse Rollover Events
Hello all I am a novice to Flash so bear with me! I have box with basically two sections one side is a list of menu items in the form of text buttons that load a movie in the other side when the user mouses over them. Is there a way to unload the movie if the user rolls off the text but leave the movie if he rolls of the text into the loaded movie... if that makes sense...So if user rolls over Item A the options for Item A fade in and he might want to select one or instead move from Item A to Item B etc. Thanks in advance

Help With Rollout Mouse Events
I have a nav system. It has buttons with MC's that fade out on mouse over and are supposed to fade back in on rollout. But it only works sometimes , the animations are tweened and the actions are obiously scripted. Any ideas, or does anybody need further information.

QUICK Help On Mouse Over Events On MC's HELP
basically i have 6 movie clips, each movie clip plays its role as a button (home, about us, ministries, media, etc)...and when the mouse rolls over each MC (about us, ministires and media), a set of buttons come out so u can click wher eu want to go...now when my mouse pointer is currently on "about us" mc and the menu comes out, when i put my mouse pointer to "ministries" mc which is right next to it, sometimes the "about us" mc doesnt go back to normal, the menu doesnt go away...can someone please help me .... ive attached the file if u can please help me out..thank u!

on scene 1, each layer i have this script:about.onRollOver = roll;
function roll() {
this.gotoAndPlay("over");
delete this.onRollOver;
this.onEnterFrame = function() {
if (!this.hitTest(_xmouse, _ymouse, false)) {
this.gotoAndStop("up");
this.onRollOver = roll;
delete this.onEnterFrame;
}
};
}
then its ministries.onrollover and media.onrollover...

is there one more script i need to add or sumthin someone please help

Mouse Events Having Problems?
Hello,
Im trying to get up to speed on the AS3, but keep having problems that seem like they shouldnt be happening.

first, i have 6 movie clips on my stage... named b1-b6.
those are my buttons.

this simple code (on main timeline) doesn't work:


ActionScript Code:
var main:MovieClip = thisfunction initNav (){    for (var i:uint=1; i<=6; i++)    {        main["b" + i].addEventListener (MouseEvent.MOUSE_DOWN, mainPress);        main["b"+i].datahold = i;        main["b"+i].buttonMode = true;    }}initNav ();//-----------------------------------------------------------------------------------------------function mainPress (e:Event):void{    trace(e.target.datahold)}


the trace returns undefined? why cant the datahold variable be added to the movie clip?

if i try to trace:

ActionScript Code:
trace(e.target.name)


i get results like instance17. which isnt the name or instance name of the movie clip at all.

the code looks simple enough, and it looks correct. what am i missing here?
Thanks

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