-
1. Re: dynamicMovieClip into a SP
kglad May 23, 2012 7:40 AM (in response to Ron Colmen)you can't reparent objects in as2 so you'll either need to use as3 or fake it (eg, add a copy of your movieclip to your scrollpane)
-
2. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 8:11 AM (in response to kglad)Thanks for your reply.
Do you mean to use duplcateMovieClip() to create a copy? But still you'd need a linkage ID to attach it to a scrollPane?
-
3. Re: dynamicMovieClip into a SP
kglad May 23, 2012 8:30 AM (in response to Ron Colmen)assign your on-stage movieclip a linkage id.
-
4. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 8:40 AM (in response to kglad)Thank you again.
I gave an linkageID by right click > properties. Then I dragged it on to the stage and gave an instance name. All updates take effect inside this mc.
then I used ScrollPane.contentPath ="linkageIDname"
it doesn't show the updates though?
-
5. Re: dynamicMovieClip into a SP
kglad May 23, 2012 9:55 AM (in response to Ron Colmen)correct.
they are not the same instance. ie, your on-stage movieclip is not the same as the one added to your sp.
you'll need to update the sp's instance (using the sp.content property) and you'll need to remove your on-stage instance when you want to make it appear as if you're reparenting the on-stage movieclip.
-
6. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 10:13 AM (in response to kglad)Thanks.
I did this; but did not show the updated version. What went wrong?
StudentsAttendance_mc._name="StudentsAttendance_mcX";
sp.contentPath = "sp_tapeCon";
var sp_tapeCon:MovieClip = sp.content;
sp.invalidate();
-
7. Re: dynamicMovieClip into a SP
kglad May 23, 2012 10:25 AM (in response to Ron Colmen)on frame 11 of StudentsAttendance_mc, you should have:
_parent.addToSP();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
then on the parent timeline you should have
function addToSP():Void{
sp.contentPath="studentattendancelinkageid";
sp.content.gotoAndStop(11);
}
-
8. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 10:46 AM (in response to kglad)Thank you.
inside StudentsAttendance_mc on frame 11
_parent.addToSP();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
On the main timeline
function addToSP():Void{
sp.contentPath="sp_tapeCon";
sp.content.gotoAndStop(11);
sp.setStyle("backgroundColor" , "transparent");
sp.setStyle("borderStyle" , "none");
}
The scrollPane is empty.?
-
9. Re: dynamicMovieClip into a SP
kglad May 23, 2012 11:16 AM (in response to Ron Colmen)use the trace() function to make sure the frame 11 is playing and addToSP() is being called.
-
10. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 11:27 AM (in response to kglad)Yep, it's not calling addToSP()
_parent.addToSP();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
trace ("noProblem!!"); // not showing this
?
-
11. Re: dynamicMovieClip into a SP
kglad May 23, 2012 11:53 AM (in response to Ron Colmen)use:
trace ("noProblem!!"); // not showing this
_parent.addToSP();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
-
12. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 1:40 PM (in response to kglad)it's the same... the SP is blank and the trace is not showing.
-
13. Re: dynamicMovieClip into a SP
kglad May 23, 2012 3:06 PM (in response to Ron Colmen)then that frame is not being played.
-
14. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 7:52 PM (in response to kglad)Thank you.
I don't understand why isn't it going to frame 11 in StudentsAttendance_mc
-
15. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 8:17 PM (in response to Ron Colmen)ok evebn if I send it to frame 11 still this isn't working.
is something wrong in _parent.addToSP(); or function addToSP():Void{
-
16. Re: dynamicMovieClip into a SP
kglad May 23, 2012 10:37 PM (in response to Ron Colmen)use the trace() function to confirm frame 11 is executing and, if it is, to also confirm addToSP() is executing.
-
17. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 10:40 PM (in response to kglad)Thanks.
The problem now is that the removeMovieClip is not removing StudentsAttendance_mc from the stage.
-
18. Re: dynamicMovieClip into a SP
Ron Colmen May 23, 2012 10:41 PM (in response to Ron Colmen)I even tried using a button to remove StudentsAttendance_mc from the stage. But can't remove it???
-
19. Re: dynamicMovieClip into a SP
kglad May 24, 2012 4:54 PM (in response to Ron Colmen)use the trace function to debug:
trace(this._parent.getNextHighestDepth()); // if that's undefined, you're not publishing for fp less than 8. either change or manually control depths.
_parent.addToSP();
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();



