OnRollOver - Stopping The Who MC Activating This
Hey, can you please help?
I have a movieclip with a square in it. The square is duplicated, flipped vertical, mask applied to it - So that it gives a reflection effect.
I'm then attaching this movieclip to the stage and applying a onRollOver function to the movieclip to animate it accordingly.
If I hover of the square it carries out the onRollOver, if I hover over the reflection it also carries out the onRollOver.
How can I have just the square activating the onRollOver and not the reflection within the same movieclip?
Cheers !
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-29-2007, 06:52 AM
View Complete Forum Thread with Replies
Sponsored Links:
Activating And De-activating Loaded Movies
Hi guys,
Am working on a flash AS 2.0 project where am loading movies from the same folder. my code goes like
on (release) {
loadMovie("HAD.swf",2);
}
problem is the swf loads infront of the main movie but the main movie's links are still active.
Is there a way I can dee-activate them? thanks in advance.
View Replies !
View Related
OnRollOver Event Of Parent MC Preventing OnRollOver Of Child
I have a movieClip, which in turn has a nested movieClip. I need each of these to have thier own onRollOver events, the parent movieClip is OK, but the event never fires for the nested movieClip. Can anyone think of a workaround?
My code goes something like this:
Code:
attachMovie("mcOne", "mcOne", 100);
mcOne._x = 20;
mcOne._y = 20;
mcOne.onRollOver = function(){
trace("hi");
};
mcOne.attachMovie("mcTwo", "mcTwo", 100);
mcOne.mcTwo.onRollOver = function(){
trace("bye");
};
"hi" is output when mcOne is rolled over, as it should, but nothing is output when mcTwo is moused over.
View Replies !
View Related
Parent.onRollOver, Child.onRollOver Do Not Work Together
hello,
I have an arrow that should highlight on rollover and move a movieclip.
however, when used together only the last onRollOver is working, if I remove the last definition the first two start working.
Code:
gallery.butScrollLeft.arrowOver.onRollOver = addHighlight;
gallery.butScrollLeft.arrowOver.onRollOut = removeHighlight;
gallery.butScrollLeft.onRollOver = scrollLeft;
function scrollLeft()
{
this.onEnterFrame = function()
{
gallery.imgHolder._x -= .5;
if (gallery.imgHolder._x >= gallery.imgHolder._width)
{
delete this.onEnterFrame;
}
}
}
// highlight
function addHighlight()
{
this.onEnterFrame = function()
{
this._alpha += 10;
if (this._alpha >= 100)
{
this._alpha = 101;
delete this.onEnterFrame;
}
}
}
Is there a workaround? or rather is it possible to have two functions execute from the same onRollOver? what is the best way to fix this?
if you could help
thank you
View Replies !
View Related
Create OnrollOver Event Without OnrollOver AS
Hi guys!
I am working on a job that uses the "onMouseDown" method to create a button without using a regular button (or MC for that matter). So, I have to create a variable which defines an area between a specific _x and _y, and besides that, I have to create a function that monitors the values of _xmouse and _ymouse. If the mouse is clicked inside the _x and _y area specified, a function will be triggered.
Thatīs ok, Iīve managed to do that. What I am not able to do is to create a "rollOver" event in this situation. īCause I just canīt use buttons in this project, Iīve got to find a alternate way to create a onRollover event, just like Iīve used an alternate way to create a button (onMouseDown instead of onRelease).
I am attaching the fla to help you guys to help me...
By the way, the fla contains a free component which is not my work (credits go to http://www.iparigrafika.hu/pageflip
Thanks in advance
View Replies !
View Related
X/y Of MC Not Activating
Basically, when an MC touches another MC, it moves to a different frame of the actual movie. The problem is, I want the coordinates of the MC that touched the other to change after the actual movie has gone to the frame it was told to. This is the AS I have right now, in which the coordinates wont change:
onClipEvent(enterFrame) {
if (this.hitTest(_root.rah)) {
_root.gotoAndStop("2");
tellTarget(_root.rah) {
_x=36;
_y=197;
}
}
}
I think I might have an idea on how to fix it that I just thought of, but now I have to go somewhere till 12:30 so yeah >_>
View Replies !
View Related
X/y Of MC Not Activating
Basically, when an MC touches another MC, it moves to a different frame of the actual movie. The problem is, I want the coordinates of the MC that touched the other to change after the actual movie has gone to the frame it was told to. This is the AS I have right now, in which the coordinates wont change:
onClipEvent(enterFrame) {
if (this.hitTest(_root.rah)) {
_root.gotoAndStop("2");
tellTarget(_root.rah) {
_x=36;
_y=197;
}
}
}
I think I might have an idea on how to fix it that I just thought of, but now I have to go somewhere till 12:30 so yeah >_>
View Replies !
View Related
Activating Different Sounds
Building an animated graphic for an HTML site. The graphic be a dropdown type menu with 3 choices of audio files. For some reason I can't get the sound to play. If you wish to download the FLA and see what I'm missing, I will post it==
http://www.savagebeaststudio.com/audio.zip
I tried the attach.sound AS and that didn't work with the buttons. Then I tried making a little MC for each sound file with 2 frames in each (first one with no sound, second with the sound) and asked the button to play the second frame on (release), but that didn't work because of the dropdown click activating all three sounds.
The buttons obviously need to stop the sound that's already playing before playing the designated sound.
Was this clear?
I know I'm missing something very easy here, but I'm at a loss. Any ideas?
Thanks in advance.
View Replies !
View Related
Activating A Scrollbar
Hi guys
The text feild starts + scrollbar with no content and I add to this by adding to a string. I need to update /refresh without using the return key. If I do press return the scrollbar becomes active.
I have tried setEnable but this does not seem to work?!
Hope you can help
Cheers
Ol
View Replies !
View Related
De-activating Buttons
On my main stage, I have a set of buttons contained in a MC. That MC slides behind a box on the stage to "hide" the buttons at different times in my presentation.
I just realized that those buttons are still active when the mouse rolls over them while they are supposedly "hidden" behind the box.
Is there any way to disable these buttons while they lay on a particular X axis of the stage?
Thanks for any help.
Alex
View Replies !
View Related
De-activating Buttons
On my main stage, I have a set of buttons contained in a MC. That MC slides behind a box on the stage to "hide" the buttons at different times in my presentation.
I just realized that those buttons are still active when the mouse rolls over them while they are supposedly "hidden" behind the box.
Is there any way to disable these buttons while they lay on a particular X axis of the stage? Maybe using an "if" statement? I'm not that great at crteating action scripting, so any help is greatly appreciated.
Alex
View Replies !
View Related
Uploading And Activating .swf
We are changing a site which was html to flash. the site is done and ftped but we have having an issue making the .swf the default page. How do we do this? right now we to type the domain then add /index.swf I want this index to be the domain. What are we doing wrong?
thanks
View Replies !
View Related
Activating Flash
small question....i make a flash and upload it and all that stuff...when i look at it on the site...i dont get the yellow 'click to activate' bar...but if i have a flash navigation, when i mouseover it 'outlines' it and i have to click it once to ..?? activate it ??...then i can click on what i want.
(i.e. http://www.mulliganappliance.com)
View Replies !
View Related
Activating A Button?
I have designed an intro page for my site. I have one button which says....ENTER.
How do i make this button active? I want the user to click on this button to go to my site - how do i do this?
Thanks
Rob
View Replies !
View Related
Activating Tab Index
I gave each field in my form an instance name of "t1" to "t14", published my fla, uploaded it, checked it on a browser and the tabbing doesn't work. I click tab while in the first input text field and nothing happens. How do I activate the tab index?
I have searched and couldn't find the answer.
thanks
View Replies !
View Related
Activating A Button
I have button on my main timeline (call it mainButton). When you click mainButton (or press Enter), a movie clip is attached that contains another button (call it movieButton).
My problem is that I want to be able to press Enter when the movie clip appears and have the same result as if you clicked movieButton. Currenlty, this is not working.
Any suggestions?
View Replies !
View Related
Activating A Different Layer
Hi,
I'm a REAL newbie at ActionScript, so my question is gonna sound dumb.
I have a flash movie wich consists of two layers.
One is a button and the other is the main animation. I want to activate the main animation, by pressing the button.
How do I do that in ActionScript? Macromedia's site was of no help.
Thanks
-Dany
View Replies !
View Related
Activating An MC Without OnPress...
Hello All,
Maybe a simple question:
I have an MC that bounces and rotates. It is activated using:
ball.onPress = function(){
bounce_angle = roll_angle = 0;
bounce_force = roll_force = 1;
}
So, it starts when its pressed, but I want it to play when the movie starts, and not have to be pressed by the user. I tried onEnterframe and onLoad...
Any thoughts?
Thanks
Rob
View Replies !
View Related
Activating A Button
Hi. I'm completely rusty with actionscript, having been away from it for a few years. In Flash MX I was able to create a button and use the simple gotoandStop("frame label") language for a text button. Now, in CS3, I'm unable to use that language, as the actionscript window says something like "Unable to apply actions to current content" for the button. Can somebody please write for me the script needed to activate a simple text button to go to (on release) and stop at a certain frame in the movie until I can get up to speed with the latest actionscript rules? I'd be eternally grateful!
View Replies !
View Related
Activating An Animation
sorry for the stupid subject name...
this is what I need, I made a 3d model of a PC, What I want is to clic on the monitor and turn on the computer, I have the animation of the computer monitor turning on, but I donīt know how to activate it.....thanks!
View Replies !
View Related
Tween Activating Too Soon
Hi all,
So, excuse my code...I haven't gotten to the level yet where I can write super efficiently. My problem, which I had working this morning, but not now, is that I have a Tween set up on a loader, and immediately upon defining the Tween, I call out a .stop(); so the Tween doesn't start immediately. The problem is that the loader seems to be sitting at the endpoint of the Tween when the movie starts, instead of the x and y positions I have defined. When I click the next button, the loader pops back to where it should be, tweens away, and then my next image tweens back...after that everything works like it should. Help?
Code:
import flash.display.*;
import flash.events.Event;
import fl.transitions.easing.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
var loader:Loader = new Loader;
loader.x = loader.y = 30;
var request1:URLRequest = new URLRequest("img.jpg");
var request2:URLRequest = new URLRequest("img2.jpg");
loader.load(request1);
var masker:MovieClip = new MovieClip();
masker.graphics.beginFill(0x000000);
masker.graphics.drawRect(30,30,400,300);
masker.graphics.endFill();
addChild(masker);
loader.mask = masker;
var outTween:Tween = new Tween(loader, "x", Strong.easeIn, 30, -530, .5, true);
outTween.stop();
outTween.addEventListener(TweenEvent.MOTION_FINISH, nextImage);
var inTween:Tween = new Tween(loader, "x", Strong.easeOut, -530, 30,1.5,true);
inTween.stop();
inTween.addEventListener(TweenEvent.MOTION_FINISH, finishLoad);
var nextImageB:nextB = new nextB();
nextImageB.x = 500;
nextImageB.y = 350;
nextImageB.buttonMode = true;
nextImageB.addEventListener(MouseEvent.MOUSE_UP, unloadImage);
addChild(nextImageB);
function unloadImage(e:Event):void{
outTween.start();
}
function nextImage(e:Event):void{
loader.load(request2);
inTween.start();
removeChild(nextImageB);
}
function finishLoad(e:Event):void{
addChild(nextImageB);
}
addChild(loader);
inTween.start();
Thanks,
varPBR:Tasty
View Replies !
View Related
Activating An Animation
sorry for the stupid subject name...
this is what I need, I made a 3d model of a PC, What I want is to clic on the monitor and turn on the computer, I have the animation of the computer monitor turning on, but I donīt know how to activate it.....thanks!
View Replies !
View Related
Activating The Webcam....
Hi,
since nobody felt like offering code or a movie on the topic web cam I decided to figure it out on my own (:
I had this overview of the Camera object:
Camera.prototype.setMode
Camera.prototype.setQuality
Camera.prototype.setKeyFrameInterval
Camera.prototype.setMotionLevel
Camera.prototype.setBandwidth
Camera.prototype.setLoopback
Camera.get
Of all these only Camera.get() sounded useful for getting something from the cam. But where to point it? I already noticed the video object from the libary and decided to give it a try.
This is how it works:
View the library. Click the "pull down" menu to the upper right and select "new video". Drag and drop the new object to the stage and give it an instance name. In my example I took the name "camMC". I used the attachVideo with the Camera.get() function:
_root.camMC.attachVideo(Camera.get());
That's it for activating the cam. Now we just need to find out how the NetStream Object works and we through with it
Original thread
Source Example
Regards,
maltek
View Replies !
View Related
Html Link Activating Swf
Hi
I have an embeded swf file on a page.
But I want to start the swf with a normal a href link in the html.
Can this be done????
I dont want to open a new page and start the flash there but on the same page,, please help me.
View Replies !
View Related
Help...Activating QT Movie On Rollover...
I'm using Flash 5
I want to play a small QT clip on button rollover.
What I have done so far...
I placed the MOV into a movie clip called Minimov. I put this into the first frame of the movie clip:
ifFrameLoaded (1) {
Playmovie = 0;
}
if (Playmovie = 0) {
stop ();
} else if (Playmovie =1) {
play ();
}
I called the variablr "Playmovie"
Then on my main scene, I programmed a button as follows:
on (release) {
gotoAndPlay ("startplay");
}
on (release) {
Designation = "HOME";
}
on (release) {
MainText = ""Some text....
}
on (rollOver) {
//
_root.Movie.Playmovie = 1;
}
The problem is, the movie clip doesn't even show up when I test the movie. I'm reasonably new at this so I don't know what I'm missing...
Can someone help?
View Replies !
View Related
Activating Functions In _parent_parent (MX)
Well, I'm stumped...
Can someone please explain what I'm doing wrong here? I'm working in Flash MX and have 3 objects:
_level0
slider (movieClip which contains...)
thumb1 (another MC)
Now, _level0 has a function called loadbigpic(x) which just runs trace(x);
_level0.slider.thumb1 has the following:
---------
onClipEvent(load){
_parent._parent.loadbigpic(1);
this.onRelease=function(){
_parent._parent.loadbigpic(2);
}
}
---------
when run, the first function call works fine, but the other doesn't respond to clicks.
I've tried variations on this.onRelease (onPress, onClipEvent(mouseDown), etc.) to no avail so I think it's something else I'm doing wrong.
Anyone got any ideas?
Thanks!
- M -
View Replies !
View Related
Activating Movie Through A Button
how would one go about this:
I want to have a button that when rolled over will activate a part of a movie next to that button. Is there a way through variables and frame labels? I am at a loss as to how to do it.
What I want to do is have a movie that behaves differently whenever the 3 buttons around it are rolled over. I hope this is clear enough. Any help or advice would be great.
View Replies !
View Related
Activating A Nested Movie
I think I saw it somewhere - but im not sure where or what was it...
I want a movie thats nested to be sensitive to mouse events, but I dont know how to refer to it and from what level of nesting
for example lets assume 3 levels of nesting
m_magician.m_hat.m_rabbit
what do I write to make the rabbit act on click?
View Replies !
View Related
Activating Text On Button
Hello
I am trying to create a simple button of a box with text inside. The text will change color with a mouse over and click. However, I am unable to click (no mouse hand appears) on the text portion of the button, and only appears around the edges where I have drawn a box (slightly larger than the text box) to activate. Does anyone know how to solve this problem? What have I forgotten to do here? Thank you very much for your help.
View Replies !
View Related
Activating Roll Over With My Script PLEASE HELP
Please someone help me this is really important!
This script works for scrolling panoramic pictures but only has one little problem I cannot fix-
onClipEvent (enterFrame) {
if (_root.mainVar == 0) {
homeX = (-_root._xmouse)+800;
} else {
homeX = (-_root.mainVar)+800;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.mainVar == 0) {
moveX = diffX/60;
} else {
moveX = diffX/5;
}
_x = thisX+moveX;
}
The problem is If your on a mac, It detects the x axis (when clicked) even when the mouse is not scrolled over the swf surface. How could you make it so only this script works when scrolled over the swf area? I have the file attached to this post. Please someone help me!
View Replies !
View Related
Code For Activating Flv Controls
Would some kind soul mind looking over my code and figure out why my controller buttons aren't really working?
(The video clear code clears the netstream of previously playing videos on account of varying aspect ratios)
Everything works perfectly except my play, pause and rewind buttons don't really work at all. Sometimes they just freeze the video playing completely but then I can't do anything else with the video except load another from another button.
I just need pause, play and rewind to work to finish the project. If anyone can help, I'd appreciate it. I'm sure it's something dumb and simple I'm doing wrong. Thanks Peter
this.btn_01.onRelease = function() {
my_video.clear();
my_video2.clear();
// Create a NetConnection object
var my_nc:NetConnection = new NetConnection();
// Create a local streaming connection
my_nc.connect(null);
// Create a NetStream object and define an onStatus() function
var my_ns:NetStream = new NetStream(my_nc);
// Attach the NetStream video feed to the Video object
my_video.attachVideo(my_ns);
// Begin playing the FLV file
my_ns.play("excess flvs/Chicken Training.flv");
};
this.btn_play.onRelease = function() {
my_ns.play();
};
this.btn_pause.onRelease = function() {
my_ns.pause();
};
this.btn_rewind.onRelease = function() {
my_ns.seek(0);
};
View Replies !
View Related
Moving Buttons Around W/o Activating
I am a newbie -- Flash student that is having trouble remembering what I learned in Flash a few classes ago. I'll be posting a few VERY BASIC questions.
1st off, what am i doing that is making my buttons active when I try to move them in my flash file? I have another version of the file that allows me to select the buttons and move them around on the stage, but then this latest version I saved won't allow me to select and move becasue it's acting like the button is active.
A humble thanks to you.
View Replies !
View Related
Activating /Deactivating Code
Hi guys,
I have a few buttons that have a decent amount of code on them.
Once clicked they start by doing a animation.
but if another button is clicked while that animation is occuring everything goes nuts.
I have a good idea why but to sort this out would mean a total re-think of my code.
So basically i would just like to deactivate the code in the other buttons while this animation occurs and when the animation is finished reactvate it.
Any ideas?
thanks
Aidan
View Replies !
View Related
[F8] Storing And Activating Key Presses
Hi there, I'm still fairly new to flash. I am currently trying to figure out how to use Flash to store Key Presses. I have read all about calling the Object KeyListener but I really don't understand how it works or how to use it. I'll try to explain as best I can. What I would like to achieve is:
- Have my user press the left or right arrow keys between frames 10 and 40
- Have my program store this
- In frame 50 whichever arrow was pressed will activate a go to frame code i.e. if left was pressed they will jump to frame 60, if right was pressed they will jump to frame 70.
I hope this makes some sense to somebody.
View Replies !
View Related
[CS3] Importing Then Activating SWFs
Hi everyone,
The problem I'm having is . . . well let you show you what i've got 1st
var myMCL:MovieClipLoader = new MovieClipLoader();
myMCL.loadClip("Back panel.swf", "container");
and this works fine but the follow up problems i have is
1. how do i link this swf to load into my container on a button press.
2. Should i do relevant effects (fading in) in the importing file or on the main fla. once imported
I hope this makes sense i'am as new as they come with this program
Thanks in advance for any help anyone can offer.
Cheers
Ollie
View Replies !
View Related
Help Activating & Deactivating Buttons
Hello everybody.
I have this code to activate and deactivate buttons in a menu.
The code works fine but there's one little thing.
When you click on a button it changes it colors and other things, and also it deactivates itself so can't click on it again. But I want to be able to click on the active button so it can take back to it's main page.
The reason why I need this is because this buttons are inside an HTML site and I need to be able to refresh the site by re-clicking on the button...
Here's the code I have:
PHP Code:
var myButtons = [this.b1, this.b2, this.b3];
var myColors = [colorB1, colorB2, colorB3];
var myUrls = [url1, url2, url3];
for (var i=0; i<myButtons.length; i++){
myButtons[i].onRollOver = function() {
this.btnIZQ.colorTo(myColors[substring(this._name, 2,1) -1], .5);
this.btnCTR.colorTo(myColors[substring(this._name, 2,1) -1], .5);
this.btnDER.colorTo(myColors[substring(this._name, 2,1) -1], .5);
};
myButtons[i].onRollOut = function() {
this.btnIZQ.colorTo(colorBase, 1);
this.btnCTR.colorTo(colorBase, 1);
this.btnDER.colorTo(colorBase, 1);
};
myButtons[i].onPress = function() {
this._parent.activateItem(this);
this.getURL(myUrls[substring(this._name, 2,1) -1], "_self");
}
}
this.activateItem = function(item) {
for (var i=0; i<myButtons.length; i++){
this.currentItem.enabled = false;
myButtons[i].btnIZQ.colorTo(colorBase, 0);
myButtons[i].btnCTR.colorTo(colorBase, 0);
myButtons[i].btnDER.colorTo(colorBase, 0);
}
if (this.currentItem != false) this.deActivateItem();
this.currentItem = item;
var numColor = substring(this.currentItem._name, 2,1) -1;
_global.lastClickedColor = myColors[numColor];
myButtons[numColor].btnIZQ.colorTo(lastClickedColor, 1);
myButtons[numColor].btnCTR.colorTo(lastClickedColor, 1);
myButtons[numColor].btnDER.colorTo(lastClickedColor, 1);
this.currentItem.enabled = false;
}
this.deActivateItem = function() {
this.currentItem.enabled = true;
this.currentItem = undefined;
};
activateItem(b1);
Anyone?
Thanks in advance
View Replies !
View Related
Activating The Flash Embed
Hey guys, I'm making a game and when the swf first loads, I need to click within the window to have it start receiving key input of any kind. I had thought having a title menu (where the player initially clicks 'play game') would solve this, since that would count as a click within the window. However when the actual level loads up.. I have to click within the window yet again to have any kind of input register. So my question is.. is there any way to have it so the player need not click within the window to start having input affect the game?
If not, something must be wacky about the way I did the 'play game' button to start, since other games don't have this problem. What I did was my main function creates the menu (stored in an array). Upon hitting 'play game', I removeChild the elements of the title screen array and call my level1 function, which loads everything needed for level 1.
EDIT: I realized that if I make my title screen "buttons" not actually buttons, but movieclips, it seems to count as a click. This is a solution, I guess, but does anyone know how to use buttons and still have it count as a click?
View Replies !
View Related
Activating Lightbox 2 From Flash
hi guys, im wondering if it is possible to activate lightbox 2 from flash.
As extracted from the Lightbox tutorial, lightbox needs an <a href> tag with a rel="lightbox" attribute to be activated.
e.g.
Code:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
However I dun think it is possible to use getURL(); for this in flash right?
is there a work around for this? what i am aiming to do is have the user click on an image/mc in my flash
e.g.
Code:
my_mc.onRelease = function() { // Activate lightbox from here };
and have it call the light box up.
thanks a million in advance for anyone who is willing to help...
View Replies !
View Related
Help Please Activating Powerpoint From Flash
Hi
Does anyone know if it is possible to open up a powerpoint presentation from the click of a flash button? I'm having loads of trouble doing this and I'm beginning to think that it isn't possible (but I've already promised my client!) HELP!
I've even tried using a divert from a batch file (opened using FSCommand) but I can't even get that to work!
Please help if you can, I thought it would be quite straightforward but this is now driving me mental!
Cheers
Grom.
View Replies !
View Related
Activating One Button When Another Is Pressed?
Hello i was wondering if someone could help, im creating a flash website which is on brain anatomy.
I have created an image of the brain with the different sections coloured, which are buttons. Ive inserted a movie in the button so when the mouse hovers over these different areas they move out of the brain image and then when a person clicks they are sent to a diferent page.
I have also created a vertical menu, which are simply buttons with the name of the different brain sections on them.
What i was hoping i could do was, somehow link these two buttons together so if i hover over a text button, then the corresponding brain image button would activate. And if i hover over a brain image button, then so would the appropriate text button. As if they were the same button?
Anyones help would be great, thanks!
View Replies !
View Related
|