Go Back   kirupaForum > Flash > ActionScript 1.0/2.0

Reply
 
Thread Tools Display Modes
Old 08-06-2009, 09:06 AM   #1
eqwan
Registered User
Help adding Buttons [ AS 2 ]

How do I add a like e.g get URL or load movie without losing animation

I added this to test but it stops the animation

but1.onRelease = function(){
getURL("javascript:alert('you clicked me')");
};

// This Class is required from www.laco.wz //
#include "lmc_tween.as"
but1.bodyText = "Immigration Law";
but2.bodyText = "Employment Law";
but3.bodyText = "Property Law";
but4.bodyText = "Family Law";
but5.bodyText = "Corporate Law";
but6.bodyText = "Commercial Law";
but7.bodyText = "Oil & Gas Law";
but8.bodyText = "Tenancy Law";
but9.bodyText = "Criminal Law";
but5.bodyText = "Contact Us";


this is contained inside the button
________________________________

// Set parameters here //
var rotateMax = 3
var effectSpeed = 0.5;
var offsetSpeed = 0.8;
var textXChange = 10;
var textBrightChange = -5;
// Code you can modify /
var textX = _parent.textBox._x;
var maxText = textX+textXChange;
var textBright = textBrightChange;
var boxMaxX = this._xscale;
var boxMinX = boxMaxX-5;
var boxMaxBright = 0;
var boxMinBright = -15;
var butSize = boxMaxX-30;
_parent.textBox._visible = false;
this._xscale = butSize;
this._alpha = 0;
this.tween("_xscale", boxMaxX, 3, "easeInOut", 1);
this.alphaTo(100, 2, "easeIn", 1, onEnd);
function onEnd() {
_parent.textBox._visible = true;
}
but.onRollOver = function() {
this.rotateTo(rotateMax, 2, "easeInOut");
_parent.textBox.rotateTo(rotateMax, 2, "easeInOut");
_parent.textBox.tween("_x", maxText, effectSpeed, "easeOut");
_parent.textBox.brightnessTo(textBright, effectSpeed, "easeInOut");
this.tween("_xscale", boxMinX, effectSpeed, "easeOut");
this.brightnessTo(boxMinBright, effectSpeed, "easeInOut");
};
but.onRollOut = function() {
this.rotateTo(0, 2, "easeOutElastic");
_parent.textBox.rotateTo(0, 2, "easeInOut");
_parent.textBox.brightnessTo(0, effectSpeed, "easeInOut");
_parent.textBox.tween("_x", textX, effectSpeed, "easeOut");
this.brightnessTo(boxMaxBright, effectSpeed, "easeInOut");
this.tween("_xscale", boxMaxX, offsetSpeed, "easeOutElastic");


};



file link

http://www.mediafire.com/?sharekey=a...4e75f6e8ebb871

thanks
eqwan is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:07 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com