Go Back   kirupaForum > Flash > ActionScript 1.0/2.0

Reply
 
Thread Tools Display Modes
Old 08-17-2009, 07:21 AM   #1
KaH
Registered User
[CS4 AS2] Really really newbie question- sorry! Referencing attached clip

I apologize in advance for how much of a noob question this probably is!

Using attachMovie, I've attached a movie from my library to a clip already on the stage - great, that worked, wonderful.

centerpoint.attachMovie("making_mc", "making_mcattached", 22);

Now I want to refer to a movie clip inside of this attached movie clip from the main timeline. How do I go about doing that? I feel as though I've tried every combination of centerpoint.making_mcattached.back etc. etc. (back is the name of the mc inside of my attached movie clip). What terribly obvious thing am I missing this time or am I really just going about this whole thing completely wrong? Any help would be greatly appreciated- since I really am very new to all of this I would really like to learn and unfortunately I'm not having much luck trying to figure this out on google or by trial and error.

Thank you!
KaH is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 08-18-2009, 04:03 PM   #2
Nunns3y
Registered User
Give the movieclip an instance name and then refer to that instance name in your AS?

So click your back movieclip, the one inside the attached clip. Then type the a name you can use to refer to it in actionscript (how bout 'troubleMC'). I don't think you need anything other than that.
Nunns3y is offline   Reply With Quote
Old 08-26-2009, 01:32 PM   #3
KaH
Registered User
Thank you for the reply-!
I don't actually recall what instance name I'd given the back button, so let's just say it's troubleMC then.

From the main timeline do I reference it as

making_mcattached.troubleMC
making_mc.troubleMC
centerpoint.making_mcattached.troubleMC
centerpoint.making_mc.troubleMC

??? I really want to add actions to this troubleMC but since I have no idea how to reference it - well, it's giving me a bit of trouble.
I think I've actually tried all of those four above options and none have worked, so again I apologize if there is a really obvious solution here.

Thanks.
KaH is offline   Reply With Quote
Old 08-26-2009, 06:09 PM   #4
glosrfc
Registered User
 
glosrfc's Avatar
Location Halley Research Station, Latitude 75°35' S, Longitude 26°39' W, Brunt Ice Shelf, Coats Land, Antarctica

Posts 4,159
Option 3 would be the right one:
ActionScript Code:
centerpoint.attachMovie("making_mc", "making_mcattached", 22);
centerpoint.making_mcattached.troubleMC.onRollOver = function() {
    trace(this);
};

This assumes that:
a) you already have a movieclip with an instance name of centerpoint on the stage
b) you have a movieclip in your Library with the linkage id of "making_mc"
c) that mc contains a further mc with an instance name of "troubleMC"
d) and that you are actually trying to target troubleMC from the _root timeline.

__________________
©2006 GlosRFC - Searching 8,168,684,336 brain cells
glosrfc is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:14 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com