Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-08-2007, 05:05 PM   #1
thumbslinger
Senior Member
 
Join Date: Feb 2005
Posts: 209
Default Scrollpane; targeting other timeline

I'm loading a simple swf with nothing but a button labeled ghm into a scrollpane.

I have a sound component on the timeline along with the scrollpane.

I want the buttons inside of the scrollpane to control the sound component but I'm not even getting a trace to work so something is up.

I have this code on the timeline of the movie clip which has a scrollpane:
ActionScript Code:
this.jingleList.jingleButtons.ghm.onRelease = function() {     trace("this works");     //soundPlayer.doPlay(); };

this referring to the movie clip that houses the scrollpane.
jingleList is the instance name of the scrollpane.
jingleButtons is the name of the loaded swf file
ghm is the instance name of the button inside of the jingleButtons swf

I've also tried
this.jingleList.content.jingleButtons.ghm...etc but that doesn't work either

What am I missing?
Thanks

Last edited by thumbslinger; 06-08-2007 at 05:18 PM.
thumbslinger is offline   Reply With Quote
Old 06-08-2007, 06:17 PM   #2
LOLFlash
Senior Member
 
Join Date: May 2007
Location: Toronto,Canada
Posts: 530
Default content

try:
this.jingleList.content.jingleButtons.ghm.onReleas e = function() {
trace("this works");
//soundPlayer.doPlay();
};
LOLFlash is offline   Reply With Quote
Old 06-08-2007, 06:24 PM   #3
thumbslinger
Senior Member
 
Join Date: Feb 2005
Posts: 209
Default

yeah, I tried that as well. Still no luck. I'm trying to now see if I can target from the loaded file instead.
thumbslinger is offline   Reply With Quote
Old 06-08-2007, 06:47 PM   #4
LOLFlash
Senior Member
 
Join Date: May 2007
Location: Toronto,Canada
Posts: 530
Default timing issue

you have to define this function after all content loaded
LOLFlash is offline   Reply With Quote
Old 06-08-2007, 07:00 PM   #5
thumbslinger
Senior Member
 
Join Date: Feb 2005
Posts: 209
Default

well, it's only about a 2k file so it's definitely loaded. I'll keep looking around and see what else needs to be done, thanks
thumbslinger is offline   Reply With Quote
Old 06-08-2007, 07:08 PM   #6
LOLFlash
Senior Member
 
Join Date: May 2007
Location: Toronto,Canada
Posts: 530
Default timing issue

ActionScript Code:
trace(this.jingleList.content.jingleButtons.ghm); trace(this.jingleList.content); this.jingleList.content.jingleButtons.ghm.onReleas e = function() { trace("this works"); //soundPlayer.doPlay(); };

if it trace: udefined, your content not loaded yet
LOLFlash is offline   Reply With Quote
Old 06-08-2007, 07:17 PM   #7
LOLFlash
Senior Member
 
Join Date: May 2007
Location: Toronto,Canada
Posts: 530
Default try this

in movie clip where your butons put line:

_root.initMePlease(this);


in main movie contaner :

_root.initMePlease = function(target:MovieClip){

target.ghm.onRelease = function() {
trace("this works");
}

}
LOLFlash is offline   Reply With Quote
Old 06-11-2007, 02:03 PM   #8
thumbslinger
Senior Member
 
Join Date: Feb 2005
Posts: 209
Default

Yes! Thanks, that worked. What do I need to look up to understand more about "initMePlease(this)"

I tried init in the as dictionary, but get gobs of junk like 'defINITely'..thanks so much.
thumbslinger is offline   Reply With Quote
Old 06-11-2007, 02:56 PM   #9
LOLFlash
Senior Member
 
Join Date: May 2007
Location: Toronto,Canada
Posts: 530
Default initialize

unfortunately not mach in help. it is programming issue about initialization what goes after what. Use trace more often.

look in for words: init, initialization, linkage initialization
LOLFlash 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content in scrollPane loading *beneath* external SWFs loaded with loadMovie roodycantfail Components 1 04-04-2007 02:48 AM
Targeting root timeline from a movieclip antibob ActionScript 2.0 3 11-22-2006 12:32 AM
Scrollpane with loader rajesh022 Components 0 04-15-2005 07:39 AM
Targeting main timeline from external SWF.. unsigned ActionScript 1.0 (and below) 1 11-10-2004 04:53 AM
Load movies and targeting correct timeline??? tgelston ActionScript 1.0 (and below) 2 08-02-2002 01:16 AM


All times are GMT. The time now is 01:09 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.