[Flashcoders] mc loads, has a global....

2006-10-26 Thread grimmwerks

ok -  still with this app.

I have a map that I'm loading externally - map.swf. In it I'm setting
all kinds of stuff using

_global.gMap(all kinds of functions)

The main swf that loads in this clip, once it's loaded with a
moviecliploader -- I try to trigger one of the functions via
gMap.showMap() - but the loaded movieclip doesn't trigger anything,
though it IS loaded.

I thought globals were globals - if a loaded clip creates a new
_global object, that the parent clip could trigger it as well?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] mc loads, has a global....

2006-10-26 Thread Keith Reinfeld
A quick test shows that what you want is do-able. :) 

This works: 
 
In a child swf (to be loaded) I used: 
 
function mapThis(){ 
trace(mapThis() called); 
} 
 
function mapThat(){ 
trace(mapThat() called); 
} 

_global.mapage = {};// new Object 
_global.mapage.mapThis = mapThis;
_global.mapage.mapThat = mapThat;
 
Then in a parent swf (to load child) I used: 
  
loadee.loadMovie(Child.swf); 
 
aButton.onRelease = function(){ 
mapage.mapThis(); 
mapage.mapThat(); 
} 

I suspect you may be overwriting your functions such that _global.gMap is
left with only the last one you assigned to it. 
 
HTH 

-Keith 
http://home.mn.rr.com/keithreinfeld 
 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of grimmwerks
Sent: Thursday, October 26, 2006 10:41 PM
To: Flashcoders mailing list
Subject: [Flashcoders] mc loads, has a global

ok -  still with this app.

I have a map that I'm loading externally - map.swf. In it I'm setting
all kinds of stuff using

_global.gMap(all kinds of functions)

The main swf that loads in this clip, once it's loaded with a
moviecliploader -- I try to trigger one of the functions via
gMap.showMap() - but the loaded movieclip doesn't trigger anything,
though it IS loaded.

I thought globals were globals - if a loaded clip creates a new
_global object, that the parent clip could trigger it as well?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com