Getting the course title into a .swf slide

I'm creating a swf certificate at the end of a course and I want to have the title dynamically generated

I found part of the code below in another post but I can't get the AS to work:

var presData = ArtAPI GetPresentationData();

var presTitle = presData BuiltinProperties[0] Title[0] _value;

var ArtAPI = _level0 ArtAPI;

CourseTitle text = ArtAPI presTitle();

I'm not the best coder so I know I'm doing something wrong Please Help Thanks

2 Replies
onEnterFrame (James Kingsley)

Haven't tested this but by looking at your code is seems it's in the wrong order

You should set ArtAPI first:

var ArtAPI = _level0 ArtAPI;

var presData = ArtAPI GetPresentationData();

var presTitle = presData BuiltinProperties[0] Title[0] _value;

CourseTitle text = ArtAPI presTitle();

Mark Cairns

Thanks James! That definitely helped

Here's what ended up working

//Get Course Title

var ArtAPI = _level0 ArtAPI;

var presData = ArtAPI GetPresentationData();

var presTitle = presData BuiltinProperties[0] Title[0] _value;

// Display the Course Title in a dynamic text field

CourseTitle text = presTitle;