Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » Help! how to use transitions effects!

Help! how to use transitions effects!

Reply
  #1  
Old 11-03-09, 11:27 PM
dyablo687 dyablo687 is offline
New Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Help! how to use transitions effects!

I'm wondering if someone here can help.

What i have right now..

is an image gallery, with controls that when clicked go to the next image, nothing fancy at all. The images are in a movie that i called 'images_mov' that movie is on a layer on my main movie. The main movie has three layers, (from the bottom up) the first contains the movie with all the images. The second has the controls, next and previous. The final top layer contains the action script.

What i want to know ...

is how can i add an effect on each image when the user clicks the next and or back button with out using tween effects, just pure action script.

Also how can i make it so the movie plays automatically, but the user can still have some interactivity like going back an image or forward.

Anyway here is my ac code i have

Code:
stop();

function goPrev(event:MouseEvent):void {
	if (images_mov.currentFrame == 1) {
		images_mov.gotoAndStop(totalFrames);
	} else {
		images_mov.prevFrame();
	}
}

function goNext(event:MouseEvent):void {
	if (images_mov.currentFrame == totalFrames) {
		images_mov.gotoAndStop(1);
	} else {
		images_mov.nextFrame();
	}
}

prev_btn.addEventListener(MouseEvent.CLICK,goPrev);
next_btn.addEventListener(MouseEvent.CLICK,goNext);
Reply With Quote
  #2  
Old 11-13-09, 11:10 AM
mjjwatson mjjwatson is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Your best option is to get away from the timeline completely, put all your image links in an xml file, load it in, then use timers to pick a certain length of time before it changes.

However, this may require quite a lot of learning, depending on your familiarity with AS3.

I'd recommend playing around with Caurina Tweener too, which gives you wonderful control over your AS3 driven tweens (rather than the timeline ones). tweener - Project Hosting on Google Code

It's simple to set up- put the folder in your working flash directory. Import with:

Code:
import caurina.transitions.Tweener;
And then put in tweens like so:

Code:
Tweener.addTween(myNewImage,{alpha:1, time:1, transition:"linear"});
(that would fade to full alpha in one second).

Alternatively you could just download or buy one of the many image galleries out there which do this job proficiently, are customisable, and could save you a lot of time!
Reply With Quote
Reply

Bookmarks

Tags
action script, image gallery, transitions effects


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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Effects jadown Flash & ActionScript 0 07-27-06 08:31 AM
Dynamic Effects ! <--- CHECK IT OUT! Graphite X General Advertisements 3 12-20-05 02:38 PM
Dynamic Effects ! - All your Graphic Needs Graphite X General Advertisements 0 12-19-05 04:55 PM
Royalty free music and effects library www.fish4sounds.com General Advertisements 0 11-24-05 09:20 AM
special effects for hangman vb ivey415 Windows .NET Programming 1 04-24-05 03:19 AM


All times are GMT -5. The time now is 08:17 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2 (Unregistered)