PDA

View Full Version : Controlling the Timeline within a Scrollpan


stevenewport
04-13-2006, 08:18 PM
I'm trying to figure out how to control the main timeline from within a scrollpane

I have a list of thumbnails inside a scrollpane that, when clicked, I want to gotoAnd(Play/Stop) in the timeline of the maine movie.

I have a main menubar that loads the .swf file with the scrollpane into a loader (Menubar>loaded SWF file>Scrollpane>Button). I want the buttons inside the scrollpane to be able to control that loaded SWF file it resides in.

Right now I have it working with just the file itself by using the actionscript:

this.orange2.onRelease = function() {
orange2.gotoAndStop("_release"); ///// <- for MC animation
_level0.gotoAndStop("a2"); ////// <- to go to frame label "a2" on the main timeline

}


but when I load that file into another swf file it doesn't work, I figure because it's going to level0 of the main movie.


You can see what i mean if you go to test.stevenewport.com > photography > Nature



ANY help would be appreciated, I've searched a lot

mcmcom
04-13-2006, 08:20 PM
change level0 to _root.


_root.gotoAndStop("a2");

stevenewport
04-13-2006, 08:28 PM
thank you for the reply, but I've tried that as well...
It works in the original swf file, but when you load that swf file into another movie, it no longer works...

mcmcom
04-13-2006, 08:34 PM
this._parent.gotoAndStop("a2");

stevenewport
04-13-2006, 08:44 PM
still not working :-/ thanks for the replies btw

This code is being written inside the scrollpane to direct the MC's & BTN's inside it... fyi

mcmcom
04-13-2006, 08:49 PM
do you think its just a pathing problem?
do you understand the concepts of relative pathing in flash, the locations may be this._parent._parent. or this._parent.targetClip, Parent refers to one level up, if your target is three levels up, you need _parent._parent._parent for example.

heres a link:
http://www.learnthat.com/computers/learn.asp?id=2064&index=11

stevenewport
04-13-2006, 09:39 PM
rock&roll

I read the whole thing, did a little more searching on targeting and instead of placing the code inside the scrollpane, I targeted the content of the scrollpane from the main movie using

this.SP.content.orange1.onRelease = function() {
gotoAndStop("a1");
orange1.gotoAndStop("_release");

}


thanks a ton mcmcom, I appreciate it, take care

mcmcom
04-13-2006, 09:40 PM
wicked!