Solved

Problem with rollover in movieclip in scrollpane

Posted on 2006-11-01
2
330 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML 5 or Flash 7 494
camtasia alternative that can record 3 hours video plus audio 24 145
Cannot install Adove Flash player on Windows 2012R2 6 109
black magic design 1 135
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. …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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 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…

732 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