Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

attach movie - broken buttons - targeting

 
Jump to:  
 
opticalifornia
PostPosted: Wed Sep 03, 2008 5:28 pm    Post subject: attach movie - broken buttons - targeting
       
Let's say i have a simple movie clip called "navBar" and in that movie clip I
have nested another movie clip called "green_btn". I have assigned linkage to
both clips the first as "navBar" and the second "green_btn". It is removed
from the stage and saved in the library with proper linkage.

Now let's say I return to the stage and create a "holder" for my attached
movie. I leave it blank, I call it "myHolder_mc" and assign it linkageand give
it a instance name of "myHolder_mc" and move the cross hairs to the upper right
hand corner.

Then I create a red button movie clip on the stage of a red circle called
"red_btn", and give it a instance name of "red_btn". I will use
red_btn.onRelease to load up the attachedMovie. When I press the red_btn, the
"navBar" movie attaches fine.

OK, thanks for sticking with me this far - HERE IS THE PROBLEM - I want to be
able to target the "green_btn" that is located in the original navBar and
assign it a onRelease function. I can't seem to be able to target it, and have
tried to find the right target path, but can't seem to do it correctly.

So here is the code so far that isn't working

red_btn.onRelease = function(){
myHolder_mc.attachMovie("navBar","navBar", 0)
};

// the green_btn is nested inside of the navBar movieClip
myHolder_mc.navBar.green_btn.onRelease = function(){
trace("hello")
};

What should I do?
 

 
Actionscript
PostPosted: Wed Sep 03, 2008 8:34 pm    Post subject: Re: attach movie - broken buttons - targeting
       
On Sep 3, 10:28 am, "opticalifornia" <webforumsu...@macromedia.com>
wrote:
Quote:
Let's say i have a simple movie clip called "navBar" and in that movie clip I
have nested another movie clip called "green_btn".   I have assigned linkage to
both clips the first as "navBar" and the second "green_btn".  It is removed
from the stage and saved in the library with proper linkage.

 Now let's say I return to the stage and create a "holder" for my attached
movie.  I leave it blank, I call it "myHolder_mc" and assign it linkageand give
it a instance name of "myHolder_mc" and move the cross hairs to the upper right
hand corner.

 Then I create a red button movie clip on the stage of a red circle called
"red_btn", and give it a instance name of "red_btn".  I will use
red_btn.onRelease to load up the attachedMovie.  When I press the red_btn, the
"navBar" movie attaches fine.

 OK, thanks for sticking with me this far - HERE IS THE PROBLEM - I want to be
able to target the "green_btn" that is located in the original navBar and
assign it a onRelease function.  I can't seem to be able to target it, and have
tried to find the right target path, but can't seem to do it correctly.

 So here is the code so far that isn't working

 red_btn.onRelease = function(){
        myHolder_mc.attachMovie("navBar","navBar", 0)      
 };

 // the green_btn is nested inside of the navBar movieClip
 myHolder_mc.navBar.green_btn.onRelease = function(){
        trace("hello")
 };

 What should I do?

You can try _root.myHolder_mc.navBar.green_btn.onRelease = function()
{ { //action }
If that doesn't work, attach an example or sent to jennifer at
ushkainteractive dot com and I'll try to help...
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Ogrody zimowe - rola shoutcast poker online hale namiotowe Biskupin