Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-09-2006, 03:43 AM   #1
Beyond Groups
Narendrakumar's Avatar
Join Date: May 2006
Location: Chennai, India
Posts: 111
Send a message via Yahoo to Narendrakumar Send a message via Skype™ to Narendrakumar
Default How to add a movieclip into a selected movieclip

can anyone provide solution to add a particular movieclip from library into
the selected movieclip.also i need to change the _x,_y,_width,_height,instancename properties of the selected and inserted movieclips.

for example suppose a movieclip named face_mc is selected on stage.
while executing the JSFL it should contain a movieclip (named eye from library).i have to change its properties too.
Narendrakumar is offline   Reply With Quote
Old 08-13-2006, 11:00 PM   #2
Registered User
Join Date: Sep 2005
Posts: 32

// with two items in the library, "face" and "eye", select an instance of face on the stage and run this command:
var doc = fl.getDocumentDOM();
if (doc.selection.length == 1) {
var xPosition = 0;
var yPosition = 0;
var libraryName = doc.selection[0].libraryItem.name
doc.library.addItemToDocument({x:xPosition , y:yPosition}, "eye");
or, without having to select it first

var doc = fl.getDocumentDOM();
var xPosition = 0;
var yPosition = 0;
doc.library.addItemToDocument({x:xPosition , y:yPosition}, "eye");
androo_animator is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
6 Button movieclip Problem Using AsBroadcaster systemfx ActionScript 2.0 2 05-22-2007 11:33 PM
movieclip control help required...... davey99 Other Flash General Questions 2 07-29-2006 07:43 PM
sequential Location for attaching a movieclip nish ActionScript 2.0 6 07-03-2006 12:16 PM
Limiting the number of checkboxes selected penguin Components 4 02-02-2006 11:49 PM
Button on a MovieClip? Talon ActionScript 2.0 2 04-26-2004 03:51 PM

All times are GMT. The time now is 06:18 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.