Solved

My QUIZ is not executing

Posted on 2004-09-18
3
185 Views
Last Modified: 2010-04-03
I Created a  Quiz similar to one of the flash templates, It works perferctly when I use it as a stand alone file (when I lunch it seperatly) , but when I link it to other swf files using these lines , it loads but does not function at all

on(release) {
  loadMovie("Quiz.swf",this);
}

please help
0
Comment
Question by:nawrs
3 Comments
 
LVL 4

Accepted Solution

by:
mrdilliard earned 125 total points
ID: 12092969
inside Quiz.swf, you might be pointing to _root a lot, which is going to cause problems. Whenever you load a movie inside of another movie, Flash thinks that the movie that loaded the other one is the _root, so any pointers to _root from the loaded movie will be wrong.

There's two ways to fix this, the first way being easiest:

1. Put this._lockroot = true; on your first frame of Quiz.swf, and any references to _root will point to the _root of Quiz.swf

2. You could also make a global variable on the first frame, like so:
_global.quiz = this;

That way, you can change anywhere where you say _root to quiz, and it should work, if that's the problem.


Definitely try solution #1 first, since it doesn't require nearly as much code.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

821 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