Update: Flickr officially supports embedded slideshows.ĭig those flash Flickr slideshows? All that's needed is a bit of code to embed them within your website to give your readers something dynamic. The bezierJump function is called repeatedly to jump the camera from one photo to the next.HOW TO Quickie: Embedded Flickr Slideshows In this way we can dynamically update the 3D photos being displayed with multiple calls to the flickrSearch function when the user does a search from the main GUI. This in turn changes the image that is displayed on the planes within the 3D scene. The only difference is that as the images are loaded from Flickr their BitmapData is assigned to the bitmap property of the BitmapMaterial objects stored in the textures collection. load ( new URLRequest ( imageURL )) īoth these functions are taken almost line for line from Build a Photo Viewer Using Flex and the Flickr API. getItemAt ( loadedTextures ) as BitmapMaterial Protected function onPhotosSearch ( event : FlickrResultEvent ): voidįor each ( var photo : Photo in event. search ( "", search, " any ", "", null, null, null, null, - 1, "", MAX_RESULTS, 1 ) ![]() Var service : FlickrService = new FlickrService ( API_KEY ) Public function flickrSearch ( search : String ): void To work around this limitation the SpriteUIComponent extends the UIComponent class, and then adds a Sprite as its own child. This is because only classes extending the UIComponent class can be added a child controls of a Flex application. Even though the addChildAt function will accept a Sprite, an exception will be raised at runtime. These template classes themselves extend the Flex Sprite class. Notice that we actually pass an instance of a class called SpriteUIComponent to the addChildAt function.Īs you will see in later steps, the ApplicationManager extends one of the template classes from the Awa圓D Lite API. It is here that we create a new instance of the ApplicationManager class and add it as a child control. This function is called when the Flex application has loaded and initialized. addChildAt ( new SpriteUIComponent ( applicationManager ), 0 ) Step 6: Create a New ProjectĬreate a new Flex project, and add the Awa圓D Lite, TweenMax, AS3Flickr and AS3CoreLib libraries to the Flex Build Path.ĪpplicationManager = new ApplicationManager () You can find details about these libraries from the articleīuild a Photo Viewer Using Flex and the Flickr API. The AS3Flickr and AS3CoreLib libraries are used to contact the Flickr web service. Again, download and extract the library to a convenient location. The movement of the camera within the 3D photo gallery will be performed using the Greensock TweenMax library, which you can get from this page here. Step 4: Get the Greensock TweenMax Library Download and extract the engine source code to a convenient location. You can download a copy of Awa圓D Lite 1.0 for free from this web page here. ![]() While Awa圓D Lite lacks some of the eye candy present in the more complicated 3D engines, its focus on simplicity means that it is perfect for a simple application like a 3D photo album. Awa圓D is one of the more popular free Flash 3D engines, and recently a smaller, faster version of Awa圓D was released called Awa圓D Lite. It has gone from being an animation tool to a general purpose development platform for games, business applications, 3D visualizations, video players and more.ģD engines have evolved alongside Flash for some time, going from a curiosity to now being fully featured and even commercial libraries. The widespread deployment of the Flash runtime, both with Adobe AIR and browser plugins, along with the performance increase in later versions, means Flash has a very diverse ecosystem of libraries and applications. The Flash runtime has made some impressive progress over the last few years. I highly recommend you read that tutorial if you are not familiar with the AS3Flickr library, as these points will only be briefly mentioned in this tutorial. This process is covered in depth by a previous tutorial which you can find here. The images themselves are downloaded and saved/displayed.The results are used to find the URL of the Flickr images.The Flickr cross domain policy files are loaded to allow Flex to access images from remote domains.The AS3Flickr and AS3CoreLib ActionScript libraries are downloaded and referenced from Flex Builder.Briefly, the process of downloading photos from Flickr is as follows: This application will retrieve photos from Flickr to be displayed within a 3D space.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |