Tracking dynamically created symbols using Adobe SiteCatalyst Extension for Flash Pro CS5 is not as simple as a single click
The solution is to add tracking on a nearby symbol and then change a few properties of the generated tracking code to fit your needs
In order to track dynamically created symbols using the Adobe SiteCatalyst Extension for Flash Pro CS5 you need to study a bit the way your dynamic symbols are created.
Normally the symbols are defined in the library but not present on the stage. They are afterwards dynamically added to (created on) the stage at runtime. Because this symbols are not visible on the design view adding tracking on those symbols is a bit cumbersome.
You have to do the following:
linkUrl,
linkName and
pageName adding the current symbol name, label, etc
Here is an example (see the attached FLAs): You have a FLA file that dynamically generates some movie clips (or buttons) and you need to track click on those buttons.
Following the steps above you do the next steps:
From this:
var cyanBall_tracker1:TrackerBase = new TrackerBase(); cyanBall_tracker1.service = SCGlobals.services["serviceBase"]; cyanBall_tracker1.target = cyanBall; cyanBall_tracker1.targetEvent = "click"; cyanBall_tracker1.type = "linkCustom"; cyanBall_tracker1.linkUrl = "recipe_start::cyanBall"; cyanBall_tracker1.linkName = "recipe_start::cyanBall"; cyanBall_tracker1.pageName = "recipe_start::cyanBall";
You should change it into this:
var cyanBall_tracker1:TrackerBase = new TrackerBase(); cyanBall_tracker1.service = SCGlobals.services["serviceBase"]; cyanBall_tracker1.target = this; cyanBall_tracker1.targetEvent = "click"; cyanBall_tracker1.type = "linkCustom"; cyanBall_tracker1.linkUrl = "recipe1::"+myText.text; cyanBall_tracker1.linkName = "recipe1::"+myText.text; cyanBall_tracker1.pageName = "recipe1::"+myText.text;
You should have already selected the "Enable Debugging" before making the changes above because any change into the SiteCatalyst Panel will regenerate the code making it like it was before changes above.
Now Test the movie (CTRL+Enter) and click on the rectangle buttons to see the calls in Output Panel if the "Enable debugging" checkbox is checked.
For a better understanding please download the files bellow and take a look into the changes:
+