Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-28-2005, 06:24 PM   #1
Graham
Registered User
 
Join Date: Dec 2005
Posts: 4
Default External movie clip problems - you can click through them!

I have lots of interactive things on my main stage - lots of buttons and little movie clips which play when you rollover them.

On this main stage, I'm creating an empty movie clip and loading an external swf file into it. This works fine - but there is one problem. If you can remember where the interactive things on the main stage are, you can make them work by clicking THROUGH the external swf. The swf is on a separate layer to these movie clips, though, and its layer is above their layer. In theory, the clicks you make on the external swf shouldn't have any effect on the clickable objects below it - but they do. How can I stop this, and make the loaded swf 'solid'?
Graham is offline   Reply With Quote
Old 12-28-2005, 07:02 PM   #2
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

ActionScript Code:
//something like for (i in _root) {  this[i].enabled = false; }
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 12-28-2005, 08:07 PM   #3
Graham
Registered User
 
Join Date: Dec 2005
Posts: 4
Default

Without meaning to be extraordinarily dense:

Should I assume that code goes on the first frame of the external swf?

I presume 'i' should be changed to something else, is it the instance name?
Graham is offline   Reply With Quote
Old 12-28-2005, 09:23 PM   #4
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

The easiest way to solve this problem is simply to add an invisible button (with no script attached to it...) on the LOWEST layer of your loaded external movie itself, covering the whole area of your loaded movie and/or of the whole stage area of your main movie if it's larger. This will disable any underlying buttons or movie clips.

You can even remove the pointing finger icon on that invisible button, with...

my_invisible_but.useHandCursor = false;

When you unload this movie, the underlying symbols will again be enabled.
oldnewbie is offline   Reply With Quote
Old 12-28-2005, 10:02 PM   #5
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

attached:
ActionScript Code:
press_mc.onRelease = function() {     var box = _root.attachMovie("box", "box_mc", 2);     box._alpha = 50;     for (i in _root) {         _root[i].enabled = false;     } } one_mc.onRelease = two_mc.onRelease = function() {     trace("clicked"); }
Attached Files
File Type: zip help.zip (4.9 KB, 326 views)
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");

Last edited by Flash Gordon; 12-28-2005 at 10:06 PM.
Flash Gordon is offline   Reply With Quote
Old 12-28-2005, 11:25 PM   #6
Lienne
Total Rock Star!
 
Lienne's Avatar
 
Join Date: Aug 2005
Location: California
Posts: 197
Send a message via AIM to Lienne
Default

Oldnewbie; disabling the hand is exactly what I needed! Thank you!
Lienne is offline   Reply With Quote
Old 12-29-2005, 09:20 PM   #7
Graham
Registered User
 
Join Date: Dec 2005
Posts: 4
Default

Thanks for all your help and examples - problem solved.
Graham is offline   Reply With Quote
Reply


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Assigning Callbacks to Programatically Created Movie Clips PowerfulWebsites ActionScript 2.0 2 10-24-2005 04:40 PM
Flash 4 creating an array on screen with duplicate movieclip Eend ActionScript 1.0 (and below) 8 02-18-2005 09:07 PM
Problems with an external movie Gladiatorus ActionScript 1.0 (and below) 1 02-18-2005 12:44 AM
alpha fading out an external movie clip - Pause - Fade in another jkjalan ActionScript 2.0 1 08-24-2004 07:03 AM
Problems with loadMovie and external .swf flashnick ActionScript 1.0 (and below) 3 07-07-2003 12:11 PM


All times are GMT. The time now is 11:39 PM.

///
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.