user1322429
user1322429

Reputation: 13

DoubleClick Studio V2 AS3

Hello Stack Overflow community,

I am using Google's DoubleClick Studio Version 2 AS3.

I am using Flash CS5.5.

I've read through DoubleClicks' material on how to build a banner ad using Rich Media, in other words, using video.

I have a parent swf and a child swf. The parent loads the child swf after the webpage is finished loading.

My child swf is organized as such: Scene 1 with Layer 1. Layer 1 has a MovieClip on the stage that contains all my banner elements (Video player, video player buttons, text, background, an image, and CTA button again these are using DoubleClick Studio components). This MovieClip has an instance name of "Spread_1". This MovieClip contains the Video player Advanced Component.

I understand the Video Player Advanced component. I understand what to place in the component inspector with one exception, when I'm in "Video end options" I have three radio button options plus a fourth option that calls a function. In the textfield I placed this function "lastframe()"

In an actions layer I placed the code to the function that's called by the Video Player Advanced Component. The code to the function is this:

**function lastFrame(){
    gotoAndStop(2, "Spread_1")
}**

This function is located in the first frame of the MovieClip "Spread_1". My intent is when the video has stopped playing I want to go to frame 2.

When I test the banner I get this output:

**[0.01] Enabler: Simulating page load.
[2.08] Enabler: Page loaded.
[2.45] Enabler: Video event for: 'cakePlayer': EVENT_VIDEO_PLAY
[2.45] Enabler: Video event for: 'cakePlayer': EVENT_VIDEO_VIEW_TIMER
[7.54] Enabler: Video event for: 'cakePlayer': EVENT_VIDEO_MIDPOINT
[12.83] Enabler: Video event for: 'cakePlayer': EVENT_VIDEO_COMPLETE
[12.83] Enabler: Video event for: 'cakePlayer': EVENT_VIDEO_VIEW_TIMER
ArgumentError: Error #2108: Scene Spread_1 was not found.
    at flash.display::MovieClip/gotoAndStop()
    at H100_fla::Spread_1_1/lastFrame()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at com.google.ads.studio.utils::FunctionUtils$/invokeStringAsFunction()
    at MethodInfo-37()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at com.google.ads.studio.video::EnhancedVideoController/completeHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.google.ads.studio.video::VideoEventDispatcher/dispatch()
    at com.google.ads.studio.video::VideoEventDispatcher/monitorPlayHead()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()**

I don't understand the error and I'm a relative novice at Using DoubleClick Studio Version2 AS3.

Thank you for any help, it's greatly appreciated.

Upvotes: 0

Views: 1913

Answers (1)

40kilobytes
40kilobytes

Reputation: 1

The second parameter of the gotoAndStop function is for the scene name but you're passing the name of the movieclip instead.

ArgumentError: Error #2108: Scene Spread_1 was not found. 

Try this if you want to go on frame 2 of the main timeline:

function lastFrame(){ 
    gotoAndStop(2)
}

or this if you want to go on frame 2 in Spread_1 mc

function lastFrame(){
    Spread_1.gotoAndStop(2);
}

You don't need to send the scene name as parameter if you've got only one.

Upvotes: 0

Related Questions