Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-16-2005, 03:21 PM   #1
euclidian
Registered User
 
Join Date: May 2005
Posts: 13
Default ScrollPane weirdness

Hi,
After much painful messing around I've managed to get a scroll pane working with 11 dynamically attached MovieClips. The problem is that only the first and the last movieclips attached are showing. my code is as follows

ActionScript Code:
this.attachMovie("ScrollPane", "cellInfo_sp", getNextHighestDepth(), {_x:20, _y:215}); this.cellInfo_sp.setSize(240, 145); this.cellInfo_sp.contentPath = "cellCanvas";         myCanvas = this.cellInfo_sp.content; myCanvas.attachMovie("cellInfoHeader", "cellHeader", this.cellInfo_sp.content.getNextHighestDepth()); //, {_x:20, _y:215}); //this.cellInfo_sp.setStyle("borderStyle", "none"); //myCanvas["cellHeader"]._visible = false; for (var i=0; i<10; i++) {     myCanvas.attachMovie("cellInfoRow", "cellRow"+i, getNextHighestDepth()); //, {_y:(i*20)+20});     myCanvas["cellRow"+i]._x = 1;     myCanvas["cellRow"+i]._y = (i*20)+20;     //this.cellInfo_sp["cellRow"+i]._visible = false;     trace(myCanvas["cellRow"+i]); } trace(" "); for (var i=0; i<10; i++) {     trace(myCanvas["cellRow"+i]); }

the traces from this then appears as follows

ActionScript Code:
_level0.myInfo.cellInfo_sp.spContentHolder.cellRow0 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow1 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow2 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow3 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow4 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow5 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow6 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow7 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow8 _level0.myInfo.cellInfo_sp.spContentHolder.cellRow9   undefined undefined undefined undefined undefined undefined undefined undefined undefined _level0.myInfo.cellInfo_sp.spContentHolder.cellRow9

So its as if each cellRow that I add drops out of scope as soon as the next loop iteration is started?!?! is it not possible to attach more than one instance of the same movieclip to a scrollpane's content or something??
Dont really want to have to do 10 seperate versions of the same movieclip in the library, as what I'm doing needs to stay as small as possible.
Thanks for any enlightenment any of ya can provide :s
Dave
euclidian is offline   Reply With Quote
Old 05-16-2005, 03:47 PM   #2
sleekdigital
I like pizza!
 
Join Date: Feb 2003
Location: PA
Posts: 1,310
Send a message via AIM to sleekdigital Send a message via MSN to sleekdigital Send a message via Yahoo to sleekdigital
Default

My first thought would be your getnexthighest depth call in...

myCanvas.attachMovie("cellInfoRow", "cellRow"+i, getNextHighestDepth());

I believe you need to say ...

myCanvas.getNextHighestDepth()
sleekdigital is offline   Reply With Quote
Old 05-16-2005, 03:50 PM   #3
euclidian
Registered User
 
Join Date: May 2005
Posts: 13
Default

hehe thank you, I'd come to the same conclusion just this second (was looking forward to showing off that I'd solved my own problem too ;( )
Thanks a lot for taking the time though
euclidian 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


All times are GMT. The time now is 11:35 AM.

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