Solved

Flash Pro 8 Problem with movie control buttons when going to 2nd scene

Posted on 2006-06-18
1
200 Views
Last Modified: 2010-04-03
Hi Folks

I am having problems with my flash movie control buttons when copying them to a second scene. They work fine in the first scene but as soon as I copy them to a 2nd scene things start to go wrong. They are your normal, pause, play, ff and rewind. I am copying by using edit>timeline>copy frames. Then pasting into the new scene on a new layer. The problem is that when I come to use the test movie option in control the whole thing grinds to a halt. I have gradually worked backwards through the process and find the problem stops when I remove the actions, so I guess I have some coding error or set up error.

A sample code for the rewind button is below.

on(press)
{
     function rewind()
     {
          _root.gotoAndStop(_root._currentframe-5);
     }
     intervalr = setInterval(rewind,50)
}
on(release, releaseOutside)
{
     clearInterval(intervalr)
}

On the one occasion it did manage to open a test screen up the buttons were doing all sorts of confusing things.

What am I doing wrong?

Lee
0
Comment
Question by:kasilof
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
Proactivation earned 500 total points
ID: 16967590
OK, a few observations:

1. You're using scenes.  Scenes are bad.  Don't use scenes.
2. It's better practice to put your actions in a frame rather than on the button itself, like this:

function rewind() {
      _root.gotoAndStop(_root._currentframe - 5);
}
var interval;
myButton.onPress = function() {
      intervalr = setInterval(rewind, 50);
};
myButton.onRelease = function() {
      //whatever
};

3. You're setting a callback when the user's mouse button is down, and clearing it again when they release it. Are you sure you want to do this..?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

738 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