Creative Flash Scroller Forum


box Creative Flash Scroller
With Creative Flash Scroller you can scroll any kind of Flash Content: static text, dynamic text, pictures, animations, movies. It comes with multiple scroll behaviors: touch scroll, mouse gesture scroll, scrollbar scroll and even supports mouse wheel behavior. You can add smooth scrolling or motion blur effects and customize it to suit your design, from an easy to use interface.

Find out more about Creative Flash Scroller

Thread: Use with AS3 and external document class

title left
User Details
message
title right

post date:
2011-08-15 07:24:04
Good morning,

We are currently evaluating your component for integration into our project.

We are coding everything in the document class ( Main.as ) and not in the action panel. We have tried using your AS3 example but it is not working, can you please help?

We have an image gallery that is dynamically created via XML. We have added the Creative Scroll Area AS3 and Creative Scrollbar Horizontal AS3 to the library. We are now stuck on the next steps.

If I do a copy/paste of your AS3 example at (http://www.extendstudio.com/documentation/creative-flash-scrollerAS3/documentation/tutorials/how-to-use-with-actionscript.html) inside a private function I get the following error: Call to a possibly undefined method getDefinitionByName.

we have tried several ways to get it to work but with no success. Can you please help unlock this issue.

regards

Burt


post date:
2011-08-15 07:48:31
OK solved the getDefinitionByName issue.

Simply had to import the appropriate package into Flash. In this case:

import flash.utils.getDefinitionByName;


post date:
2011-08-15 08:50:50
Another issue:


we have created a movie clip as follows:

_mediaContainer = new MovieClip();
...
...
addChild(_mediaContainer);

this movie clip is then populated with images from an xml file.

when all the images have been loaded then we call your component as follows:

var scrollAreaClass : Class = getDefinitionByName("xtd.scroller.ui.ScrollerBase") as Class;
var scrollObj : Object = new scrollAreaClass();
scrollObj._targetInstanceName = "_mediaContainer";
scrollObj.targetType = scrollAreaClass.STAGE_TARGET;
scrollObj.baseWidth = 250;
scrollObj.baseHeight = 250;
scrollObj.scrollBehavior = "Touch Scroll";
scrollObj.x = 150;
scrollObj.y = 75;
scrollObj.name = "myScroll";
scrollObj.smooth= true;
this.addChild(DisplayObject(scrollObj));

var hscrollbarClass : Class = getDefinitionByName("xtd.scroller.ui.ScrollBar") as Class;
var hscrollbar : Object = new hscrollbarClass();
hscrollbar.scroller = scrollObj;
hscrollbar.skinColor1 = "0xFF0000";
hscrollbar.skinColor2 = "0xFFCC00";
hscrollbar.orientation = "Horizontal";
hscrollbar.autoPos = true;
this.addChild(DisplayObject(hscrollbar));


but we get this error:

Scroll Area Warning: Stage target could not be found.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at xtd.scroller.ui::ScrollBar/draw()
at fl.core::UIComponent/callLaterDispatcher()


Can you please assist?

kind regards

Burt

post date:
2011-08-16 06:04:24
OK solved that one too.
Andrei Rinciog [Extend Studio]

post date:
2011-08-16 10:37:07
Hello,

Sorry for no replies, we had a day off yesterday because of a national holiday.

If you have any more questions or need assistance with anything just let me know.

Regards,
Andrei Rinciog