Populate tilelist images from a mysql database

edua91 used Ask the Experts™
I am creating a simpl app that display images and its titles in a tilelist, the url of the images an the title are stored on a mysql database, to which i enter using a php file. The problem is that when i run the app, the tiles are created, it does show the tiltle of the image, but it doesnt load the image, i already trace the source in order to see if it is the correct url, and it actually is rigth so i dont know what it is no displaying, i hope you could help me

The following code corresponds to the follogin stuff:

The main application code ( on wich i added a component that has the tilelist)

The component code

The itemRenderer code for each tile in the tilelist
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="windowedapplication1_creationCompleteHandler(event)" layout="absolute" borderColor="#FFAA05" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FCFF00, #FFC000]" height="364" xmlns:components="components.*" xmlns:getinfo="services.getinfo.*">
			import mx.collections.ArrayCollection;
			import mx.rpc.events.ResultEvent;
			import mx.events.FlexEvent;
			protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
				getAllImgsResult.token = getInfo.getAllImgs();
			protected function getAllImgsResult_resultHandler(event:ResultEvent):void
				ac=event.result as ArrayCollection
	<components:tiles id="cuadros" x="221" y="37">
	<mx:CallResponder id="getAllImgsResult" result="getAllImgsResult_resultHandler(event)"/>
	<getinfo:GetInfo id="getInfo" destination="getInfo" endpoint="http://localhost/admin_beta-debug/gateway.php" fault="Alert.show(event.fault.faultString)" showBusyCursor="true" source="getInfo"/>
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" xmlns:getinfo="services.getinfo.*">
	<mx:TileList width="100%" height="100%" id="tl" itemRenderer="components.tile"></mx:TileList>
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="90" height="80">
	<mx:VBox x="0.6" y="0.2" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" backgroundAlpha="0.0">
		<mx:Label width="35" height="14.808125" id="nombre" text="{data.id}"/>
		<mx:Image width="70.993225" height="55.417603" id="img" source="{data.url}" scaleContent="true"/>

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Are the images on your own server or someone else's? You might have a cross-domain problem here.


the images are in my web server, like this image
the database is on a local server



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial