google doubleclick studio. video component - actionscript-3

im bulding a flash banner where I'm using the components that double-click studio offers for free use in rich media banners.
Im the VideoPlayerAdvanced.
API documentatio here: http://www.google.com/doubleclick/studio/docs/sdk/flash/as3/en/com_google_ads_studio_video_VideoPlayerAdvanced.html
My question is how i dynamically can add a video player like the to the stage by addChild() or something like that. I also want to be able to set the urls for the player to play by code. That part seems quite straight forwards. But i can't figure out how to create an instance of the player dynamically by code.
Anyone that knows this?
Thanks!

Solved it by adding the component itself to a container movie clip and exported it with a classname for action script.
var video:Video = new Video();
addChild(video);
"video" holding the component.

Related

Seekbar for mp3 player in Actionscript 3.0 Flash CS-6

I'm trying to create a music player in Flash CS6. I'm new to Flash. I have created the play/pause/volume buttons. I have also been able to extract the mp3 information using the id3 tags. So i have the song duration. I now need to create a seekbar/progress bar. I have taken the progress bar from the components, but do not understand how to code it now. Please help!
According to the reference on Sound.play():
public function play(startTime:Number = 0, loops:int = 0, sndTransform:flash.media:SoundTransform = null):SoundChannel
where the first argument is
startTime:Number (default = 0)//The initial position in milliseconds at which playback should start.
so you can call
channel.stop();
channel = sound.play(offset);
There is an example in the reference. Hope this helps.
You can get some idea using my audio player on my Github page.Also it's developed using flash CS6 and ActionScript 3.0. Use it, change it and develop your future with ActionScript .

FLVPlayback without Flash CS

I'm implementing Google video Ads in flash game, using FlashDevelop. Google has a sample where they're using FLVPlayback component to display video... problem is, I don't have this class anywhere.
I've searched how to add it, but all solutions say "link to C:\Adobe\Flash CS\Components\etc" path, which obiouvsly without Flash CS I don't have... and don't want to install it just for this :)
I wonder if there is a way to get the FLVPlayback without installing Flash CS?
You can try import external adobe components swc through Flashdevelop interface.
Maybe this can help you: link
I quit and just installed the Flash Professional CC, and there linked to the component path, but it didn't work for some reason. Then I included the FLVPlayback.swf component inside my AS3 app, which compiled etc. but as I learned FLVPlayback wasn't really what I needed.
After some fumbling I made it work with Flex Spark component - VideoPlayer, used inside AS3. You can find some code on the devlist: https://developers.google.com/interactive-media-ads/community?place=msg%2Fima-sdk%2Fc3KH11vxSd0%2FeLuYneYpch4J

Want a Animation

My project is based on Adobe AIR/Actionscript Project and it's a small desktop application. I opened a popup using PopupManager Class. So here is code.
var _dataviewPopup = new dataviewPopup();
/* PopUpManager.addPopUp(_dataviewPopup , FlexGlobals.topLevelApplication as DisplayObject, true);
PopUpManager.centerPopUp(_dataviewPopup);
and I remove popup using
PopupManager.removePopUp(_dataviewPopup);
So I want to give some animation to this popup when it appears and disappears, is it possible?
Is there any library available for it?
Have a look at this tutorial to see how you can use the NativeWindow class to animate new windows.
Hope it helps
http://blog.flashdesign-store.com/?p=128

Issue loading AS2 .swf that uses XML into AS3 .fla

I'm making a website for a client where they purchased a flash template that was written in "AS 1.0 & AS 2.0" and then asked me to add a googlemap to the contact us page. However, the googlemap API only works in AS3. My options were to translate the entire website to AS3 OR to make an AS3 file that imported the AS2 website and then added the googlemap bit.
I decided to go with option 2 since it seemed easier...
Anyway, I'm using the Loader class in the AS3 file.
var myLoader:Loader = new Loader(); // create a new instance of the Loader class
var url:URLRequest = new URLRequest("main_v8.swf"); // in this case both SWFs are in the same folder
myLoader.load(url); // load the SWF file
addChild(myLoader);
The problem is the AS2 swf file uses XML to load the background images. It works on its own but when loaded into the AS3 file the background images do not appear. All the buttons and external links work, its just the loading of the XML.
I've been looking all over for help on this and while there are lots of people with issues playing AS2 swf in AS3 I couldn't find anything to help with this.
Any advise or solutions would be appreciated!
Thanks!
Havent face such a problem but, if you find out the problem you ca solve it. You can check some conditions:
check network for , does xml loaded. (might be crossdomain problem)
check if images loaded. ( as3 security problem)
check as2 file really inits. ( you can use as3 bridge to as2)

AS3 - how to start all over again a flash movie

This may be very simple, but I have no idea how to do this.
I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?
Appreaciate it.
L.
call flash player container
usually the HTML page and use JavaScript to reload the flash player
flash.external.ExternalInterface.call(jsFuncRestart);
jsFuncRestart is a JavaScript function in the HTML file
and now in the js function just create a new object and replace the current flash object
with the new one
You probably animate everything with as3, right? Then just make a reset function that puts all the images back to their original place and start the animation all over.