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




AttachMovie Clip To An Elastic Effect Button



I have an elastic button and I would like to have a box animate on to the screen when I roll over the button.
I've done the attachMovie to a normal button, but obvoiusly when I try to do this to the elastic button it bouncies along with it!
Does anyone know how to do this please.
Thank you
Linsey



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-10-2006, 12:24 PM


View Complete Forum Thread with Replies

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

Elastic Button Effect
Hello all,
I have been trying to come up with a way to create an elastic button that only expands and retracts with a bouncy effect in place. I don't want to create the actionscript on the button as I have seen several examples provided via Flash Kit. How do I apply the elastic.as that is provided by Flash MX 2004 or even create a unique class all its own to import into my flash document? I am relatively new to the OOP concepts and classes. Thanks for your input!

Elastic Button Effect
hi,
I wanna have the same elastic effect as the buttons of blink182.com. It seems like animated buttons, but there definitely seems to be some actionscript involved, since the button still moves when you rollover a different button. I need help with this.
thanks kirupaville

Elastic Button Effect
hi,
I wanna have the same elastic effect as the buttons of blink182.com. It seems like animated buttons, but there definitely seems to be some actionscript involved, since the button still moves when you rollover a different button. I need help with this.
thanks kirupaville

Elastic/Rubber Band Effect On Button
How do you create the elastic/rubber band effect on a button?

Example at http://www.creativeoxygen.com, then click "Who We Are" in the menu, then hover over "Our Bio."

Thanks.

Elastic/Rubber Band Effect On Button
How do you create the elastic/rubber band effect on a button?

Example at http://www.creativeoxygen.com, then click "Who We Are" in the menu, then hover over "Our Bio."

Attachmovie Clip Effect
I have a movieclip with the script

on (rollOver) {
attachMovie("picture1","picture1",2);
}

The attachMovie movieclip is a box that slides onto the screen, however i don't know how to do it so that when you rollout the box slides off the screen.

Can anyone help please.

Thanks
Linsey

AttachMovie Movie Clip Needs A Button Instance
Newbie question - I have 2 frames in the timeline. On frame 1 there is a button instance of a movie clip which on release goes to frame 2 - works fine.

On frame 2, I am using attachMovie to load a movie clip button which loads fine - problem is since it's loaded at runtime and not on the stage, it doesn't have a button instance applied to it, so it doesn't know it is a button and will not work.

Anyone know if there's a way to tell the attached movie clip to be a button instance?

Here's my scripts:


// Frame 1

stop();

fr2.onRelease = function() {
gotoAndPlay("frame2");
}

// Frame 2:

stop();

this.attachMovie("fr1_mc", fr1, 0, {_x:225, _y:74});

fr1.onRelease = function() {
gotoAndPlay("frame1");
}


FLA attached...

thanks in advance!

Attachmovie Loads A Movie Clip With A Button That Doesn't Rollover
Hey all:

I am using an attachmovie to load a movie clip. The clip loads but the button inside of it no longer rolls over (with up/over/hit states). The whole movie clip triggers the hand cursors. I tried loading just that button with the attachmovie and it loads it but does not rollover either. I don't know if it's a hit state problem or if I am just missing something stupid here.

When I just place the movieclip on the stage right next to the attachmovie version, it works fine ...

Does anyone have any ideas?


Thank you,
- Garrett

Elastic Effect
How do you create an elastic line. so that when u like on a certain point on it it stretches like elastic?

Elastic Effect
trying to create an elastic effect when I use a motion tween. How do I make an object move across the stage and come to a subtle bounce when it stops rather than an abrupt stop? Can anyone help me out with the action script for this?

Elastic Effect
I have a mc and I need to know how to make it drop down with an elastic effect.

On mouse over I would like the mc to fall from the top of the movie and bounce at a certain distance from the top??

Elastic Effect
Hi guys,
I was just wondering how do I get the elastic effect.I have been trying it since the last 4 days and cant get that effect.Please help.
What I mean by elastic effect is:
see example:
http://www.nethead.com:Once you press any of the links the way the submenus come out and go in ..they give a feeling of a rubberband or what i call the elastic effect.Please help,

Thanking you in advance.

Elastic Effect
Hi,

Can anyone help me out with the elasticity effect as seen on http://www.gumblondes.com ? That is, when a new section opens up, it 'bounces' in, for lack of a better explanation.

Is this an actionscript thing?

Thanks
G

Elastic Effect
Hi all,

Does someone know how to make an effect with website http://neave.com/ - elastic frame?

Thank you very much.

Elastic Effect
does anyone know how to do the elastic window effect please direct me into a tutorial thanx

Looking For An Elastic Effect
Can anyone point me to a tutorial on how to give an object an elastic effect when it moves onto the screen? Kind of like when you have a row of objects like a slide show and when you hit the next button the next slide scrolls in but it has a bounce to it? Is there an action script for that? or do you have to make that using tweens?

Thanks
MC

Elastic Effect
Hello can anyone help me. Basically for part of my project I need create a kind of minigame in which when two corret electric wires are touched, then it jumps to the next frame. Im not sure if this is even possible, my plan was to make the wires have an elastic type effect where they spring back but they also need to go to the next frame when in contact. Any ideas??

Elastic Effect
Hai everybody,

I want to create one flash presentation,which is like opening a envelope and the card should come with some elastic,bouncing effect from that envelope.
That card should have one form with hyperlinks also.

I just create upto opening the envelope & releasing the card,but i dont know to make them bouncing,elastic effect.

Everyone says,it can be done using flash actionscript only.I m not well versed in actionscript.

Please help me to make that effect.

Subathra.R

Chain + Elastic Effect Please Help
Hy guys, I was trying to do something like the menu you'll find on:

http://www.metroid.com/prime/

I've downloaded a couple of movie from the site, and I came up with something (the file in attachment), now there're just a couple of thinks I don't understand. If I rollover on the bigger squares the lines will appear, if I start dragging any of three boxes they all move, but if I drag the boxes fast enough the lines won't match the center of the object.
Besides I'll like that the lines will appear one at the time, for istance if I roll on the red box it will linked but if I roll on the green one the lines must appear only on that and disapper from the other.

Hope I'm not asking too omuch
T.i.a
Giano

Anyway I Could Give This An Elastic Effect
Hi! I have this idea drawn up (see attachment) that I wanna use a navigation menu. I want to give it some sort of an elastic/ bounce back effect. I was going to have the circles and text be individual buttons but I kinda want it to move as a whole. So that when part of it is rolled over it will move but when its rolled off it will bounce back. Does anyone have any ideas that could point me in the right direction?
Thanks in advance!!

Elastic Effect And Tween
Hello,

I attached the .fla to make it easier to understand what I'm trying to do.

I have a movie clip that has script on it to give it the elastic effect. But I also want to put a motion tween on it. The tween works when I play it on the stage, but when i test the movie it stays still but the elastic effect still works. Is there a way to make this happen?

Thank for your help!

Has The Elastic Effect Stopped?
Hi,

I was curious to know if there is any way of knowing when an elastic effect has finally stopped? If this is possible can someone point me to a resource that explains this please.

Thank you.

Elastic Effect?-- Mc's, Targets...
I have a main swf with 4 empty mc’s.
The 4 mc’s- top_mc, menu_mc, content_mc, bottom_mc.
The content_mc loads different swfs depending on what button(the swf in the menu_mc) the user presses

What I am trying to do is keep the content._mc and the bottom._mc in sync.
So say if a swf loads into content_mc that has a height of 200px the bottom will move accordingly with a nice elastic effect.

Help.

Elastic Effect On A Rectangle
i am trying to get an elastic effect on a triangle. i am not sure how to go about this. whether it is to use actionscript or to use tweening or morphing or masking. please can i get some helpful hints or even a start on how to code it to get a really go elastic effeect. i then can taylor it for my pruposes.

thanks in advance

Anyone Know An AS For Elastic Rollover Effect?
I have been literally banging my head over this!
I want to have an effect close to/like this: http://www.neave.com

Rollover the edges-- so nicely done!

I have turned codes inside-out and upsidedown in the last 3 days and am not even showing anything for it. If one of you can help, I will be forever grateful.

Elastic Effect On A Rectangle
i am trying to get an elastic effect on a triangle. i am not sure how to go about this. whether it is to use actionscript or to use tweening or morphing or masking. please can i get some helpful hints or even a start on how to code it to get a really go elastic effeect. i then can taylor it for my pruposes.

thanks in advance

Elastic Effect On Movie
hey hey.

i was wondering if someone here could help show me how to do an elastic-like bounce and position for the text that springs up in the attached .SWF

i wanna make it look a lil more realistic. Or, have it come in fast then slow down. I would probably work with the EASE for that, but would I have to put the objects on a path for the EASE to work?

i'm still learning, so i appreciate any kind of help.

thanks, guys.

How To Make This Elastic Effect?
Hi everyone,

I was surfing on dsign charts and i saw this site, and i wonder how to make this cool effect (the one with the christmas trees)

http://www.fingal.co.uk/site/

How To Smooth An Elastic Effect
I have a serie of movie clip parts from a menu. Each movie clip has an elastic effect on rollover with the following code.
it is ok but not smooth enough I wonder how I could smooth the effect. Is there a function for this ?

monClip.onRollOver = function() {
this.onEnterFrame = function() {
if (this._xscale >= 150) {
this._xscale = this._yscale = 150;
delete this.onEnterFrame;
};
this._xscale +=10;
this._yscale +=10;
};
};
monClip.onRollOut = function() {
this.onEnterFrame = function() {
if (this._xscale <= 150) {
this._xscale = this._yscale = 100;
delete this.onEnterFrame;
};
this._xscale -=10;
this._yscale -=10;
};
};

Inertia&Elastic Effect
hey... can somebody tell me how to make a nice movie with inertia and elastic effect in it using ActionScript.

Elastic Effect On A Rectangle
i know that this takes some actionscript in order to do. can someone give me a helpful hint on how to start or where there is a good tute on this? basically i would like the rectangle to animate by bending in and out before becoming straight. the sort of things you see in interfaces. its like a spring effect returning back to its original straightness.

any help will be appreciated.

thanks in advanced

Elastic Drag Image Effect
I want to know how to make this drag effect on a image. I haven't found this anywhere on the site.

Help With Simple Elastic Effect For Menu
Hello,
I've seen an effect on this site: http://www.5280mobile.com/ for a couple of days now, and I've been trying to find out how to do it, but couldn't. Is there any easy way to do this? Any tutorial someone can direct me to?

I really like their menu, and was wondering if the zoom/in zoom/out effect is easily done.

Peace

Elastic Effect Without Mouse Action
How can I make an elastic effect without any mouse action, only an on frame event ?

thnx

Elastic Effect With Mouse Control
okay here is my situation:
I have these two doors masking an image. There is a gap between the doors where the viewer can see part of the image, the doors cover the remainder of the image. The movement of the doors is triggered by the movement of the mouse. I have managed to accomplish the elastic effect however I need the doors to stop moving at given points ( the perimeter of the image being masked), regardless of how far the mouse has gone to either the right or the left. I am only working with the X plane, horizontally. So as of right now the script below doesn't stop the doors at the edge of the image. Instead they keep following the mouse past the stopping points. Can anyone help me out with this situation?
on Frame 1:
preloader.

on Frame 2:
xcenter = 400;
elasticDoor = function () {
if (old<=_root.xcenter) {
tester = true;
_root.door1._x = _root.door1._x+((_root._xmouse-80)-_root.door1._x)/10;
_root.door2._x = _root.door2._x+((_root._xmouse+80)-_root.door2._x)/20;
} else if (old>=_root.xcenter) {
tester = false;
_root.door1._x = _root.door1._x+((_root._xmouse-80)-_root.door1._x)/20;
_root.door2._x = _root.door2._x+((_root._xmouse+80)-_root.door2._x)/10;
}
};
parameter = function () {
if ((_root.door1._x<=110) && (_root.door2._x<=270)) {
_root.door1._x = 110;
_root.door2._x = 270;
}
if ((_root.door1._x>=535) && (_root.door2._x>=695)) {
_root.door1._x = 535;
_root.door2._x = 695;
}

};
elasticDoor();
parameter();
trace(tester);

on Frame 3:
_global.old = _root._xmouse;
gotoAndPlay(2);

If you want to view the SWF file visit the link below:
http://www.pharmacysupermall.com/problem

Sliding Menu Tutorial - Elastic Effect
Hi !

I have downloaded your tutorial and it works fine. Thank you, very useful.

At this moment when you click on a destination it's start very fast and ends very slowly.

How can I make the destination start slowly, goes faster and faster then finish slowly ?

I have also a little problem to determine the value with 21 pages instead of 4. In my movie the navigation bar is not the same that the sliding content.

Than you for your answer.

Flash MX 2004...problem With An Elastic Effect Code
Hi I am trying to change the code to this effect , it's an elastic effect(photogallery) with masking and i have movie clips inside the library linked with the code and all i would like to do is to just do a vertical up and down effect (with 2 bottons) kind of like prev and next (left and right) that i alreadt have in this code but i am a beginner in AS and i can't figiure it out...here's the code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var w=800
var h=600
num = 5
function drawSquare(clip, depth, colour, x, y, w, h) {
var mc = clip.createEmptyMovieClip("clip"+depth, depth);
mc._x = x;
mc._y = y;
mc.lineStyle(0);
mc.beginFill(colour);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.endFill();
return mc;
}
function drawTriangle(clip, depth, colour, x, y, w, h) {
var mc = clip.createEmptyMovieClip("clip"+depth, depth);
mc._x = x;
mc._y = y;
mc.lineStyle(0);
mc.beginFill(colour);
mc.lineTo(w, 0);
mc.lineTo(w/2, h);
mc.endFill();
return mc;
}
cliparray = [];
current = 1;
currentv=0
this.createEmptyMovieClip("holder", 1);
holder._y =0
holder.startx = holder._x=-600
for (var i = 0; i<num; i++) {
var hh = holder.createEmptyMovieClip("h"+i, i);
hh.attachMovie("p"+i, "p", 1);
var t = hh.attachMovie("t"+i, "t", 2);
t._y = h;
//add more here but increae jvar by 1 for each + _y =2*h,_y =3*h increase each time
hh.jvar = 1
hh._x = i*w;
hh.starty = hh._y;
hh.ivar = i;
hh.up = false;
cliparray.push(hh);
hh.endy = h-hh._height;
}
holder.endx =w+600-holder._width;
function tweener(tx) {
var s = new Tween(holder, "_x", Elastic.easeOut, holder._x, tx, 2, true);
s.onMotionFinished = function() {
disableall(true);
};
}
function vertmove(ty,target,callback) {
onEnterFrame = function () {
target._y += (ty-target._y)/3;
if (Math.abs(ty-target._y)<2) {
target._y = ty;
delete this.onEnterFrame
callback()
}
};
}
function moveleft(){
if(w-current*w -600>holder.endx){
currentv = 0
current++;
tweener(w-current*w-600);
}
}
function moveright(){
if(w-current*w-600<holder.startx+600){
currentv = 0
current--;
tweener(w-current*w-600);
}
}
function leftF() {
vertmove(0,cliparray[current],moveleft)

}
function rightF() {
vertmove(0,cliparray[current],moveright)
}
function upF() {
if(currentv<cliparray[current].jvar){
currentv++
vertmove(-h*currentv,cliparray[current])
}

}
function downF() {
currentv=0
vertmove(-h*currentv,cliparray[current])
}

left.onPress = leftF;
right.onPress = rightF;
up.onPress = upF;
down.onPress = downF;
function disableall(t) {
left.enabled = t;
right.enabled = t;
up.enabled = t;
down.enabled = t;
}
up.swapDepths(10000)
down.swapDepths(10001)
left.swapDepths(10002)
right.swapDepths(10003)
/*to mask
var mask = this.createEmptyMovieClip("m",100)
drawSquare(mask, 1000, 0, 0, 100,w*3,h);
holder.setMask(mask)
*/

Click Drag - Elastic Return To Position Effect
How can I have someone click/grab/ an object > remember it's last position > drag the object > onrelease the object returns to it's last position before being dragged (and with an elastic/rubberband effect)?

Thanks!

Convert Elastic / Bounce Effect To MX 2004 (Flash Player 7)
I am using an elastic effect to ease a MC back to its original position after a drag release, but the code I'm using doesn't work with Flash Player 7. I can't publish to Flash Player 6, because I'm using components that require 7.

Can someone please take a look at the code, and let me know what changes need to be made to get it to work with Flash Player 7? Thanks!

Code on main timeline frame:

Code:
Movieclip.prototype.elasticPos = function(targetX, targetY, accel, convert) {
tellTarget (this) {
xPos = xPos * accel + (targetX - _x) * convert;
yPos = ypos * accel + (targetY - _y) * convert;
_x += xPos;
_y += yPos;
}
};
Code on MC:

Code:
onClipEvent (load) {
x = this._x;
y = this._y;
}
onClipEvent (enterFrame) {
if (!pressed) {
elasticPos(x, y, .9, .5);
// elasticPos( targetX, targetY, accel, convert);
}
}
Code on button inside MC:

Code:
on (press) {
startDrag("");
dragging = true;
}
on (release, releaseOutside) {
stopDrag();
dragging = false;
}

Clip Button Effect Activating All Over Scene
Hi, I'm pretty new to this stuff. But my problem is that I have a movie clip, called.. teg01_1 and I have a button in that clip called txt_teg_hit1 .. my problem is that whenever i use that button to launch an external page, after i click it once, it keeps launching the page wherever else I click on the whole page (scene)..

The code I have for it is:

Code:
on (rollOver) {
gotoAndPlay("s1");
}
on (press) {
getURL(" javascript:Launch('build_cert.htm')");
}
on (releaseOutside, rollOut) {
gotoAndPlay("s2");
}
It works just fine with the whole launching and it does the rollover animation. But for the life of me I cant figure out why its playing wherever I click.
I have several other instances of identical clips (all for different links), teg01_2 and txt_teg_hit2 etc. Now they don't seem to cause me the same problem, which ever one of the other links I click, it loads but if i click anywhere else it just loads the first teg01_1 again!

I'll upload the source, if anyone can help me please, would be greatly appreciated! This is a flash template I bought, I've got most of it working just fine and have learnt alot (thankfully not as noob as when i began LOL), but I'm stumped.

Anyone have any ideas? Thanks alot!

[FMX] Navigation Help - Elastic Movie Clip (?)
I am interested in building a nav system like www.frontmedia.co.uk . I am a newbie at Flash. I was wondering if someone could break down how it is actually built.

Is it a movie clip that has an action script for the elasticity attached to it? Are the buttons within the movie clip controlling the movement? Both?

Sorry - I am not even sure where to start on this one...

Thanks in advance....

[FMX] Navigation Help - Elastic Movie Clip (?)
I am interested in building a nav system like www.frontmedia.co.uk . I am a newbie at Flash. I was wondering if someone could break down how it is actually built.

Is it a movie clip that has an action script for the elasticity attached to it? Are the buttons within the movie clip controlling the movement? Both?

Sorry - I am not even sure where to start on this one...

Thanks in advance....

[F8] Movie Clip Button Click Effect? Urgent
I have tested this code (below) and it works as expected.
The code is attached to a frame where the MC sits on the main timeline.

Ref: MWC

Can you please advise how I can create a mouse click event that takes the Movie Clip to a different timeline event say to destination frame #65?

The idea is for the click to take the user through an animation starting at frame # 65and then a URL jump to another page at frame # 75 (I can mamage the URL jump part). I am trying to get the mouse click to start the animation first though.

Please note, I am using multiple buttons and would like the code references for multiple button references.

Thanks




Attach Code

button1.onEnterFrame = function() {
(fade) ? button1.nextFrame() : button1.prevFrame();
};
button1.onRollOver=function(){_root.fade = true;}
button1.onRollOut=function(){_root.fade = false;}

Running Sound Effect Through A Button In A Movie Clip
I have a popup menu which is located in a movie clip.  That's all working fine (thanks to Oldnewbie), but I want it so when I roll over one of the buttons it plays a sound effect.  

I have the sound effect (beep.aiff) loaded into the library.  Now what do I do?

Thx.

Help With Elastic Button Please
Hi,

I have this elastic button that springs back to its spot on release. the problem is that i dont know how to make two buttons go to two different spots.
here is the swf
elastic button

could someone post the code or the fla for an example where i would have two buttons going to two different places.

thanx in advanced.
skyrace.....

...Elastic Button...
How exactly do I get this effect but with a button instead of a movie clip?

http://downloads.junioronline.us/det...tion=2&item=22

Thanks

Elastic Button HELP
I'm trying to get this button to bounce in and out when rolled over. The script works in one document but I can't get it to work when I copy it to another. Any advice?


MovieClip.prototype.jumpSkale = function(obj, rush, friction) {
this.tempo += (obj - this._xscale) * rush;
this.tempo *= friction;
this._xscale = this._yscale += this.tempo;
};

for (var i = 1; i <= 3; i++) {
this["MC" + i].onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.jumpSkale(400, .9, .6);
} else {
this.jumpSkale(100, .6, .5);
}
};
this.onEnterFrame = function() {
this._xscale = this._yscale = _root["MC" + this.nr]._xscale;
};
}

...Elastic Button...
How exactly do I get this effect but with a button instead of a movie clip?

http://downloads.junioronline.us/det...tion=2&item=22

Thanks

Elastic Button Issue
Ok, here is the deal:

this fla that i have attached works only in Flash 5 but not in Flash 6. In flash 6, every button bounces when one is rolled over. I have tried MULTIPLE things to figure this out but to no avail. It would be awesome if anyone could shed some light on this problem.

Thanks again everyone.

Paul

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