Featured FLA
» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden
Featured Site
» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.
Create two images: the base of your slider interface and the image that
will slide. If convenient, make the base of your slider 100 pixels wide,
as the width would then correspond exactly to the volume range.
Place both on stage as movie clips.
From the pull-down top menu, select "View" and then "Rulers".
Place your slider image, exactly in the middle of the base. This point
will represent volume at 50%.
Give your slider movie clip the instance name of "hslider".
Select your slider movie clip, press F9 to access actions for the movie
clip and add the following (of course, remove the "//" comments if desired):
onClipEvent(load) { left=(_root.hslider._x) - 50; //The above allows the slider to slide 50 pixels to the left
top=_root.base._y + 1.1; // Replace or remove the 1.1 with whatever pixel number //you need to fine tune placement.
right=(_root.hslider._x) + 50; //The above allows the slider to slide 50 pixels to the right.
bottom=_root.base._y + 1.1; // The bottom should equal the "top" value to remove any //vertical movement from the slider.
_root.hslider._x=_root.base._width/2; //Loads the slider exactly in the middle of the base.
volCalc=_root.hslider._x-50 //Above establishes pixel range for calculating volume
//End of onClipEvent load
onClipEvent(enterFrame) {
// This constantly sets the current x-axis position of //the slider to "sliderx" and then sets the volume to //the x-axis value - volCalc.
sliderx=_root.hslider._x; myMusicVolume=(sliderx-volCalc); _root.myMusic.setVolume(myMusicVolume); _root.currentVolume=_root.myMusic.getVolume(); //Displays volume in dynamic text box with the Var name of currentVolume.. //End of onClipEvent enterFrame } onClipEvent(mouseDown) { startDrag(this, false, left , top , right, bottom) } // onClipEvent(mouseUp) {
this.stopDrag(); }
In the above example, the slider movie clip can now be dragged from
its center starting point to both ends of the base image. The variable "sliderx"
is defined to equal the current x-axis point of your slider movie clip each
time a frame is processed. The goal is to position your slider movie
clip graphic so that its x-axis starts directly in the middle of the base.
That way, you can calculate 50 pixels when the slider slides to the right and
50 pixels when it slides to the left.
The ActionScript for the above could also be placed in an event handler on a
frame of any movie clip that loops such as: