![]() |
issue with slideshow in flex
i am trying to do a slideshow in flex and i am having issues with it. here is what i have so far in the code. i am using SDK 4.5 in flash builder.
Code:
<?xml version="1.0" encoding="utf-8"?>1061: Call to a possibly undefined method load through a reference with static type spark.components:Image the 2 lines i am getting this message are: Code:
img.load("assets/"+pictures[0]); |
Hi there, yeah the console is telling you that the 'load()' method doesn't exist for the image class.
What you should try to do instead is put it in a Loader object and when the image loads, you make the image source the content of the loader: Code:
I hope that helps! -Adam |
i tried that code and it didnt work. could you put up the entire code if you didnt? or maybe give me more directions? thanks.
|
Hi again,
Sorry about that.. I've forgotten how Flex's image control works (that and I wasn't at a FLEX machine before Try something like this: (NOTE: I used the mx version of 'Image' and I make use out of FLEX's data Binding with the imageSource variable this worked for me when I tested it, give it a shot. Code:
<?xml version="1.0" encoding="utf-8"?> |
sorry I am still a little bit of a noob when it comes to flex. what do i need to data bind and how do i set that up?
|
it's in the bottom part of the code. The image's source property is bound to the imageSource property
Code:
source="{imageSource}"Code:
img.source = 'assets/venue1.jpg'; |
it worked. thank you for the help.
|
I got the slideshow to work. Now my next question is; how do you make it fade from image to image? right now one image fades out then the new image fades in with a delay between each image showing the white background each time. I want it to fade from one image to the other without the white of the background showing up.
Code:
<?xml version="1.0" encoding="utf-8"?> |
| All times are GMT +1. The time now is 07:51 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.