mymassive
03-06-2008, 07:17 AM
ok, put simply : when I click the freekin button I want to load a swf in the swfloader component..
some code:
as ::
public function loadSWF (filenm : Object) : String
{
var file:String = new String(filenm);
;
return file;
}
array for button(s) data ::
<mx:ArrayCollection id="swfs">
<mx:Object title="Sample Course Template" year="2007" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/swfPlaya.swf"/>
<mx:Object title="dedd" year="2007" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/1.swf"/>
<mx:Object title="Sddlate" year="2008" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/3.swf"/>
</mx:ArrayCollection>
swfloader ::
<mx:Panel x="71" y="283" width="265" height="159" layout="absolute" cornerRadius="0" borderStyle="solid" roundedBottomCorners="true" borderColor="#666666" alpha="1.0" borderThickness="0" backgroundAlpha="0.5" backgroundColor="#23303E" dropShadowColor="#151515" id="previewpanel" dropShadowEnabled="false">
<mx:SWFLoader width="98%" height="98%" source="../visuals/swfs/previewz/brandnew.swf" horizontalCenter="0" verticalCenter="0"/>
</mx:Panel>
button ::
<mx:Repeater id="portfolioRepeater" dataProvider="{swfs}">
<mx:Button id="swfButton" label=""{portfolioRepeater.currentItem.filename}"" name="{portfolioRepeater.currentItem.filename}" width="100%" color="#00D2FF" alpha="1.0" textAlign="left" labelPlacement="left" fillAlphas="[1.0, 1.0]" fillColors="[#622121, #622121]" cornerRadius="0" textRollOverColor="#FFFFFF" textSelectedColor="#FFFFFF" buttonMode="true" click="swfLoader.source=loadSWF(swfButton.Label)"/>
</mx:Repeater>
???? my thought is its duer to the data not coming in as a string , but I cant figure it out.
- im dumb. help me pleeez!!
thnx in advance
some code:
as ::
public function loadSWF (filenm : Object) : String
{
var file:String = new String(filenm);
;
return file;
}
array for button(s) data ::
<mx:ArrayCollection id="swfs">
<mx:Object title="Sample Course Template" year="2007" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/swfPlaya.swf"/>
<mx:Object title="dedd" year="2007" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/1.swf"/>
<mx:Object title="Sddlate" year="2008" company="Applied Materials" filename="../visuals/swfs/appliedMaterials/sampleCourse/3.swf"/>
</mx:ArrayCollection>
swfloader ::
<mx:Panel x="71" y="283" width="265" height="159" layout="absolute" cornerRadius="0" borderStyle="solid" roundedBottomCorners="true" borderColor="#666666" alpha="1.0" borderThickness="0" backgroundAlpha="0.5" backgroundColor="#23303E" dropShadowColor="#151515" id="previewpanel" dropShadowEnabled="false">
<mx:SWFLoader width="98%" height="98%" source="../visuals/swfs/previewz/brandnew.swf" horizontalCenter="0" verticalCenter="0"/>
</mx:Panel>
button ::
<mx:Repeater id="portfolioRepeater" dataProvider="{swfs}">
<mx:Button id="swfButton" label=""{portfolioRepeater.currentItem.filename}"" name="{portfolioRepeater.currentItem.filename}" width="100%" color="#00D2FF" alpha="1.0" textAlign="left" labelPlacement="left" fillAlphas="[1.0, 1.0]" fillColors="[#622121, #622121]" cornerRadius="0" textRollOverColor="#FFFFFF" textSelectedColor="#FFFFFF" buttonMode="true" click="swfLoader.source=loadSWF(swfButton.Label)"/>
</mx:Repeater>
???? my thought is its duer to the data not coming in as a string , but I cant figure it out.
- im dumb. help me pleeez!!
thnx in advance