Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 18:11
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  targeting movie clips in container mcs
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: targeting movie clips in container mcs  (Read 2063 times)
denise
Server what's that
*
Posts: 2



View Profile Email
« on: 02/27/02, 14:34 »

Hi -- newbie here, so I apologize for my ignorance.  I'm having some trouble with targeting my movie clip instances from the buttons.  They are on the stage in container movie clips and I read in another post that this might be the issue.  This is my button action code:
on (release) {
   _root.cont1.movieclipinstance.gotoAndStop("play");
   EcardSelect = "1";
}
Re setting the variables -- each clip regardless of where it is in the main swf must have a new variable number, right?  

Any help you may offer is greatly appreciated since Flash seems to have consumed months of my life and my progress is so extremely slow!

Thanks again!  denise

Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 02/27/02, 15:07 »

Ok, I'm not sure If I'm reading this right but here goes:

You'll have to specify where the variable goes as well - one way to do this would be:

on (release) {
   _root.cont1.movieclipinstance.gotoAndStop("play");
   _root.cont1.movieclipinstance.EcardSelect = "1";
}

Or from the MovieClipInstance you can grab the EcardSelect variable from the Root timeline for example:  

EcardSelect = _root.EcardSelect
(This will make the EcardSelect variable local inside the movie clip you are using).  

Another way to do this is with Tell Target - Tell Target can be very helpful in certain situations but you can just as easily specify everything by it's full path:

an example of this would be:

on (release) {
   tellTarget ("_root.cont1.movieclipinstance") {
       gotoAndStop("play");
       EcardSelect = "1";
   }
}

Tell target basically specify's a movie clip then makes all actions contained in within the brackets local to that movie clip.

I'm still a bit confused on this question - so If their's anything else let me know.
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!