cancel
Showing results for 
Search instead for 
Did you mean: 

Reload swf file dynamically in FlashIsland view

Former Member
0 Kudos

Hi Experts,

My application consists of two views.

1. MAIN

2. V_Dashboard

MAIN view contains two buttons and one ViewContainerUIElement. V_Dashboard view is a flashisland view which contains a flash file. I want to display V_Dashboard in ViewContainerUIElement when user clicks on the buttons. The content in flash is different according to the button clicked by user. When user click on the button, all the content and combox default value need to be reset. I tried to use inbound plug with paramters in V_Dashboard view to distinguish which button is clicked. I can reset the conent in the flash. However, the default value of combox is not reset. The WDDOINIT event of view is not invoked. I have to add code in the inbound plug handle event.

Is there any public method provided by FlashIsland (server side) that can be used to reload the flash? Otherwise, I have to write actionscripts to reset all controls. And I have to create contexts to let the flash know what default value should be set to combox.

Please note, I have 10 flashes in my application. If there is a simple way, it's no need to write extra code to reset the flash.

thanks & regards,

Johnny

Edited by: Rong Zhuang on Jul 2, 2010 11:54 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is no functionality in the APIs to reset the Island and reload the SWF. My recomendation is that you would place each SWF in a separate View. Set the view lifetime property to When Visible. Then fire navigation plugs to swap which view is displayed in a viewContainerUIElement. The swaping of the views will destroy/release the current view when it swithes to a newly visible one. The WDDOINIT of each view will fire when reloaded and the SWF will load new on the client side.

Former Member
0 Kudos

Hi Thomas,

Thanks for your reply. The approach that placing each swf in a separate view does work. The only problem is that I have to modify the WD(context, code) twice/or more times if there are some changes. When creating the second view, I would copy the original one. Anyway, this is the executable way to build my application, even if it's not perfect as I wish. Thanks!

Regards,

Johnny

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>When creating the second view, I would copy the original one.

Perhaps you should consider if you really must copy the context or if you just should place it in the component controller or a custom controller and map it to each view.

Former Member
0 Kudos

Actually, I have already placed all the context in the component controller. But there are lots of datasources, properties, events are defined in the FlashIsland view. Suppose I have added a button in the flash, then I need to create an event in FlashIsland for it. The problem is I have to do the same thing for other views. This is the critical situation I want to avoid, but...

I have 4 years experience on .NET technology. I was able to control almost everything I want in ASP.NET. However, it's really weak to support the developer to control events, properties in WD. Generally, I have to write more codes, spend more efforts to achieve the objective. Even thus, sometimes I cannot get the required result. It's really painful.

Thanks anyway for your reply. I have got the hope from you.

Regards,

Johnny