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




Navigation Button Events - Animate Out Existing Contents



Okay, I've searched and I just cannot seem to enter the right text in google or even this site to try to describe what i want to do. I think this is going to be really simple and I'm just not thinking clearly.

Okay, I want to create a navigation bar for my flash website, which I have done successfully. I can click a button and I can get the contents of that button to appear where I want it. So the fundamentals of the navigation bar is good....

What I want to do is to have whatever content is on the screen to fade away (or other animation) before the content for the button I select appears.

Say I have HOME, ABOUT, CONTACT, PORTFOLIO as buttons. I click on CONTACT and the contact content appears. If I click HOME, I want the contact contents to animate away then have the home contents animate in. If I'm on home and click PORTFOLIO I want the home contents to animate away then have the portfolio contents animate in.

So my question is how do you code this? I'm stuck because you never know what screen you are looking at and what button you are going to click next. Does this make sense?

Jason?



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 06-22-2007, 08:14 PM


View Complete Forum Thread with Replies

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

How To Animate A Navigation Button
Having trouble posting.. hope this isn't a double post..

Hey!

I am not exactly a newbie, more like a rusty since I have not used Flash in a while.. Have not used this list for ages...either.

Anyway, my client wants me to create a button that will do some "shaking".

I have a button that is actually a steering wheel image with a transparent background(made it in Photoshop).

This steering wheel button is for navigation purposes. What the client wants, is to "animate the steering wheels. when mouseover , they should jiggle, a 1/4 turn to the left, back to center, and then 1/4 turn to the right. this should happen fairly quickly."

I am not sure how to do this. I know how to create a regular button. but not sure how to do the animated one.

Thanks so much in advance!

Daph

Resize Existing FLA And All Contents
Does anyone know if it is possible to resize the stage in Flash MX 2004 and in doing so scale up all existing graphics, tweens, etc? I started a project thinking that 550x400 would be a good resolution and am now regretting it because when users stretch the Flash player some images get pixelated.

I've tried resizing the stage, but everything on the stage stays where it is and I just end up with more whitespace.

Any help would be appreciated.

What's The Best Way Animate Existing Logo In Flash?
what is the best way animate existing logo in Flash? Logo source is in .CDR format.

How To Place Dynamically Created Movie Clip Behind Existing Contents
Hi,
I'm using action script to create several movie clips and place them on the stage. But there are some already hand made content (such as textfields, images etc).

What I want is to place my movie clip behind that content, so for example textfield would appear above created movie clip.

The problem is that hand made textfields, images and graphic objects don't have swapDepth function...

Is there a way to do this? Or the only (and pretty ugly) way is to create all textfields and images from library objects using actionscipt?

Animate W/ Script / Navigation
hello i have some problems w/ script. On frame one i have a button that on press goes to frame 2. in frame 2 i have this script on an mc:
onClipEvent (enterFrame) {
this._y -= 5;
if (this._y<=20) {
this._y = 20;
}
}

and then a button that says on rollout got to frame 3 and there is a mc w/ this script

onClipEvent (enterFrame) {
this._y += 5;
if (this._y>=122) {
this._y = 123;
}
}

the first part the mc animates and stops fine, the scond script dosent animate as smooth, anyone offer help? am i setting this up the wrong way?

Dynamically Created Navigation, Trying To Animate It
Hey!

I'm trying to get together an XML driven navigation bar for a website I'm working on, and I've been messing about with the code from WebMonkey.

What I ultimatley want to do is have a main menu, where you click on an item, a new page loads in an iframe on the page and the submenu slides into view with the original button sliding to the top. Colours of each button obtained from the XML file.

Anyway, at this stage I'm just using the onRelease event handlers to move the symbols using the [element]._y property, rather than smooth motion (which I'll add later). I thought it would make it too complicated to debug in the initial stages.

It works, in a kinda bodged up way. I used a variable to store the value of i in the submenu it's creating, then used that with the setProperty function to get the value of _y to whatever it was originally (which is stored in m as a variable). That works. But what I would like to do is to have the submenu fade into view, and the button slide to the top of the frame. I was using the enterFrame behaviour to loop the code to move it, using ygoal to be the location it was moving to.

I need to know how to set ygoal from the UP button on the submenu (if that makes sense?)

Anyway, hope some of you can give me a hand, I've only been doing flash a few days and already my brain hurts!

Register Classes - Mc Events Vs Button Events
I'm experimenting with register classes today, and wasn't careful typing the code with only button events for my custom movie clip class.
First I wrote

Code:
CustomClass.prototype.onMouseDown = function(){
this.gotoAndStop("blue");
}// end onMouseDown
Then all the mc-buttons in my movie went to the blue state. (.fla provided)
When I realised the error, I corrected it, and now it works.
I just don't understand what happened.
Do Movie Clip events turn out to be class methods (don't know what to call it in Java script, only used to Java), while button events stay instance events??
Hope somebody have the time - it's not about life and death, but it would be really nice to know how these things work.

Button Down = Animate In Content - Press Another Button Animate Content Out?
Here's what I am looking for. I want to have my buttons animate my content in and out of my movie stage. I know I can do it using the timeline, but I am looking for a more efficient way of doing it.

If anyone has any advice or any fla's, I would appreciate it.

Thanks
kmaier

Loaded Navigation Menu Via MovieClipLoader And MouseOve Events Issue...
Hello,

I have been at it for the past two days and cannot seem to get this going, I would highly appreciate your help with this. I have movie called "menus.swf" within it, I have four nav buttons: LINK 1, LINK 2, LINK 3, LINK4.

I load this movie via MovieClipLoader on to the stage and initialize it via onLoadInit. Once it is loaded, I am able to click the links and all works well. I want to be able to use dynamic mask and show only the top part of the loaded movie so when user rolls the mouse over it, it pops up with ease and use can then click the desired link, and as soon as the mouse is not over it, movie eases back into its original position. I have tried tons of strategies such:

hitTest(), time driven event.....and so on.

I am able to load the movie without any issue but once I place an ease tween on it, Tween works but an not able to click on any nav links. I have spent hours and hours but cannot seem to get this functionality going. I would highly appreciate all your help. I am also including my files as well.

Thanks a lot


Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;


_global.gRoot = this; // GLOBAL gROOT DECLARED


//MENU SHELL IS CREATED
var MenuShell:MovieClip = gRoot.createEmptyMovieClip("mShell", 1);
//MENU BACKGROUD CREATED
var MenuBg:MovieClip = MenuShell.createEmptyMovieClip("mBg", 2);
//MENU LOADER CREATED
var MenuLoader:MovieClip = MenuShell.createEmptyMovieClip("mLoader", 3);

//MENU SHELL POSITION INITIALIZED
MenuShell._x = 150;
MenuShell._y = 150;

//MOVIECLIPLOADER OBJECT CREATED
var myLoader:MovieClipLoader = new MovieClipLoader();

//MYOBJ IS DECLARED WITH FOR IN LOOP TO READ ME LOADED MENU LINKS
var myObj:Object = new Object();

//ONLOADINIT FUNCTION
myObj.onLoadInit = function(target:MovieClip)
{
for(var a in target)
{
for(var b in target[a])
{
target[a][b].onRelease = function()
{
if(target[a][b])
{
switch(this)
{
case mShell.mLoader.menus.link1:
trace("link 1");
break;

case mShell.mLoader.menus.link2:
trace("link 2");
break;

case mShell.mLoader.menus.link3:
trace("link 3");
break;

case mShell.mLoader.menus.link4:
trace("link 4");
break;
}
}
}
}
}
}

//LOADING THE MENUS.SWF IN MENULOADER MOVIE ON RUNTIME
myLoader.loadClip("movies/menus.swf", MenuLoader);

myLoader.addListener(myObj);


[/cod

Contents Of Button?
Hello,

i have a Flash Button in my library (not a Button Component) which has a dynamic textfield in it, its instance name is label_txt

i add this button dynamically using attachmovie which works fine, now i want to change the text of the label_txt textfield

if the Button would be an MovieClip i could do this using:
myButton.label_txt.text="my Text";

but actually this doesnt work for Buttons, so how do i access the contents of Buttons??

New Button Created From Existing Button
Hi,

I bought a nice flash menu with six buttons. Actually, they're movie clips but I think they're all using the same button somehow. All these Movie Clips/buttons do the exact same thing (see www.winsor.net). What I'm trying to do is to create a seventh button by copy/pasting or duplicating one of the original six. I name the new movie clip something else, and go in to edit one of the layers to change the text in that new movie clip, and the text from the movie clip I copied also changes! Dang! How do I separate these two movie clips so they aren't tied together? I hope that makes sense, but it probably doesn't. Thanks in advance

Sincerely,
Andy

How To Animate A Button ?
animating a button
Hello. This sounds (to me) so easy that i cant really belive im asking it , anyway here goes.
I have a button already on the stage that when you (release) it, several things happen.
I would like the button itself, when it is (release)d , to move to the right a little bit. So therefore, i want to animate it.
How do i convert it to a movie ? do i need to ?
when i ihave tried to convert to a movie, i cant seem to make it (stop), so on the .swf it just starts running through its different buttons states (flashing and doing all kinds of wickedness)

yes i did a search for this here and to no avail.

help please ! thanks !

Animate Button
Hi guys,


How can I create a button that when I mouse over the animation play and when I mouse out the animation fade away then it gets back to normal?

I hope you understand my question....

It would be nice if you have a Flash sample.

Thanks,

Bobby.

Contents Of Radio Button
Anybody know the script for checking whether a radio button is checked or not? I have a bunch of radio buttons ( all of which work fine ) but I want to have Flash check to see if the radio button has been checked before it sends the contents of the clip. Here is the script I am using to pass the label info of the script:

onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {
for (item in this) {
rButton = this[item];
if (rButton.getState()) {
_parent.game1 = (rButton.getLabel());
break;
}
}
}
}

This code works fine and always sends the label info properly. Any reference to a variable game1 doesn't seem to work. Any help would be greatly appreciated. Thanks!

Flashlite

Adding Event Sound To Existing Flash Button
Hello:
I am wondering if one can add an event sound to an existing flash button. The button was created in Dreamweaver and is a flash button but I would like to add a sound effect and was wondering if this could be done. Please let know how to accomplish this if it can be done. Thanks

[MX04] How Do I Incorporate A Reset Button On My Existing Actionscript?
Hi, I've been working on interactive furniture for the past few weeks. Does any one know how to incorporate a reset button to clear the interactive furniture mc's from the stage after the user is finished with it?

Here is the actionscript:


var sOb = "";
var num:Number = 0;
Ob_array = new Array("bed", "armoire", "dresser");
Obclick = function () {
startDrag(this, true);
this.swapDepths(_root.getNextHighestDepth());
this._alpha = 50;
_root.sOb = this;
};
Obrelease = function () {
this._alpha = 100;
if (sOb.hitTest(trash._x, trash._y, true)) {
removeMovieClip(sOb);
}
};
for (var i in Ob_array) {
var ob:MovieClip = eval(Ob_array[i]);
ob.onPress = function() {
var nOb:MovieClip = attachMovie(this._name, this._name+(++num), _root.getNextHighestDepth(), {_x:this._x, _y:this._y, _alpha:50});
_root.sOb = nOb;
nOb.onPress = Obclick;
nOb.onRelease = nOb.onRollOut=Obrelease;
startDrag(nOb, true);
};
}
onMouseUp = function () {
stopDrag();
};
btnRIGHT.onPress = function(){
_root.sOb._rotation += 45;
}



Thank.

Animate A Movieclip With Button
Hi i have the following code.What i want is the movie clip to move across the stage continuoisley but it moves only 10 pixels each time I press the button I want to press the button opnce and have the clip continue to move.
code:
go.onPress = function(){
myMC._x += 10;
myMC._x ++
}

I thought that would do it but I'm stumped.

Thanks

How Do I Animate A Button On RollOut?
so say I have a button, and on the Over state of the button I play an animation. However, there is no Out state on the button so how do i animate in on roll out?

How To Get A Button Within A Mc To Make That Mc Animate?
hi, i'm trying to make a button within a mc get the mc it resides in to play on rollover, then play in reverse on rollout.

so i'm using _currentframe +/- to move the frames of the mc forwards or backwards, with the onrollover/out commands on the main timeline with the last frame looping to the previous frame to keep getting the +1 frame increments for the mc.

but this isnt working, anyone know how to do this?

thanks.

How Do I Animate A OnRollout Of A Button?
Im sure this is simple, but here goes...

I have a button. when you roll over it, it rises up about 20 pixels. (very clean animation. It's actually a _mc i put in the over state of the button.

I want to create the reverse effect when you roll out of the button.

How?

here is a link to see what I mean....

www.zunskigraphics.com/KARIZMA/index.html Click on Home

please help, this has been a stump for me since i started working with flash.

thanks
ZG

How Do I Animate Button On Mouseover
Hi all,

Newcomer to the forum (but a big user of the tutorials for a while now), and self taught in flash 5, meaning I know enough to build a site in flash, but there are random gaps in my knowledge...

What I'm trying to do is this: I'm building a site where the main page is an illustrated office area, and I'm trying to figure out how to create buttons that when you mouse over them, they play a brief animation (some will animate the actual object moused over, and some will play a brief animation within the illsutration) - as an example... when a monitor is moused over, it will "power up" and play a little intro on the screen, or when the phone is moused over, it will ring and the receiver will lift off the base and shiver, and a head will poke into the office door.

It seems I can either create an animation (which has no mouseover option) or a button, which has limitations... is there a way to script it so that a button will still direct to the next scene on release while playing a brief animation when moused over?

I'm having some problems going about how exactly to lay this out - ANY help would be greatly appreciated!!

Thanks!

Button Animate After Click
Hi, i am fairly new to actionscripting, ive used it before but only using the simple basic stuff like for simple buttons , but now i have a movie clip button problem.
i dont know if this has been talked about before, i tried searching but all that came up were rollover and rollout stuff, which i dont need anymore.

I am trying to make a movie clip button to animate after a user has clicked on it. I already have the rollover and rollout animations with the actionscript on the actions layer, not the actual mc button. however, i cant figure out how to make it animate after a user clicks on it and moves the mouse away. it will animate after its clicked and the mouse is over the mc button, but as soon as i move the mouse away it stops.
the mc button has all the animations using labels, onrollover goes to 'over', onpress goes to 'down', onrollout goes to 'out', and onrelease goes to 'anim', but like i said only when the mouse is over da button.
*sigh* while i was googling i saw something, but dont remember where, about using onclipevent. the help file is very confusing about how to use this and more searching about this leads to loading movies or something.

please help

How Do I Animate Button On Mouseover
Hi all,

Newcomer to the forum (but a big user of the tutorials for a while now), and self taught in flash 5, meaning I know enough to build a site in flash, but there are random gaps in my knowledge...

What I'm trying to do is this: I'm building a site where the main page is an illustrated office area, and I'm trying to figure out how to create buttons that when you mouse over them, they play a brief animation (some will animate the actual object moused over, and some will play a brief animation within the illsutration) - as an example... when a monitor is moused over, it will "power up" and play a little intro on the screen, or when the phone is moused over, it will ring and the receiver will lift off the base and shiver, and a head will poke into the office door.

It seems I can either create an animation (which has no mouseover option) or a button, which has limitations... is there a way to script it so that a button will still direct to the next scene on release while playing a brief animation when moused over?

I'm having some problems going about how exactly to lay this out - ANY help would be greatly appreciated!!

Thanks!

Help Making Button Animate
Hey,

I decided to learn a bit more by attempting stuff, so I uploaded my background and a button for my website, but I want to make the button animated like when you roll over it it makes a noise and it does a cool animation, etc etc. Heres a screenshot of my flash project:


Can anyone guide me through how I would do this so I know from now on and can advance in making my website :)

Thanks alot ;)

[F8] Changing The Contents Of A Page Via A Button.
Hi there! I'm new to the forums, the place looks really helpful!

Basically, I'm making a website for a band, and need some assistance for some of it.

Basically, the top image is a flash file, on it has an MP3 player of the band's music, the banner, and a set of navigation buttons.

Under this SWF will be the page's content, but I need this all to be changeable, for example, when I click on 'Gigs' in the SWF's buttons, I need it to be able to change the content below the SWF, without changing page.

Someone suggested to me to use a table, and have like, a document in a window, but I haven't the slightest idea on how to do that?

Therefore, I'll need the actionscript to put on each button, and also how to setup the document.

Anyone who can help me out I'd REALLY appreciate it!

Thanks so much!

Russ B.

Hide Contents Of Swf? Is There Any Way Of Hiding The Contents Of My Main Swf?
When my main swf site is loaded in a browser, is there any way of hiding the contents of my swf from users? Right now, anyone can just go to the 'activity' window and download any of my pictures, scripts, etc....and i don't like that.
Thanks,
Dave

MC As Button Won't Animate After I Add OnPress = Function
I've searched and experimented high and low, but cannot find a solution!

I have a movieclip acting as a button. The idea is to have an external .swf load onto the stage once the movieclip is clicked.

The external swf loads fine, just as expected. However, once I assign the instance name to the movieclip/button and add actionscript to frame one (seen below), the movieclip/button loses all of its animation, defeating the purpose.

Here's the script for frame one:
------------------
gallery.onPress = function() {
_root.createEmptyMovieClip("container", 1);
loadMovie("gallery.swf", "container");
holder._x = 50;
holder._y = 40;
};

------------------

Thanks for any input! One of my guesses is that the "onPress" is turning my movieclip/button into a "button" and losing its animation, but I know of no solutions.

How Do I Animate A Button That Returns To Form?
Ive animated a button that grows larger on rollover, but now I want it to decrease back again on release.

Any help would be great...

How Do You Animate A Button On A Motion Path
I need to make an animated button that follows a motion path around the page area on a continuous loop but at present it will not work to go to my next scene.

The idea is that viewer will enter the page and see a group of names that he has to click on as they move around on the page and this brings up the photo of the person but I cannot get the button to work, any ideas greatly appreciated.

I have tried putting a movie clip in the buttons first frame but no joy its seems to not allow the button to work even if i put....

on (release) {
tellTarget ("/movie1") {
gotoAndPlay(2);

}
}

Animate A Button On A Motion Guide
Is this possible I've looked on all the tutorials and cannot seem to find an example...

The scene is a little more complex so you will have to view my .fla file, see link below.

I need to make an animated button that follows a motion path around the page area on a continuous loop but at present it will not work to go to my next scene.

The idea is that viewer will enter the page and see a group of names that he has to click on as they move around on the page and this brings up the photo of the person but I cannot get the button to work, any ideas greatly appreciated.

I have tried putting a movie clip in the buttons first frame but no joy its seems to not allow the button to work even if i put....

on (release) {
tellTarget ("/movie1") {
gotoAndPlay(2);

}
}

I have put a link below to the .fla and .swf file for a look if you can help please. It's just a test at the moment so excuse the bad design.

I just cant get my head round it.

http://homepage.ntlworld.com/rosstamon/anime/anime.htm

If you could code one instance and email it to me that would be amazing and get me out of a hole pile of elephant dung if you get my jist, or you could make me learn the hard way and explain it in a reply and if I can do it and it works I will be you learned disciple forever.

rosstamon@ntlworld.com :{

Can't Animate Background Of Button Class
I've made a class that creates a simple button with a label and background. When I rollover the button the background should tween to a color and that's where it's going wrong. It's probably something simple I'm missing but I can't find it.
The text label does tween correctly, but the background doesn't do anything. It also doesn't give any errors when I test it.

ActionScript Code:
package classes
{
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
   
    import gs.TweenFilterLite;
    import gs.easing.Circ;

    public class NavButton extends Sprite
    {
        private var _text:String;
        private var _background:Sprite;
        private var _label:Sprite;
       
        public function NavButton(textLabel:String)
        {
            _text = textLabel;
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
        private function init(e:Event):void
        {
            buttonMode = true;
            mouseChildren = false;
            addLabel();
            drawBackground();
            addEventListener(MouseEvent.ROLL_OVER, onOver);
            addEventListener(MouseEvent.ROLL_OUT, onOut);
        }
        private function onOver(e:MouseEvent):void
        {
            TweenFilterLite.to(_background, 0.2, {tint: 0xfff59b, ease: Circ.easeOut});
            TweenFilterLite.to(_label, 0.2, {tint: 0x333333, ease: Circ.easeOut});
        }
        private function onOut(e:MouseEvent):void
        {
            TweenFilterLite.to(_background, 0.3, {tint: null, ease: Circ.easeOut});
            TweenFilterLite.to(_label, 0.3, {tint: null, ease: Circ.easeOut});
        }
        private function addLabel():void
        {
            _label = new Sprite();
            var tf:TextField = new TextField();
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.selectable = false;
            tf.x = 5;
            tf.y = 2;
           
            var format:TextFormat = new TextFormat("Arial", 16, 0xffffff, true);
            tf.defaultTextFormat = format;
            tf.text = _text;
           
            _label.addChild(tf);
            addChild(_label);
        }
        private function drawBackground():void
        {
            _background = new Sprite();
            var w:Number = _label.width + 10;
            var h:Number = 24;
            _background.graphics.beginFill(0x333333);
            _background.graphics.drawRect(0, 0, w, h);
            _background.graphics.endFill();
            addChildAt(_background, 0);
        }
    }
}

Why Does My Button Animate Without Explictly Invoking It ?
I created a user interface with buttons on it that load external swfs.

There are 3 buttons that will load external .swfs but I haven't set that
part of it up yet. I'm stuck on the 1st button.

You can view the .swf at
http://www.jassante.com/charts/starbucks/sbux.html

To view the actual fla file, merely change the "html" to ".fla" minus
the quotes.

I have 2 statements on my actions layer on frame one of the main timeline.

The 1st statement loads an external .swf so that the user
sees a chart as soon as the page loads.

The 2nd statement is a reference to the 1st button who's
instance name is "monthly_mc".

monthly_mc.onRelease = function(){

This is where I invoke the animation of the button (monthly_mc), but since
it's not working right, I took out those statements.
Funny thing is, it's still animating when you mouse over the button
even though there's no code sending the monthly_mc's play
head to a frame label that changes the look of the button (_down). :shock:

}

Can anyone tell me why this is happening ?
Initially, I couldn't seem to click on the button without it changing
states first. I was using onRelease to goto the down state
which uses darker colors on the button's background and stroke.
I also found that I couldn't make the button stay in the down state
after clicking the mouse. It would goto down state when cliking
the mouse, but then revert back to the upstate even though
the statement was a gotoAndStop("_down"). :?:
[/url]

Animate A Menu Button Momentarily
Hey everyone,

I am relatively new to flash 8, but am ok at it, having learned on mx a while back.

basically my question concerns the following situation:

I have a flash webpage menu, with certain buttons (news, shows, etc.). basically what i am trying to do, is when a button is pressed, not only open a page in a new frame (which i have successfully done), but do a little animation (for example, the button will have flames erupt around it momentarily) as well. the latter is what i'm having trouble with.

if anyone has any ideas or solutions, they'd be much appreciated. thanks for your time.

-keith

How Can I Make A Button Print The Contents Of The Browser?
I was wondering if someone can help me. I have a button inside a movie clip, and I need that button to print an image of a map or print the contents of the page. Does anyone know if this is possible???

I am grateful for any help given.


Flash Akira.

Problem Using Elastic Fx For My Button Which Contents Image In It.
hi guys,

i am back with my more detail query this time...

i have problem using elastic fx for my button which contents image in it.

i made a swf for this.

when i try to load swf into new timeline with ONLY ONE FRAME using empty MC it works fine...

but if i load the swf in empty MC in a newtime line having MORE THAN one frame THE IMAGE IN THE BUTTON GETS

DISTORTED/PIXALATED.

i am posting my sample folder for u guys to see what exactly the problem is..

hope u will understand what i am saying...

if u can advice me, why this is happening..?

i am attaching swf files here.

this is the code in the MV.fla in MC

onClipEvent (load) {
this.elasticScale = function(tar, accel, convert) {
xScale = xScale*accel+(tar-this._xscale)*convert;
yScale = yScale*accel+(tar-this._yscale)*convert;
this._xscale += xScale;
this._yscale += yScale;
};
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.elasticScale(115, 0.7, 0.6);
} else if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.elasticScale(100, 0.7, 0.6);
}
}

thanx

regards
sketch

Controlling The Contents Of A Window Component With A Button
Hi,

I want to have buttons that control the contents of the newly implemented "window" component. If possible, I'd also like to be able to change the title of the window as well.

One last question, is it possible to make the window component somewhat transparent?

Thanks!

Animated Button Won't Animate When Actions Are Applied
First off, to achieve an animated button effect (fade in on mouseover, fade out on mouseout), I have placed a button inside a movieclip.

I place the movieclip on the main stage and assign the following action:

on (press) {
_root.loginmain.gotoAndPlay(2);
}

The movieclip is assigned as a movieclip and not a button. It functions fine in bringing up the movieclip with the instance name of loginmain, which is the whole idea.

However, the rollover effect in the movieclip itself (the fade in on mouseover, fade out on mouseout) does not work now.

Any ideas? Thanks!

Nevermind I got it!

I had to add this action code to the movieclip along with the code I posted above .... so now the code for the button looks like this ...

on (press) {
_root.loginmain.gotoAndPlay(2);
}
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(10);
}

I had to tell the movieclip to go to itself and play on the rollover and rollout.

If anyone has any additional input, I'd be glad to hear. I'm new at learning this and must say this website is an INCREDIBLE resource.

Total NOOb Question... How To Animate Button?
attached is a file i am working on.

i can't seem to get the scripts right, and i prbably shouldn't have used a button object. can someone point me to a good tutorial?

1. the "*Application Disk" object should be looping, it is not. (the expanding ring anaimation)

2. the "pole" is "hot", even while masked out - try hovering below the green disc in the .swf, it activates the mov, it shouldn't, only the disc should do that

3. the "pole and flag" should be a button to the URL (which is not set yet), the pole is, but the flag is not.

I think everything is basically there, i am using the green or Application Management as my first button, i can do the rest, just need help on the first...


any help is greatly appreciated!

Navigation & "Contents"
I really need to know how to do a "real program" for my project. Cuz what i just did now was like a presentation where every scene is linked by "next" into the scene where I want the user to take. The "real program" i'm talking about is where all the links or the navigations to each lessons is in the left and the contents are in the right but my problem is... i don't know what is the code/ how to do that. What i want in my mind is when i clicked a button on the right, only the right page changes and not the whole page. Can somebody tell me how to do this? Please...

Unvable To Animate (tween) Scrollbar / Button Components?
Hi fellows,

I have a contact form within a mc (mcContact) that should glide from top to bottom. Ok, it's gliding, but the submit button and the scrollbar. In the author environment (Flash stage) it works, but when I test it with CONTROL+ENTER the button as well the scrollbar keep stucked in the same position of the first frame. Everything is tweened but they keep there, static.

What's going on????

How Do You Make A Button Thats Saves The Contents Of The Movie As A .jpeg File?
ive been checking out actionscript commands in the dictionary but i could not find any to use for a save button.

Does anyone know how to make a save button that when pressed saves the content of the movie window as a .jpeg image file?

It would be even better if when pressed the user gets a window were he can choose file name and location to save file to.

thanks vic

Animate Forward, Animate Backward
This seems like it should be easy, but it's beyond my skill.

I have an animation that I want to play forward when I mouse over, and play backward (to the beginning) when I mouse out. Here's the code:

stop();

function zoomMovie(event:MouseEvent):void
{
play();
}
this.addEventListener(MouseEvent.MOUSE_OVER, zoomMovie);

function mouseOut(event:MouseEvent):void
{
function everyFrame(event:Event):void
{
if (currentFrame == 1)
{
stop();
}
else
{
prevFrame();
}

}
this.addEventListener(Event.ENTER_FRAME, everyFrame);
}
this.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);

Any suggestion are very much appreciated

Noob: Animate, Stop, Animate
basically i'm trying to animate a movie clip from 0 pixel to 550 pixels in x axis, and when i reach 550 pixels in x axis i want it to stop and then animate in y axis from 10 pixels to 100pixels.

how can i do that?

please help me on my problem, it has been bothering me for days.

Button Events
Hello,
I have two Buttons and they overlap itself! That means: A large button and a small button is completely in the large Button situated.
At both buttons I have the “on events” rollOver and rollOut included.
Problem: If I drive with the mouse into the large button, I get the rollOver event, if I drive now with the mouse on the small button I get the rollOver event from the small button, but I get beforehand the rollOut event from the large button!
But I do not want to get that yet, since I am still in the surface of the large button!

Known somebody, who I can prevent the rollOut event from the large button????

Thanks
Greet
David

Button Events
Hi,

I'm as new to flash as it gets... I'm having trouble finding info on how to assign actions to a button. I want to have a scrollpane show up on the same stage when i click a button. The best I found so far is how to assign a link to a button!!! I know this should be an easy thing to do... what can i say...

Any help is greatly appreciated.

Two Different Events On One Button
This is what I'm trying to do:
The first time a user clicks a button, event #1 needs to happen.... the second time a user clicks that same button, event #2 needs to happen.

In setting a variable and setting up an if/else statement, the problem I'm having is putting the on (press) inside the if (ie. if myVariable=secondclick on (press)... perform event #2)- I get syntax errors. Is there another way to check to see if it's the second time a button has been clicked?

Button Events
Hello All,

I have 2 buttons on one banner one search field and user login

On the search button I have

on(release, keyPress "<Enter>" ){
getURL("SiteSearch.aspx", "_self", "post");
}

and on the login button I have

on(release, keyPress "<Enter>" ){
getURL("https://secure...../cpanel/login.aspx", "_self", "post");
}

So the problem is when i press the enter key it automatically goes to the search page...

Is there a way to have 2 on(release, keyPress "<Enter>" ){
events in the same movie?

Thanks.

Help Button Events
Hi, I am a newbie and have wasted sooo much time trying to assign an event to a button.

My Flash project consists of 4 different documents in order to decrease download times. In the "site.fla" document I have created a button I named "Montreal". I want to create an event that will take the user to frame 2 of "Montreal.fla".

I would so much appreciate if anyone could give me an example of Action Script 2 for this event. Thanks so much in advance!

Button Events
Hi everyone,

for all you experienced programmers:

I am trying to duplicate a button event within 2 loops (one for myButton and one for myvar) which calls a function and passes a variable "myvar"

Here is the code:

_root["myButton"+i].onRelease = function (){
showData(myvar);
}

The problem is that _root["myButton"+i] always ends up passing the variable myvar with the same value(always the last value from the loop) and it seems that this bit of code is only printed once and not duplicated with the loop. I dont really want to create an external class file just for this tiny bit of code. Is there any other way to do this?

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