Solved

Flash Slide Presentations: Make slide advance after x seconds

Posted on 2004-09-30
5
201 Views
Last Modified: 2011-10-03
I have been messing with the new slide screens feature in 2004 MX Pro and I was wondering if there was a way to automatically advance slides, I couldnt figure out a way except with mouse clicks...

Thanks!
0
Comment
Question by:jvosika
  • 3
  • 2
5 Comments
 
LVL 10

Expert Comment

by:muso120999
Comment Utility
You can use setInterval:

function advanceSlide = function() {
    clearInterval(_root.id);
    // code to advance to next slide
    Slide.gotoNextSlide();
}

_root.id = setInterval(advanceSlide,3000); // wait 3 seconds before calling advanceSlide
0
 

Author Comment

by:jvosika
Comment Utility
That threw an error, here is the output:

**Error** Screen=search:Line 10: '(' expected
     function advanceSlide = function() {

**Error** Screen=search:Line 16: Statement must appear within on/onClipEvent handler
     _root.id = setInterval(advanceSlide,3000); // wait 3 seconds before calling advanceSlide

Total ActionScript Errors: 2        Reported Errors: 2


Any ideas?
0
 
LVL 10

Accepted Solution

by:
muso120999 earned 500 total points
Comment Utility
Sorry, I wasn't familiar with the slide code:

replace:

Slide.gotoNextSlide();

with:

_root.currentSlide.nextSlide();

also put the code onto a frame (i.e. the last frame, at the point where you want it to start timing) on the main timeline - not a button or movieclip as that is causing the error message.


0
 
LVL 10

Expert Comment

by:muso120999
Comment Utility
Are you still getting errors?
0
 

Author Comment

by:jvosika
Comment Utility
I had to do some checking but here is the final code that is needed to work:

on(reveal) {
advanceSlide = function ()
{
currentSlide.gotoNextSlide();
}
setInterval(advanceSlide, 5000)
}


Thanks.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now