ActionScript 3.0 :: Tweening Alpha On MOUSE_OVER/OUT?
Aug 5, 2010
I am tweening the alpha of some MCs to make them vis/invisible on MOUSE_OVER and MOUSE_OUT.Its easy for me to do this as a static event but the effect is a little too abrubt. I've accomplished this with
function NEOVER(e:MouseEvent):void{
NEZOOM.alpha=.5;
NETXT.alpha=1;
[code].....
View 4 Replies
Similar Posts:
Jun 14, 2009
I have a dynamic text field which loads data from an xml file, I've embedded the font so that I can tween the motions etc of the text, and so far i've been able to apply a motion tween on the alpha channel and get my text to fade in.The problem is that the UIScrollBar component which is attached to the text field gets stuck at the starting alpha amount and wont tween to the full amount (like the text will) at the moment I'm motion tweening from 33% alpha to 100% alpha and while the text reaches the full 100%, the scrollbar gets stuck at 33%.
is there anyway to get this working?I also have another smaller problem with my UIScrollbar, when it first loads it flickers as a white square in the corner of the text field for a moment before properly rendering. this happens with and without tweening. I've made my own skin for the component, could this be causing the problem somehow?I can work around the alpha issue if it renders properly instantly, and vice versa.
View 2 Replies
Jul 8, 2009
I'm making a dynamic gallery to show some products from a catalog. This has to be scrollable only by pressing the left and right navigation buttons (see attached file galleryexplaination_01.png). The number of images varies by case as all the data are read from an XML (already done): all the infos are stored inside every product container (see movieclips structure in attached file galleryexplaination_03.png)
What I can't figure out to do is: how make the object tween (see attached file galleryexplaination_02.png )from a position to the next or previous one? As shown on attached file galleryexplaination_01.png the position are always the same. Also, as the images get distant from the center, they shrink and become more transparent.
I'm thinking to use an onEnterFrame which listens when the central product is changed (by pressing the left and right buttons), understands in which direction scroll the gallery and then, using a for cycle, it takes every product in that direction. But that's all that I've came up. I need some hints because I don't know how to control the image scaling and alpha as the x choord changes.
View 0 Replies
Jun 2, 2011
I am building a custom preloader which is different than the "traditional" sliding bar that is common in RIAs. The preloader uses 100 white laser lights which are in a straight line, and collectively they indicate the progress bar. Let me describe how this works before I ask my question:
........................,,,,,,,,,:::::::::::::::::::::::::BBBBBBBB and so on...
The above string captures the spirit of the preloader indicator. In this illustration, the bigger and fatter the character, the brighter the laser light in my actual preloader: The farthest laser to the right indicates the currently loaded percentage. This is also the brightest laser light.All other trailing lasers get increasingly dimmer until they become completely black, as if they had burned a whole in the back of the screen.
Step "2" is where things get tricky. For some reason, the trialing lasers do not get darker, except for a few random lasers. Here is a snippet of the code controlling the brightness (or, as I used it, the alpha property) of the dot:
... more code ...
//Build the dots according the configuration and load status parameters
private function buildDots(x:int, y:int):void {
//Draw the dot, details not shown[code].......
This entire preloader is inside of a custom class.The laser lights are created completely by code, without access to the library.
View 2 Replies
Jul 27, 2009
I'm getting the following error: Motion tweening will not occur on layers with ungrouped shapes or on layers with more than one group or symbol. I don't have any ungrouped shapes (it's all text), each layer has 5 instances of only one symbol (keyframes), no objects are grouped and text is all static text.
When watching the animation, the first word (web) looks fine, on the second word (design) the tween fails on the last couple of frames of that clip (the blur filter disappears), the third word (and) is OK, and on the forth word (development) the blur filter is not applied to the last 16 frames of that clip.I broke each animation into its own MC thinking that was causing the issue, but that didn't fix anything.
View 5 Replies
Oct 23, 2010
[URL] i want the object to fade out but in the object there's a lot of overlapping pictures and each becomes half transparent. how to make the movieclip to change the alpha as it was without objects?
[Code]....
View 2 Replies
Dec 15, 2011
just spotted this curious trick. If you want to flip something to go invisible on a click, and then reappear on another click (etc etc), try this:
create the sprite, setting alpha to either to 1 OR -1
mySprite.alpha=1; //OR
mySprite.aplha=-1;
[code]....
View 9 Replies
Jun 27, 2003
using AS, on loading a movie a solid shape is there with alpha at 100% then over a period of 5 secs its alpha is reduced to 0.
i'm new to this......please help if you want to if you don't have a good weekend but think of me struggling onwards and upwards...
View 14 Replies
Aug 2, 2011
I want to do aplpha = .5 for the whole app, but then have a MC display at full alpha, is there any way to do this?
View 6 Replies
Jun 20, 2009
I've created a menu that scrolls down when my mouse is over the click zone but somehow when I move my mouse out of the click zone it stays up and will not go back to my first frame. Here's my code
stop()
medczone.addEventListener(MouseEvent.MOUSE_OVER,med2);medczone.addEventListener(MouseEvent.MOUSE_OUT,med4);
function med2(e:MouseEvent):void { play();}
function med4(e:MouseEvent):void { gotoAndStop(1);}
View 6 Replies
Aug 9, 2010
I have some trails data that I am adding to an interactive map. The trails were imported from Illustrator and are lines that have been converted to movieclips upon import. I'd like to add effects and some interactivity to the lines upon click and mouse_over. The difficult piece is that Flash treats movie clip like a box making it dificult to click on just the trail you'd like info for. For example, if there are two trails next to one another, clicking on the one you want can be difficult.
Is there a way that I can make it so that only the line part of the MC is the piece that responds to mouse action (rather than the whole box which encompasses its extent)?
View 2 Replies
Aug 25, 2009
I have two sprites A and B, both are irreuglar drawn shapes (both with a transparent fill) that overlap certain points. The current result is B on top (though which is on top is not really relevant, as the same problem will exist if A is on top). They are both children of the same UIComponent.
Both are listening for the MouseEvent.MOUSE_MOVE event. It is to occur when a corner on either shape is passed over by the mouse. Though, when the mouse moves over the corner of A and this corner is behind B the MouseEvent is never raised.From my investigation I've found when i turn the fill off on the sprites and just draw the outline of the shape the mouse event will raise, but this is not what is wanted. how can I get *both* the objects listening and responding even when the corners of one is overlapping the other?
View 3 Replies
Jun 7, 2009
I got this accordion from http:[url]....and I would like to have a MOUSE_OVER event on the buttons.The problem is that I don't know how to target the movieclips that are in the library of the accordion.fla file.
View 3 Replies
Dec 3, 2010
So I am making a basic Mouse_over/ mouse_out event, but if I pull the mouse off before the object reaches frame "box_big" then the mouse_out event will not activate. What is a way around this?
Code: Select allstop();
//box wip
MainBox.addEventListener(MouseEvent.MOUSE_OVER, Box_Expand);
MainBox.addEventListener(MouseEvent.MOUSE_OUT, Box_Contract);[code].......
View 2 Replies
Mar 6, 2009
It can be quite confusing title, but my question is simple. I have a mouse_over eventlistener associated with the eventcomplete from a tween. The problem is that if I have allready the mouse over the mc it will not react, only when it is out of bonds and enter.Is there a way to make it work when the mouse is over and not entering the mc?
View 5 Replies
Mar 16, 2009
I am trying to create a Japanese map where on mouse over prefectures (states) would zoom in by some 1.2.If I make every prefecture_mc as a separate layer, then they scale on under another which, my friends is not good looking behaviour . when I create all 47 prefectures within one layer, then prefecture_mc:scaleY=1.2; is ignored. It was simple in AS2 besides it was scaling from the center
View 3 Replies
Jan 20, 2010
I have several buttons inside of a movie clip, as well as functions for the MOUSE_OVER and MOUSE_OUT events. There is no gap between the buttons, however, if I move from one button to the next, first the MOUSE_OUT and immediately the MOUSE_OVER function is called again (even though all of this is inside of the movie clip). If I have the buttons inside another button, moving from one (sub-)button to the next is not problem, but then I can't have any animations/movie clips inside (or can I?). Is there any way to "fix" this, meaning that I can move from one button to the next without triggering the functions?
View 2 Replies
Jun 22, 2010
I have a basic rollover function for my button, which seems to work, but whenever the mouse is moved to the right (but remaining inside the movieclip) the MOUSE_OUT function starts happening, and then when the mouse is stopped moving, the MOUSE_OVER code re-activates. I have no other movieclips in front of it, but it is masked using actionscript. I don't understand why it's doing this, because the mouse never goes outside the area of the movieclip, so the MOUSE_OUT function shouldn't activate. The movieclip doesn't change side or shape at all, it just changes colour.
[Code]...
View 6 Replies
Sep 2, 2009
I have an MC(named "mouseTip") that gets added to the stage and follows my mouse on MOUSE_OVER. On MOUSE_OUT it gets removed. I just created a dynamic text field inside mouseTip so I can display type when mouseTip is present. For some reason, when that happens the mouse gets blocked by the textfield inside mouseTip and the MOUSE_OUT gets triggered.Once mouseTip is removed, the MOUSE_OVER gets triggered since the mouse is still over the button and my mouseTip MC just flickers rapidly.
View 5 Replies
Jul 19, 2010
I have a map of US counties that I've setup to display census info on mouse over. I am pulling this from a XML table that is populating a dynamic text field in an info box. I've also been working to cause a color change on mouse over. Right now I am doing that by changing the color on MOUSE_OVER and changing it again on MOUSE_OUT[code]...
View 1 Replies
Jun 15, 2011
I am attempting to have a text sentence slide out from behind and to the right of a company name. The company name is a movie clip and the sentence is a movieclip within a movieclip.On a mouse_over the sentence scrolls out from the right of the company name and then on a mouse_out the sentence scrolls back to the left behind the compnay name. This is working perfectly.Here's the trouble: after the sentence has scrolled back behind the company name and when the mouse is placed over the company name again, the sentence will not scroll out from behind the company name. The movieclip performs perfectly only one time and it won't repeat itself. I would like it to work everytime the mouse is placed over or removed from the company name. Perhaps you know why this is happening. Here is the code I am using on the main timeline. The inner movieclip has its own timeline for the sentence. It has a 60 frame tween on it with a stop() command on the first and sixtieth frame.
import flash.events.Event;import flash.events.MouseEvent;
rizzoCorp_mc.addEventListener(MouseEvent.MOUSE_OVER, moverRizzoF);function[code]......
View 3 Replies
Dec 8, 2009
first of all sorry for my english. I'll try to be precise. I have few movieclips, lets call their instance names mc1, mc2, mc3.they are not buttons, just movieclips. I also have dynamic text field with instance name "description".
and all I want is to have description text on that dynamic text field when I mouse_over them, like "this is mc1", or when mouse_over other: "this is mc2" etc.. I have this code, and it's not working.
ActionScript Code:
mc1.relatedText = "This is mc1";
mc1.addEventListener(MouseEvent.MOUSE_OVER, displayText);
[Code]...
View 9 Replies
Feb 11, 2011
how is it possible to still have MOUSE_OVER event dispatched while dragging an object?
I explain my self: I want the user to drag an object over an other, but while he's doing it I want to change the state of the objects he passes over.
View 2 Replies
Nov 11, 2011
What I created was just a test but I can't seem to get it working. What I did was create a very small rectangle at frame 1. Created a tween and then at frame 100 made it a very large rectangle.
Then in my code I wanted the user to MOUSE_OVER something and the rectangle to ease to the length it was at frame 30. However I keep getting this error message:
ArgumentError: Error #2109: Frame label frame 30 not found in scene Scene 1.
at flash.display::MovieClip/gotoAndStop()
at Untitled_fla::MainTimeline/test()
Here is my code:
[CODE]
stop();
circle_mc.addEventListener(MouseEvent.MOUSE_OVER, test, false, 0, true);
circle_mc.addEventListener(MouseEvent.MOUSE_OUT, test2, false, 0, true);
[Code].....
View 5 Replies
Jun 28, 2009
When I MOUSE_OUT before the MOUSE_OVER mc is still playing, it doesn't see the MOUSE_OUT. I tried adding a stop(); line to the beginning of the Button1Out function, but that didn't do squat.
Code: Select all//Button 1 Listeners and Functions
Btn1_hit.addEventListener(MouseEvent.MOUSE_OVER,Button1Over);
Btn1_hit.addEventListener(MouseEvent.MOUSE_OUT,Button1Out);
Btn1_hit.addEventListener(MouseEvent.MOUSE_DOWN, Button1Click);
[Code].....
View 1 Replies
Aug 2, 2010
I need to add in a mouse over event listener for an object, when I'm already over it. If my mouse leaves the object and comes back, then the listener works, but for some reason, when if I just move my mouse around over the object, it doesn't work. Hopefully that is enough to go on without posting code...
View 1 Replies
Aug 12, 2009
I have a square movieClip that expands into other movieClip options with a MOUSE_OVER. This works no problem. I drew an invisible rectangle underneath all of these options so that they would stay open when I moved the mouse towards them.
But when I try to code the first option to also work with MOUSE_OVERs and CLICKs it causes problems. At first when I tested the movie it looked fine until I tried to MOUSE_OVER the first new option - the new option produced no results. I think this was because the original invisible rectangle was on top of it.
So I changed the order of layers so the invisible rectangle was on bottom. Then as soon as I tried the new option, the entire original movieClip collapsed back to its original state. I assume that the area beneath the new option was being covered up, and thus my MOUSE_OVER (on the original movieClip) no longer registered.I then tried adding code to tell the original movieClip to also listen for a MOUSE_OVER on the new option. This worked - I could move the mouse over the new option and the original movieClip remained open, but the old problem of the new option not registerring occurred. I think my new code overrided what I wanted the new option to do.
I am confident that I could probably get this all to work if I simply opened the original movieClip with a CLICK instead of a MOUSE_OVER, but I'd rather keep using a MOUSE_OVER if there's a way to do it.
I realize that this is all a bit hard to follow, so to summarize - I want a single movieClip to animate, revealing new movieClips. I want to be able to animate these new movieClips (with MOUSE_OVERs and CLICKs), all while the original movieClip remains "open" in its MOUSE_OVER state/frame.
View 8 Replies
Feb 26, 2009
I want to repeat the function when you MOUSE_OVER it..
Code:
p_rechts.addEventListener(MouseEvent.MOUSE_OVER, rechts);
function rechts(e:MouseEvent) {
stoel.collada.rotationY -= 5;
}
now the "stoel" rotates 1 time -5, but i want it to repeat itself, till your mouse is of the button..
View 1 Replies
Jun 4, 2009
I have a item1 that needs to have a MOUSE_OVER effect when item2 is dragged over it. How can I do that?
PHP Code:
item1.addEventListener(MouseEvent.MOUSE_OVER, backover);function backover (e:MouseEvent):void this.item1 .gotoAndStop(2);}
[code].....
View 1 Replies
Jul 6, 2009
I have a series of flash buttons and the client wants an image associated with each one of the buttons to fade in on the main section of the page upon rollover of the button and then fade out on rollout of the button.He then wants a new image to fade in when you rollover a different button and fade out on rollover, for all the buttons.
View 2 Replies