[Extendflash] Taking item from library and placing it on the
stage
Dennis O'Brien
DOBrien at LeapFrog.com
Wed Jan 11 16:38:10 PST 2006
Hi Ibis,
Try this code snippet (and fill in the variables to fit). It creates a
blank keyframe at frame frameindex, selects it, selects a library item
called my_symbol, the adds it to the stage at the current frame.
// create a blank keyframe at frame frameindex
oTimeline.insertBlankKeyframe(frameindex);
// select the previously created blank keyframe
oTimeline.setSelectedFrames(frameindex, frameindex+1, true);
oTimeline.currentFrame = frameindex;
// now copy from the symbol from the library to the stage
sSymbolName = "my_symbol";
oLib.selectItem(sSymbolName);
xoffset = 10;
yoffset = 10;
oLib.addItemToDocument({x:xoffset, y:yoffset});
If you need a more complete sample (with a lot of extraneous stuff)
email me offline.
--Dennis
________________________________
From: extendflash-bounces at flashguru.co.uk
[mailto:extendflash-bounces at flashguru.co.uk] On Behalf Of Ibis Fernandez
Sent: Wednesday, January 11, 2006 3:55 PM
To: extendflash at flashguru.co.uk
Subject: [Extendflash] Taking item from library and placing it on the
stage
I'm having a bit of trouble figuring out how to grab an item whose path
and name I know on the library, and just placing it on the stage maybe
at x:10 by y:10 something like that.
Anyone have any tips for getting this done?
- Ibis
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/226 - Release Date:
1/10/2006
More information about the Extendflash
mailing list