Giter Club home page Giter Club logo

engagement_api's Introduction

Requirements
-----------
Flash Builder 4 or better, or Flash Professional CS4 or better.
Must use AS3.

Files Provided
--------------
- engagement_api.swc
This file will setup code hinting and load the SocialVibe Engagement API.

- EngagementExample.as
This is an example engagement using the SocialVibe Engagement API.

- AS3_FLA/
This folder contains an example of using Flash CS5 to create an engagement using the Engagement API.

- AS3_FLA_Timeline/
This folder contains an example of creating an timeline based engagement using Flash CS5 with the Engagement API.

Documentation
-------------
http://stash.socialvi.be/asdocs/com/socialvibe/engagement/EngagementAPI.html

Environment Setup (in flash builder)
-----------------
1) Download engagement_api.swc from this GitHub project and place it somewhere you can find it later (typically in a 'lib' folder in your Flash project).
2) In Flash Builder, open your existing AS3 project or create a new one.
3) Go to Project->Properties->Actionscript Build Path
4) Under the 'Library Path' tab, click on 'Add SWC...'
5) Find the engagement_api.swc and add it.
6) You should now be able to instantiate and use com.socialvibe.engagement.api.SocialVibeProxy in your Flash project.

Using a FLA
-----------
1) Make sure you have downloaded engagement_api.swc as above.
2) In your .fla environment, goto File->Publish settings...->'Flash' (on top)->'Settings...'
3) Pick 'Library path' on the bottom bar.
4) Then click on the 'F' button for SWC file addition.
5) Then navigate to engagement_api.swc, and click on ok.

API Usage
-----------
The 'engagement_api.swc' in the lib folder, is a file which you will add to your library, and give you access to a class called 'SocialVibeProxy()'.  This proxy class gives you access to SocialVibe's engagement API.  When your engagement is running outside of SocialVibe's engagement environment, the proxy will run in 'unconnected mode'.  In this mode calls to the API will simply output trace statements and return placeholder values when necessary since it doesn't have an instance of the API to proxy calls to.

Once you instantiate the SocialVibeProxy() class, you will have several calls at your disposal for purpose of saving data, tracking interactions, and various API functionality.  You should instantiate the SocialVibeProxy class as soon as possible (preferably in your constructor) to ensure we record the full amount of time spent on your engagement.


Required API Calls
------------------
- SocialVibeProxy::engage()
Make this call to signal the completion event for the engagement.  The completion event tells our system to grant the user the appropriate user benefit (i.e. Farm Cash on FarmVille) 

- SocialVibeProxy::endEngage()
Make this call after the engage() call at the point the engagement has ended and to show the user a 'congrats & share screen'.


Testing
-------
Test your engagement SWF within our engagement container using this test page:
http://socialvibe.github.com/engagement_api/test.html

1) Setup - Enter any setup data you need (all this data is optional)
2) Load - Upload the SWF you've built using the engagement API
3) Run - Your SWF will be loaded into our engagement container as it would in our live system.  As you run through the engagement, some debugging info will be output at the bottom.


Notes
--------------
- If you use external SWFs or Files make sure your crossdomain.xml is setup to handle *.socialvibe.com, *.socialvi.be, and *.svnetwork.com.
- If you are using Greensock's Tweening Platform, please use v11 release (http://www.greensock.com/v11/).

engagement_api's People

Contributors

countzen2000 avatar

Stargazers

Coty Hsu avatar

Watchers

 avatar Joshua Rangsikitpho avatar Marat Atayev avatar Leon Waldman avatar Aaron Stein avatar Michael V Harding avatar Jesse Albini avatar  avatar Jason Daniel avatar  avatar Travis Johnson avatar Reza Qorbani avatar James Cloos avatar Simon Asselin avatar Coty Hsu avatar david harrison avatar Mauricio Salles avatar Michael Anghelone avatar Anthony Rankin avatar Rodolfo Rodrigues avatar  avatar Mimi Chiang avatar Isaiah Mann avatar Zachary Martin avatar Nathan Canning avatar  avatar Rich Devine avatar Kevin Ponce avatar Ruan avatar  avatar Yaroslav avatar  avatar Daniel Ramirez avatar  avatar Ryan Bowdre avatar Coelho avatar  avatar

Forkers

chihwei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.