SwishTalk.com
 

Go Back   SwishTalk.com > .:: THE HELP DESK ::. > » Actionscript Help

Reply
 
Thread Tools Display Modes
#1   Slider Component  

Name: 
joenowhere
Status: Offline
Rank: Registered User
Posts: 3
Old 04-29-2012, 09:11 AM Reply With Quote


I want to make a flash with a Slider Component to control mc, like the file I attach, is there any way to add a classic tween effect in between each mc, so that it will transform smoothly? Thanks a lot!!

below is my AC

Quote:
import fl.controls.Slider;
import fl.events.SliderEvent;
import flash.events.Event;

amount.text = "1";
mcTest.gotoAndStop(1);

var mcSlider:Slider = new Slider();
var animLength : int = mcTest.totalFrames;
var calcWidth : Number = mcSlider.maximum / animLength;
var animPlaying : Boolean = false;

mcSlider.move(20,100);
mcSlider.liveDragging = true;
mcSlider.setSize(500,0);
mcSlider.minimum = 1;
mcSlider.maximum = 10;
mcSlider.tickInterval = 1;
addChild(mcSlider);

mcSlider.addEventListener(SliderEvent.CHANGE, doSliderChange);
mcTest.addEventListener(Event.ENTER_FRAME, scrubMovie);

function scrubMovie(evt:Event):void
{
var scrubPos : int = mcSlider.value;
var gotoFrame : int = Math.ceil(scrubPos / calcWidth);
mcTest.gotoAndStop(gotoFrame);
}

function doSliderChange(e:SliderEvent):void {
amount.text = e.target.value;
}




Attached Files
File Type: zip test.swf.zip (18.4 KB, 59 views)
               
 
View Public Profile Find all posts by joenowhere Add joenowhere to Your Contacts
#2    
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,496
Mood: MEAN: Do's not play well
Old 04-29-2012, 10:17 AM Reply With Quote


I believe you are in the wrong Forum.
You want a Adobe Flash forum.
Your code is AS2 CS 4 or better.
This is a Swishmax forum a totally different working file Adobe Flash = fla / Swishmax = swi
Yes and I know your demo file is a swf which both export but they compile different.
Swishmax does not work with or compile AS2 CS3 or above.

Wayne


               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#3    

Name: 
joenowhere
Status: Offline
Rank: Registered User
Posts: 3
Old 04-29-2012, 10:28 AM Reply With Quote


Quote:
Originally Posted by cycle1500 View Post
I believe you are in the wrong Forum.
You want a Adobe Flash forum.
Your code is AS2 CS 4 or better.
This is a Swishmax forum a totally different working file Adobe Flash = fla / Swishmax = swi
Yes and I know your demo file is a swf which both export but they compile different.
Swishmax does not work with or compile AS2 CS3 or above.

Wayne

Oh Really, I don't know that, sorry! (^o^)




               
 
View Public Profile Find all posts by joenowhere Add joenowhere to Your Contacts
Advertisement:





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