|
User Details |
message
|
|
David Horn
post date:
2011-08-01 16:03:34
|
Hello
I'm using Flash CS5 and AS 3.0
I have created a MovieClip which contains a scroll area, a horizontal scroll bar, and another movieClip called "main_navigation_content"
When I drag this on to the stage and publish, it works perfectly.
However, when I dynamically add this to the stage using code, the scroll area and the horizontal scroll bar cannot find there targets.
I tried to manually set the .target property to main_navigation_content, but it said that it cannot find it.
I also tried to dynamically create the scroll area in the class that adds the main movieClip to the stage, however using the sample code, attachMovie cannot be used in AS3.
Any help would be greatly appreciated.
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2011-08-02 04:37:11
|
Hello David,
Here's the link to the correct tutorial for AS 3:
http://www.extendstudio.com/documentation/creative-flash-scrollerAS3/documentation/tutorials/how-to-use-with-actionscript.html
You receive the error that the component can't find the target that you specify? Have you set the instance name for the target movieclip to be "main_navigation_content"? Also, maybe you need to set the target type for the scroller as Stage target. You can do this like this:
scrollObj.targetType = scrollAreaClass.STAGE_TARGET;
You could try to delay the scroller creation. Maybe it tries to add the target before the target movieclip is created. You could try to use an event that dispatches when the target movieclip is created or you can just move the scroller AS code a couple of frames later.
Regards,
Andrei Rinciog
|
|
|
David Horn
post date:
2011-08-02 09:51:20
|
The AS 3 link you provided worked perfectly.
Thank you.
|
|
|
David Horn
post date:
2011-08-02 10:33:33
|
Actually the dynamic skin isn't being pulled in.
I'm using the following code:
vscrollbar.skin = "smart";
I get the error
Creative Scrollbar Warning: Library item for 'arrow' element could not be found for the current skin
Creative Scrollbar Warning: Library item for 'track' element could not be found for the current skin
Creative Scrollbar Warning: Library item for 'knob' element could not be found for the current skin
It works when I just put it on the stage. I have a folder in the library called "smart" and in that folder I have
btnl_up_smart
btnr_up_smart
knob_up_smart
track_up_smart
all are set to export for actionscript.
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2011-08-03 05:33:05
|
Hello David,
I think you have to check the "export in first frame" checkbox for the movieclips.
Try that and if it still doesn't work, please send me a copy of the FLA by email to support at extendstudio.com.
Regards,
Andrei Rinciog
|
|
|
David Horn
post date:
2011-08-03 09:34:55
|
Actually I stumbled on the answer.
If I'm not mistaken, this isn't anywhere in the documentation
Originally I had the following code:
vscrollbar.skin = "smart";
That's actually not correct.
It works when I change it to the following...
vscrollbar.userSkinName = "smart";
vscrollbar.skin = "custom";
That should probably be mentioned in the link you provided.
Thanks for the quick replies btw.
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2011-08-04 07:10:22
|
Hello David,
Thank you for pointing this out. We will change that in the tutorial asap.
Regards,
Andrei Rinciog
|
|