PDA

View Full Version : SWSLoader problem


pcbryant
06-29-2006, 08:51 PM
I have been pulling my hair out all day with this one.

I have a page with an SWFLoader in it. The contents of this loader will be changed depending on what I click on in the previous menu. The first time the I click on an item the loader shows fine. Then if I return to the previous screen and click on a different item then the loader does not show. If I go back again and choose the first item it shows it. It is like it is caching it, but I have turned all the caching parameters off for the swfloader.

Please help...

Paerez
06-29-2006, 09:11 PM
post some code. like how you are doing the loading.

pcbryant
06-29-2006, 09:20 PM
I've got an swfloader component:

<mx:SWFLoader x="943" y="8" width="80" height="80" id="mediaPic" autoLoad="false" scaleContent="false" cacheAsBitmap="false" cachePolicy="off"/>

then I am using

mediaPic.load(sUrl); where sUrl is the url which I want to show

i've tried mixing everything up i.e. have autoload is true and just changing the source, setting the source as"" before loading.....

thanks in advance

Paerez
06-29-2006, 09:22 PM
what if you set the source (or loaded) the empty string "" between loads? So when you go to the menu, do a load(""), then when they click, load the clip. So it does "" between every load.

pcbryant
06-29-2006, 09:41 PM
unfortunately not

There must be something that is making it not be able to load anything else but the first item.

i'll keep experimenting

thanks again

traustid
08-27-2008, 10:18 AM
Hi guys. Its a pretty old topic but I have the same problem now, and using Flex 3.
I load rss feed from youtube, when the HTTPService has loaded it I load the first video and the rss xml into a List component. By clicking an item in the List, I want to load the corresponding video into the SWFLoader but that does not work!

Code:

<mx:Script>
<![CDATA[

private function playVideo(url:String):void {
youTubeVideo.load('');
youTubeVideo.load(url);
}

]]>
</mx:Script>
<mx:HTTPService id="rssService" url="http://www.youtube.com/rss/user/gummiski/videos.rss" resultFormat="e4x" result="playVideo(event.result.channel.item[0].enclosure.@url);"/>
<mx:SWFLoader id="youTubeVideo"/>
<mx:List itemClick="playVideo(event.currentTarget.selectedItem.enclosu re.@url)" dataProvider="{rssService.lastResult.channel.item}" labelField="title">
</mx:List>