Forums/Announcements

Using CU3ER in your Flash/Flex projects - CU3ER AS3 API

Alex
posted this on October 11, 2010 17:09

Recently we've added support for loading and controlling CU3ER from your Flash movie. 
In this post we are providing a ZIP package containing an example how you can load and control your CU3ER from Flash file.
This example is made in Flash CS4, but using code from Actionscript file as3_load_example.as you can easily use it in your Flex project as a AS project or inside Flex framework.

CU3ER SWF API supports following functionalities.

Functions:

  • next - goes to next slide
  • prev - goes to previous slide
  • playCU3ER - plays paused CU3ER
  • pauseCU3ER - pauses CU3ER
  • skipTo(slideNo) - transitions CU3ER slideshow to specified slide number 

Events:

  • onSlide - event that is triggered when slide is shown, returning current slide number
  • onTransition - event that is triggered when transition begins, returning value of current transition number
  • onLoadComplete(slidesOrder) - event that is triggered once the CU3ER slideshow is loaded and starts playing first slide. It also returns slides order separated by | character, useful in case you are randomizing slide order.

Please note that

  • if you would like to remove CU3ER from your movie it will probably cause some memory leaks. We still have not build functionality to remove all events and display objects using only one function. Thus, we are advising including CU3ER in your Flash movies only if you do not want to unload it later.
  • your Flash file that loads CU3ER needs to target Flash Player 10, because CU3ER SWF file is build for Flash Player 10

If you have any questions regarding Flash/Flex and CU3ER integration please post your questions here.

 

Comments

User photo
stan.ok
FREE

don`t work www.***.com, andnormal work http://***.com

September 24, 2011 10:43
User photo
Alex
CU3ER Support

for slider to work with www. and without www you need crossdomain.xml if you use absolute paths

in this article there is a part about crossdomain.xml and instructions how to set it up
http://docs.getcu3er.com/cmanager/image-library


thanks

November 21, 2011 10:36