-
[RESOLVED] Component conflict with external swf
Hi all,
I have a main swf that loads external swf. The main swf has a ScrollPane component. One of the external swf's contains a Combobox component. There seems to be a conflict between the Scrollpane components in the main movie library and the Combobox components library in the external movieclip. I did the following test:
I deleted all the code from the main movie clip, except for loading the external movieclip. I left the library intact. When I compile the main swf the external swf loads correctly but the dropdown box of the Combobox in external swf does not work. When I delete the Component Assets folder in the main swf, then the Combobox of external swf works correctly.
This however is a problem since I need the Component Assets in the main swf to control the Scrollbar component in the main swf.
Any ideas how to resolve this? Below is how I load the external swf:
import com.greensock.*;
import com.greensock.events.*;
import com.greensock.loading.*;
import com.greensock.loading.display.*;
var loader:SWFLoader = new SWFLoader("dropdown3.swf", {name:"mainSWF", container:this, x:50, y:100 });
loader.load();
-
I have finally resolved the issue. All that is need is to drag a Combobox component to the stage of the main swf and then delete it. This would add additional assets to main library.
-
.
HI,
You can do it without having any component items in your dropdown3.swf library at all, or on stage.
They need to be in main.swf library though of course.
main.swf
PHP Code:
import com.greensock.*;
import com.greensock.events.*;
import com.greensock.loading.*;
import com.greensock.loading.display.*;
var loader:SWFLoader = new SWFLoader("dropdown3.swf", {name:"mainSWF", container:this, x:50, y:100 });
loader.load();
dropdown3.swf
PHP Code:
import flash.utils.getDefinitionByName;
var newComboClass:Class;
var comboBox:Sprite;
if (parent.parent)
{
newComboClass = getDefinitionByName("fl.controls.ComboBox") as Class;
comboBox = new newComboClass();
addChild(comboBox);
with (comboBox)
{
x = 100;
y = 100;
prompt = 'Things';
addItem({label:"A",Age:30,Gender:"Male"});
addItem({label:"B",Age:35,Gender:"Female"});
addItem({label:"C",Age:40,Gender:"Male"});
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|