Solved

attachMovie works only if used with _root.

Posted on 2003-12-01
3
184 Views
Last Modified: 2010-04-03
Hi everybody,

I have a little annoying problem. I'm trying to dynamically attach a couple of movieclips to an existing movieclip in order to mask them. The problem is that it doesn't work.

Here is the code :

myPicture.prototype = new MovieClip();
Object.registerClass("pictureSymbol", myPicture);
for (i=0; i < BaseNode.childNodes.length; i++) {
      picID = "picture" + i;
      scroller.attachMovie("pictureSymbol", picID, i+80);
      ThisNode = BaseNode.childNodes[i];
      tempItem = eval(picID);
      tempItem.setPosition(startX, startPos);            
      startPos += tempItem.getHeight() + incY;                  
}
scroller.setMask(mask);

"pictureSymbol" was previously defined and is set to "export in first frame".

So the problem is at line 5.  If I write scroller.attachMovie.... it doesn't work, but if i write _root.attachMovie... it works. So i can't mask the scroller.

Any help would be appreciate..... thanks
0
Comment
Question by:p00pstar
3 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 125 total points
ID: 9854349
=====================================
myPicture.prototype = new MovieClip();
Object.registerClass("pictureSymbol", myPicture);
for (i=0; i < BaseNode.childNodes.length; i++) {
    picID = "picture" + i;
    scroller.attachMovie("pictureSymbol", picID, i+80);
    ThisNode = BaseNode.childNodes[i];
    tempItem = eval(picID);
    tempItem.setPosition(startX, startPos);          
    startPos += tempItem.getHeight() + incY;              
}
scroller.setMask(mask);
=====================================

is mask a movieclip? and what do you want to mask, scroller, or pictureSymbol?
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
3D rotation for a product 3 339
Embedding Flash App/Movie on Website 3 496
Adobe Flash Player not supported on my Tablet 7 732
Adobe Flash Player won't install on Windows 7 3 242
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…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

773 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