OnRollOver, onRollOut
I have some movie clips I am using as buttons. They all have
the same animation:
They consist of one layer which blurs a text through 16
frames (white text), and then blurs the same text in a different
color(pink text) from frame 17-32. The layer below fades in
duplicate text of opposite color(pink under white, white under
pink), from frame 1-16, and frame 17-32. There is a stop at
keyframe 1 and keyframe 16.
Here is the actionscript:
_root.home_btn.onRollOver = function() {
_root.home.gotoAndPlay(2);
_root.home_btn.onRollOut = function() {
_root.home.gotoAndPlay(17);
_root.models.onRollOver = function() {
_root.models.gotoAndPlay(2);
_root.models.onRollOut = function() {
_root.models.gotoAndPlay(17);
_root.apply.onRollOver = function() {
_root.apply.gotoAndPlay(2);
_root.apply.onRollOut = function() {
_root.apply.gotoAndPlay(17);
_root.special.onRollOver = function() {
_root.special.gotoAndPlay(2);
_root.special.onRollOut = function() {
_root.special.gotoAndPlay(17);
_root.contact.onRollOver = function() {
_root.contact.gotoAndPlay(2);
_root.contact.onRollOut = function() {
_root.contact.gotoAndPlay(17);
If I roll over, the text blurs from white to reveal pink
underneath, if I roll out the text blurs from pink to reveal white.
The problem is if I roll over or out too quick, the text stays
pink, never plays the roll out animation and doesn't fade back to
white.
Whats the problem?
Here is a link to test it.
http://www.south-beachmodels.com/links.swf
http://www.south-beachmodels.com/links.fla
Similar Messages
-
OnRollOver = onRollOut equivalent
I'm looking to condense some code on a photo gallery I'm
working on where I disable the next or previous buttons if there
isn't a next or previous image to present. I wanted to break away
from the standard multiple line approach...
nextBTN_mc.onRollOver = function() {
this.gotoAndStop(1);
nextBTN_mc.onRollOut = function() {
this.gotoAndStop(1);
nextBTN_mc.onRelease = function() {
this.gotoAndStop(1);
or
nextBTN_mc.onRollOver = function() {
this.gotoAndStop(1);
nextBTN_mc.onRollOut = nextBTN_mc.onRollOver;
nextBTN_mc.onRelease = nextBTN_mc.onRollOver;
Once upon a time (and I'm not sure where), I saw someone post
a one line solution to this. Something like (but not):
nextBTN_mc.onRollOver([{'onRollOut', 'onRelease'}]) =
function() {
this.gotoAndStop(1);
The syntax on the above is of course wrong but the solution I
saw once was similar to this. The "([{'onRollOut', 'onRelease'}])"
(or similar) may have been after the function parameters and there
is probably an operator that I'm forgetting/missing. I've played
around with it and searched the net but can't seem to get it to
work or find it.
Anyways, if anyone out there knows the solution, I'd really
appreciate a response. It was a very clever, clean and condensed
solution and I'd love to find it again.
Take care,
sejsej,
> Hey blemmo,
>
> Thanks for the response. That's pretty cool solution.
> I never thought of that one.
blemmo's reply is a good one, and I often use that approach
when dealing
with two or three assignments at a time. When it gets up to
five or more --
purely arbitrary numbers -- I also like to use a for() loop
and the array
access operator.
http://www.quip.net/blog/2006/flash/actionscript-20/reference-objects-dynamically
var buttons:Array = new Array("btnA", "btnB", "btnC");
for (var n:Number = 0; n < buttons.length; n++) {
this[buttons[n]].onRelease = function() {
// instructions here
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Creating onrollover / onrollout button that plays its full ONanimation when touched
Hey all,
On most of my option MC's I have something like:
this.onRollOver = function(){
this.gotoAndPlay("onanim")
this.onRollOut = function(){
this.gotoAndPlay("offanim")
Obviousy if you quickly roll on and then off the MC the
animation is staggergy and not a fluid animation.
I would like to set it so that everytime you touch/roll on
the option MC it will always play its full on animation right, then
it will go to the off animation.
I believe you can incorporate onenterframe object to achive
this. Could someone please show me a good solution.
Any help would be great.the best solution is to stop the rollover animation as soon
as the button is rolled out and start the rollout behavior (from
the correct place on your timeline) as soon as the rollout is
triggered.
depending on your rollover and rollout animations that may
require a little math or more commonly when the rollout animation
is just the rollover animation playing in reverse would involve
playing the rollover behavior backwords.
it's this latter situation that is commonly used to trigger
an onEnterFrame handler that calls a prevFrame() method and
terminates when frame 1 is reached. -
OnRollOver & onRollOut Troubles
I have created a slide show of icons that move across the
canvas. In the attached file there is only one. It loads and moves
to the right side of the canvas. When you roll over it expands,
when you roll out it contracts back to normal size. That is the
desired effect.The problem is that when you move it left or right
with the arrows the roll on and out effects no longer work. Been
trying to get this to work for a while now so any help would be
greatly appreciated.
Thanks
Download
FlaWithout knowing more, it sounds like maybe the icons are
sliding across the screen initially from a basic timeline
animation. You can't combine code that dynamically changes a
movieclips properties that also get changed from the timeline. For
example, you can't have a movieclip animate along the _x from the
timeline AND control the _x of that movieclip using code. It's got
to be one or the other. -
Hello,
I have a loop that assigns functions to the buttons. When the
mouse hits the very outside of the button, the states 'quiver'.
It looks very buggy as the mouse is at this point right in
between the rollOut and rollOver state.
I would appreciate any help you can give me.
thank you,
EmmaAssign your button a hit state, either in the "hit" frame of
the button. If you're using a movie clip for a button, create a
movie clip with a solid graphic of the hit shape you want on the
bottom-most layer, make it 0% alpha, and have it span all frames of
your mc button. that way your "hit shape" will be the same for all
button states, even though it's invisible. -
I am having trouble with actionscript. I am making a photo
gallery and my buttons and layout are just dandy everything's
looking fine. The buttons do nothing, and i know i need
actionscript to make it work but i have no idea how to even begin.
I have what i want the buttons to show made in a movie clip I just
need to know how to how to have the clip come up and be centered
when clicked. Please help me.depends on whether you are using AS3 or AS2.
either way, however, you're looking to work with "event
handlers"
onRelease()
onPress()
onRollOver()
onRollOut()
etc...
so in AS2, if you have a button named "test_b" on your main
timeline, you would assign an action like this...
test_b.onRelease = function() {
trace("this is a test to see if this button works.");
AS3's event handlers are a little different. -
Asfunction, cursor states, and moviclips...oh my
Hello all. I've ran into a bit of a snag and I'm thinking the
obvious is sitting right in front of me...
I have a dynamic movieclip that is created to serve as a
container for a dynamically created textfield. The textfield has
html text. Within that html text is an asfunction to call a method.
Code is posted below:
MovieClip(this.createEmptyMovieClip("textOneContainer_mc",
this.getNextHighestDepth());
TextField(textOneContainer_mc.createTextField("textOneField",
textOneContainer_mc.getNextHighestDepth(), 10, 10, 300, 30));
// Method triggered from asfunction call from html text
textOneContainer_mc.launchGlossary = function(arg){
trace("Launch Glossary Method Hit, Glossary Word: "+arg);
textOneContainer_mc. textOneField.html = true;
textOneContainer_mc. textOneField.htmlText = htmlString_str;
Now the issues are:
1. if applied, textOneContainer_mc onRollOver, onRollOut,
onRelease, and etc seem to not allow the asfunction to be called
2. i'm using custom cursors, which work fine...however, the
system hand cursor appears over the word I have linked via
asfunction. I've tried using the useHandCursor = false MovieClip
property, but it still appears.
I hope this makes sense, i'm a little dumbfounded on this
one. The last thing I want to do is to do a split on the html text
and put each word in it's own MovieClip just to achieve what the
asfunction already does.// Store Text and Audio Data From XML
var pagetext_xmlnodeOne:XMLNode =
matchSiblingNode(_parent.currentPage_xmlnode.firstChild,"instructionalTextOne");
var pagetext_xmlnodeTwo:XMLNode =
matchSiblingNode(_parent.currentPage_xmlnode.firstChild,"instructionalTextTwo");
var swf_xmlnode:XMLNode =
matchSiblingNode(_parent.currentPage_xmlnode.firstChild,"externalSwfFile");
var swfLocation:String = swf_xmlnode.attributes.swfFilePath;
var textOneAudio:String =
pagetext_xmlnodeOne.attributes.audioPath;
var textTwoAudio:String =
pagetext_xmlnodeTwo.attributes.audioPath;
var titleText:String =
_parent.currentPage_xmlnode.attributes.title;
var textOne_str:String =
pagetext_xmlnodeOne.firstChild.nodeValue;
var textTwo_str:String =
pagetext_xmlnodeTwo.firstChild.nodeValue;
trace("///// Title Text: "+titleText+"
//Loads SWF File
function loadSWF(externalSwfLocation:String){
var swfFile:Boolean = false;
//Object to Load SWF File
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
if (externalSwfLocation != undefined){
if (externalSwfLocation.indexOf(".swf") > 0){
swfFile = true;
trace(".SWF Path: "+externalSwfLocation+" Target Clip:
"+mediaSWF_mc);
mcLoader.loadClip(externalSwfLocation,mediaSWF_mc);
image_mc = mediaSWF_mc;
} else {
//In the Event There is No SWF File, loadText Method Called
trace("No SWF File to Load, loadText Method Being Called");
loadText(textOne_str,textTwo_str,textOneAudio,textTwoAudio);
mcLoader.addListener(mclListener);
mclListener.onLoadComplete = function(){
trace(".swf Loaded Successfully");
trace("loadText Method Being Called");
loadText(textOne_str,textTwo_str,textOneAudio,textTwoAudio);
mclListener.onLoadInit = function(target_mc:MovieClip){
//Adjust SWF
var pictH:Number = target_mc._height;
var pictW:Number = target_mc._width;
var pictX:Number = target_mc._x;
var pictY:Number = target_mc._y;
if (swfFile){
pictH = Number(swf_xmlnode.attributes.swfHeight);
pictW = Number(swf_xmlnode.attributes.swfWidth);
if(swf_xmlnode.attributes.swfX!=undefined){
pictX = Number(swf_xmlnode.attributes.swfX);
} else { pictX = 0 };
if(swf_xmlnode.attributes.swfY!=undefined){
pictY = Number(swf_xmlnode.attributes.swfY);
} else { pictY = 0 };
//Adjust to New SWF Size and _x/_y Cooordinates
mediaSWF_mc._width = pictW;
mediaSWF_mc._height = pictH
mediaSWF_mc._x = pictX;
mediaSWF_mc._y = pictY;
mediaSWF_mc._alpha = 0;
// loadText Method
// Creates Movieclips to Store Textfield Data
function loadText(textOne_str:String, textTwo_str:String,
textOneAudio:String,textTwoAudio:String){
if(pagetext_xmlnodeOne.attributes._y!=undefined){
var txtOneY_num:Number = pagetext_xmlnodeOne.attributes._y;
} else {
var txtOneY_num:Number = 0;
var txtOneBlock:String =
pagetext_xmlnodeOne.attributes.textBlock;
if(textOne_str!=undefined){
var vlaInstrOneTxt_mc =
MovieClip(this.createEmptyMovieClip("vlaInstrOneTxt_mc",
this.getNextHighestDepth()));
var vlaInstrOne_txt =
TextField(vlaInstrOneTxt_mc.createTextField("vlaInstrOne_txt",
vlaInstrOneTxt_mc.getNextHighestDepth(), 8, txtOneY_num, 0, 0));
var vlaInstrOneFld = vlaInstrOneTxt_mc.vlaInstrOne_txt;
vlaInstrOneFld.autoSize = "left";
vlaInstrOneFld.embedFonts = true;
vlaInstrOneFld.selectable = false;
vlaInstrOneFld.multiline = true;
vlaInstrOneFld.border = false;
vlaInstrOneFld.html = true;
vlaInstrOneFld.htmlText = textOne_str;
vlaInstrOneTxt_mc.enabled = false;
vlaInstrOneTxt_mc._alpha = 0;
vlaInstrOneTxt_mc.launchGlossary = function(arg){
trace ("You clicked me!Argument was "+arg);
if(pagetext_xmlnodeTwo.attributes._y!=undefined){
var txtTwoY_num:Number = pagetext_xmlnodeTwo.attributes._y;
} else {
var txtTwoY_num:Number = 0;
var txtOneBlock:String =
pagetext_xmlnodeOne.attributes.textBlock;
if(textTwo_str!=undefined){
var vlaInstrTwoTxt_mc =
MovieClip(this.createEmptyMovieClip("vlaInstrTwoTxt_mc",
this.getNextHighestDepth()));
var vlaInstrTwo_txt =
TextField(vlaInstrTwoTxt_mc.createTextField("vlaInstrTwo_txt",
vlaInstrTwoTxt_mc.getNextHighestDepth(), 8, txtTwoY_num, 0, 0));
var vlaInstrTwoFld = vlaInstrTwoTxt_mc.vlaInstrTwo_txt;
vlaInstrTwoFld.autoSize = "left";
vlaInstrTwoFld.embedFonts = true;
vlaInstrTwoFld.selectable = false;
vlaInstrTwoFld.multiline = true;
vlaInstrTwoFld.border = false;
vlaInstrTwoFld.html = true;
vlaInstrTwoFld.htmlText = textTwo_str;
vlaInstrTwoTxt_mc.enabled = false;
vlaInstrTwoTxt_mc._alpha = 0;
var vlaInstrText_fmt:TextFormat = new TextFormat();
vlaInstrText_fmt.font = "VAGRoundedRegular";
vlaInstrOneFld.setTextFormat(vlaInstrText_fmt);
vlaInstrTwoFld.setTextFormat(vlaInstrText_fmt);
// Make Sure Text Stays Within Bounds
if(pagetext_xmlnodeOne.attributes.textBlock == "Left"){
if(vlaInstrOneFld._width > 375){
vlaInstrOneFld.wordWrap = true;
vlaInstrOneFld._width = 375;
} else {
if(vlaInstrOneFld._width > 670){
vlaInstrOneFld.wordWrap = true;
vlaInstrOneFld._width = 670;
if(pagetext_xmlnodeTwo.attributes.textBlock == "Left"){
if(vlaInstrTwoFld._width > 375){
vlaInstrTwoFld.wordWrap = true;
vlaInstrTwoFld._width = 375;
} else {
if(vlaInstrTwoFld._width > 670){
vlaInstrTwoFld.wordWrap = true;
vlaInstrTwoFld._width = 670;
// Call Transitions Clip for TextFields
trace("All Textfield Clips Loaded, Transitions and Audio
Will Now Take Place");
transitionInFirstTxtClip();
// Apply Transitions Clip to First TextField
function transitionInFirstTxtClip(){
if(textOne_str!=undefined){
fadeIn(vlaInstrOneTxt_mc, 7, this, "readFirstAudioClip");
} else {
trace("No Instructional Text 1 Found, calling
readFirstAudioClip");
readFirstAudioClip();
// Play Audio Related to First TextField
function readFirstAudioClip(){
if(textOneAudio!=undefined){
playSFX(textOneAudio, this, "nextClipTransition");
vlaInstrOneTxt_mc.enabled = true;
} else {
trace("No Instructional Text 1 Audio File Found, calling
nextClipTransition");
nextClipTransition();
// Apply Transtions Clip to Second TextField
function nextClipTransition(){
if(textTwo_str!=undefined){
fadeIn(vlaInstrTwoTxt_mc, 7, this, "readSecondAudioClip");
} else {
trace("No Instructional Text 2 Found, calling
readSecondAudioClip");
readSecondAudioClip();
/// Play Audio Related to Second TextField
function readSecondAudioClip(){
if(textTwoAudio!=undefined){
playSFX(textTwoAudio, this, "displaySwfFile");
vlaInstrTwoTxt_mc.enabled = true;
} else {
trace("No Instructional Text 2 Audio File Found, calling
displaySwfFile");
displaySwfFile();
// Display SWF File
function displaySwfFile(){
if(swfLocation!=undefined){
fadeIn(mediaSWF_mc, 1, this, "applyCursorStates");
} else {
trace("No SWF File Found, calling applyCursorStates");
//applyCursorStates();
function applyCursorStates(){
// Apply MovieClip Methods to TextField
vlaInstrOneTxt_mc.onRollOver = vlaInstrTwoTxt_mc.onRollOver
=function(){
cursorRollOverAudio();
vlaInstrOneTxt_mc.onRollOut = vlaInstrTwoTxt_mc.onRollOut
=function(){
cursorRollOutAudio();
vlaInstrOneTxt_mc.onRelease = function(){
cursorRollOverAudio();
playSFX(textOneAudio);
vlaInstrTwoTxt_mc.onRelease = function(){
cursorRollOverAudio();
playSFX(textTwoAudio);
var __soundFX:Sound = new Sound();
var audioFlag:Boolean = false;
function playSFX(audioClip:String, targ:MovieClip,
onComplete:String):Void {
__soundFX.onLoad = function(success:Boolean){
if(success){
if(!audioFlag){
audioFlag = true;
__soundFX.start();
trace("Audio Clip: "+audioClip+" is Now Playing");
} else {
__soundFX.stop();
audioFlag = false;
trace("Audio Clip Stopped");
var args = arguments.slice(3, arguments.length);
__soundFX.onSoundComplete = function() {
audioFlag = false;
trace("Audio Clip Completed");
if(onComplete!=undefined){
trace("Audio "+audioClip+" Completed, Calling onComplete
Method: "+onComplete);
targ[onComplete](args);
} else {
trace("Audio Completed, no onComplete Method to Call");
__soundFX.loadSound(audioClip,false);
// Stop Audio Method
function stopSFX():Void {
trace("__PLAYER: AUDIO CLIP STOPPED");
__soundFX.stop();
loadSWF(swfLocation); -
I have a main clip with a gallery-style movie clip in it that has recently been required to be updated with new content (basically means adding new galleries). On the main timeline there is a whole whack of code controlling the functionality of the original gallery. I figured that I'd use attachMovie for the new galleries and use the same instance names to save re-writing all the code. The new galleries reside in their own folders in the library and have their linkage set as Project1 throught Project7. attachMovie is working but now none of the nested clips within the attached clip work that contain onRollover/onRollOut/onPress events. I've traced their relevent instance names and they are there within the attached clip.
Here's the idea:
ProjectsMenu.Project1.onPress = function(){
removeMovieClip(PicsAll);
//PicsAll is the original gallery on stage at depth -16383
attachMovie("Project1", "PicsAll", -16383, {_x:474, _y:172});
Also, I realise removeMovieClip(PicsAll) is probably redundant since I'm attaching the new clip at the same depth as original.Hi Kglad,
No mouse handlers assigned directly to PicsAll however I am assigning mouse handlers to nested clips. For example:
PicsAll.PicsClip.MiniButsClip.Mini1Clip.onRollOver = function () {
All of these are now dead in the water and yet are tracable. -
below i've attached my partial code. i didn't include my
entire code because it's 334 lines long. if i need to do that to
get this solved though, i will... just let me know.
in the for loop below, i assign 3 functions to a newly
attached movie clip. one function for each of the three major
button states (onRollOver, onRollOut, onRelease). i delete and
reassign these functions by clicking a different movie clip
(openGrid3 and closeGrid3). if i don't pass over the "item" movie
clip, and then open grid3 (openGrid3), all works as expected.
however, if i pass my mouse over the "item" movie clip, then open
grid 3, none of the states get deleted. what am i doing wrong?i wanted to mark this as resolved, to preserve the integrity
of these forums that i use and appreciate so much. i discovered my
problem and the solution is below. looking back on this post now, i
bet this made no sense to anyone, as i had diagnosed the symptoms
incorrectly and this one really is hard to help without seeing the
flash movie playing. here's the solution that fixed it for me
though...
first the problem did not occur because the user passed over
the item. when openGrid3 ran, the item button states were deleted,
but you'll also see that the action that ran the openGrid3 function
was deleted. it was then changed to closeGrid3, however closeGrid3
did not delete itself and reassign openGrid3, so on the second pass
around, none of the items had their button states deleted. i added
these lines to the closeGrid3 and closeGrid4 functions....
delete grid*.panelButton.onRelease;
grid*.panelButton.onRelease = openGrid3; //* = which grid, 3
or 4 -
Components disrupting MovieClip events.
I am writing a program (in Flash 8 with AS 2.0) to run
through chess games loaded from PGN files.
I need buttons that do the following: Go to Next Move, Go to
Previous Move.
I have created a couple of MovieClip buttons with
onRollOver/onRollOut and onPress event functions
(The RollOver and RollOut events are used just to
apply/remove filters to highlight/dehighlight the buttons)
Simple. Works fine.
BUT I then add a ComboBox component to the stage.....
The buttons work fine UNTIL I CLICK ON THE COMBOBOX.
After that, if I roll over a button I get a 'RollOver' event
(o.k.)
I press the button and I get a 'Press' event (o.k.)
immediately followed by a 'RollOut' event (NOT o.k.!)
Now, without moving the cursor off the button, every
subsequent press causes a 'RollOver' immediately followed by a
'RollOut' event (but NO 'Press' event).
I do not get another 'Press' event until the cursor has moved
off the button and then over it again, when I get a repeat of the
above (i.e. Press+RollOut after first press then RollOver+RollOut
after subsequent presses.
I can reproduce the problem as follows:
1. Create a new Flash Document
2. Draw a shape on the stage and convert it to a MovieClip
named 'btn1'.
3. Place a ComboBox named 'cbox1' on the stage.
4. Add the following script to frame 1...
btn1.onRollOver = function() { trace( "RollOver" ); }
btn1.onRollOut = function() { trace( "RollOut" ); }
btn1.onPress = function() { trace( "Pressed" ); }
That's all! (The ComboBox does nothing and has no event
listener assigned to it.)
The button works fine UNTIL THE COMBOBOX IS CLICKED.
After that you get the situation described above!
I'd really appreciate if anyone can
(a) tell me if they can reproduce the problem or, better
still,
(b) let me know what's going on and how I can solve this.
Cheers.
(p.s. it's not just the ComboBox component. I've had the same
problem with e.g. an Input TextField)Thanks for trying.
This one's driving me mad.
The only work-around I've come up with is to place the
ComboBox in a separate MovieClip, attach it only when it is needed,
and then remove the MovieClip, which is a real pain. -
Keep a button set to Hover once clicked
Hi,
I was wondering if there was a quick way to set a button to
it's hover state once clicked?
I know how to do this by having it be a movie clip and
changing its time line position onRollOver. onRollOut and
onRelease. I am just trying to do this quick using a button so
didn't want to deal with all that. Thanks!it takes a bit of Actionscript - but yes, its possible. --and
instead of using a button, use a movieClip - and assign the actions
on the main timeline.
I'll use _xscale in my example, but you can do the same
thing, and just put your "rollOver effect" on frame 2, and use
gotoAndStop();.
mc.onRollOver = function() {
mc._xscale = 110;
mc._yscale = 110;
mc.onRollOut = function() {
if (testV == true) {
mc._xscale = 100;
mc._yscale = 100;
mc.onRelease = function() {
if (testV == false || testV == undefined) {
testV = true;
} else if (testV == true) {
testV = false;
} -
AS2-CS4 unnullify "Null"?
I'm creating a card game tutorial (well, a small part of what will be a tutorial) and ran into a wall.
A movieclip has an onRollOver, onRollOut, onPress and onRelease state, each doing different things (go figure). In the onRelease state, I nullified all 3 other states so that the movieclip becomes frozen, i.e. movieclip.onRollOver=null; etc.
How do I disarm the null when a reset button (resetBtn) is pressed?
Attached is an example of my problem.Generally I wouldn't null all the event handlers, instead I would just disable the clip.
myClip.enabled=false;
That will prevent the events from being dispatched.
Then it is easy to have a function that goes through all your clips (you'll have to keep track of them some how) and set the enabled property to true.
Or you could do the same type of thing with reassigning the event handlers.
I'm guessing that you've originally set them up something like this:
myClip.onRollOver=function(){
//some code
That isn't the best practice. You should do it like this:
myClip.onRollOver=handleOverClip;
function handleOverClip(){
//some code
Then you can easily reapply it by just reassigning the function. -
Hi,
I'm having a slight problem with a dynamically generated
button in flash. The problem is that the movie clips that contains
the button is nested within several other movie clips. I am
assuming this is why when i run the flash document, the movie clip
plays and all the buttons are generated as usual, but none of them
seem to be active (cant click them or get the rollover code to
run). Is this a scope issue? Do i need a line of code that
activates the buttons through the nested movie clips?
Thanks for any help in advance
DamienYea i tried running some trace statements but the onRollover,
onRollout and all other mouse triggered events are not fired. I
decided to create a brand new movie clip outside of the main
template, finish building that component and then insert it in the
main template and work out scope issues later. Hopefully it will
come together alright.
Thanks again for ya help Ned
Will no doubt be in touche soon with another problem haha
Damien -
Remote Rollover help using AS2
I'm a new to Flash and not a developer. Use Flash for
financial education seminar project as a financial advisor. Created
a Flash project using Adobe Livemotion 2. I recently upgraded to
Flash CS4 and trying to recreate same project with Flash. Have 4
title buttons for the seminar topics that when I rollover with
mouse brings up description of the slideshow. Trying to get Topic
descriptions fade in with alpha (transparancy) 0 to 100 upon
rollover. When you move mouse away alpha 100 to 0 should fade out.
Clicking button will start slideshow which I know how to do. This
is simple in Livemotion with states. Not sure how to do this using
Actionscript 2 in Flash CS4. In Livemotion have this script for
fade in on over state.
_parent.Longterm_Group.lmSetCurrentState("Longterm _Fadein");
Fade out is
_parent.Redefining_Group.lmSetCurrentState("Redefining_Fadeout");
As there is an over state for a button in Flash, can you
assign AS 2 script to the over state for a button to affect another
movie clip properties?
Thanks for any help you can offer!
Charlesyes we can... lol! yeah you could use an onRollOver/onRollOut
handlers, and a Tweens to create the fadeIn/Out effect and target a
different MC. you would do this using something like the following: -
Click and something appears on the screen
what i am trying to do is this, have people click on a link
on my website, then have something appear when they click on it. to
give you an example, if you go to
atticus clothing's
website and look under where it says updated news, or something
like that, in the top left corner. you click on a date, and the
info for that date appears right next to where you clicked. i don't
even know how to go about doing that.
any help is greatly appreciated.dont know if this wud help..but try it.....
make the movie that wud appear when u press the button....and
position it where u want it to appear when the button is
pressed....
then add this code in the actions frame.....
nameofmovieclip_mc._visible = false;
nameofbutton_btn.onPressed = function() {
nameofmovieclip_mc._visible = true;
this code will do what u want but once the button is
pressed...pressed as in hold.....adding this action...wud make the
movie clip disappear...
nameofbutton_btn.onRelease = function() {
nameofmovieclip_mc._visible = false;
or you can just make variation out of this....by plying with
the button functions.....onRollOver, onRollOut..and so
on....
Maybe you are looking for
-
How do i stop a download when it is too slow?
How do I stop a download when it is too slow?
-
Any tool to recover my Lumia 620 from QHSUSB_DLOAD...
It seems that Lumia Software Recovery Tool and Windows Phone Recovery Tool does not support recovery from QHSUSB_DLOAD download mode. Is there any way to recover my phone from this mode? I'm almost buying third-party recovery hardware like ATF Box to
-
Updated iphone 5 and it want to restore and back up the phone i have done this 3 times, some advice please
-
I am using MDBs and Stateless Session Beans, transaction timeout for the beans is 120 sec. I face this problem of all messages not being processed (some value in Messages Pending) but not always. I don't see any exceptions in my server log either. It
-
WIN a Samsung Tab – Community Prize Draw
Hi Everyone Well we’ve got sporting fever here… spurred on by the exciting Record Breakers competition being run across wider BT we wanted to join in with some of the action… We’re really excited about the upcoming London 2012 Olympic Games so decide