Solved

Problem with rollover in movieclip in scrollpane

Posted on 2006-11-01
2
328 Views
Last Modified: 2008-02-01
This is a followup question from this thread:
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_22044839.html

Now I have this script that works excellent with the help from the great Aneeshchopra.

my_mc is a empty movieclip in my library
and clip1 and clip2 are the clips i need to display in my scrollpane.

mypane.contentPath = "my_mc";
mycontainer = mypane.content;
temp = mycontainer.attachMovie("clip1", "clip1", 1, {_y:0});
temp2 = mycontainer.attachMovie("clip2", "clip2", 2, {_y:18});

after this script here above which works excellent like i mentioned I have this script because I want to interact with clip1 and clip2:

clip1Class.prototype = new MovieClip();
Object.registerClass("clip1", clip1Class);
clip1Class.prototype.onRollOver = function() {
      trace("rollover");
};

But I cant get it to do the trace?

Does anybody know whats the problem here?



0
Comment
Question by:Fern2
2 Comments
 
LVL 23

Accepted Solution

by:
Zeffer earned 500 total points
ID: 17852604
you need a constructor for the class.. try this..

function clip1Class() {}
clip1Class.prototype = new MovieClip();
clip1Class.prototype.onRollOver = function() {
     trace("rollover");
}
Object.registerClass("clip1", clip1Class);


Z



0
 
LVL 1

Author Comment

by:Fern2
ID: 17855866
thx Zeffer. Brilliant
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a simple "throw object" gesture on as3 / air mobile ? 3 1,198
Add 'birds singing' to homepage 5 112
embedding a media live encoder stream 3 148
flash in chrome 4 110
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

860 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