Adding Content to Flow List Component: Through ActionScript
Updated: Jan 4, 2008
Views: 1126
Description: This tutorial will show you how to use ActionScript inside of flash to load images into the Flow List AS3.0 Component.
Complete Code:
import fl.data.DataProvider;
var dp:DataProvider = new DataProvider();
dp.addItem({path:"image1.jpg"});
dp.addItem({path:"image2.jpg"});
myFlow.content = dp;
var dp:DataProvider = new DataProvider();
dp.addItem({path:"image1.jpg"});
dp.addItem({path:"image2.jpg"});
myFlow.content = dp;
Creating the Data Provider
Next inside of function, we need to create our data provider this is where we add all our items to.
var dp:DataProvider = new DataProvider();
Adding Images to Data Provider
All you need to do here is insert the path to your image.
dp.addItem({path:"example.jpg"});
Other Tutorials
