Par4gon
%Europe/Berlin %740 %2006, 18:46
ey,
Ik heb een Griditem id="grid1" in die grid staat een plaatje id="img1" dmv array uit XML.
nu wil ik dat als dat plaatje er niet is de griditem geen border meer weergeeft
d8 dit te kunnen doen met een if else statement, maar blijf errors krijgen
iemand hier die me verder kan helpen? ;)
Par4gon
%Europe/Berlin %665 %2006, 16:58
niemand die een id heeft?, ik ook niet namelijk, weet niet eens of het wel mogelijk is. :S
Dauntless
%Europe/Berlin %845 %2006, 21:17
Het zou handig zijn als je de errors ook post ? :)
Tha Narie
%Europe/Berlin %894 %2006, 22:28
En wat meer MXML/AS.
Par4gon
%Europe/Berlin %428 %2006, 11:17
ok, de errors kan ik niet posten want probeer zo maar wat en heb dat niet bewaard, mijn mxml post ik wel ff, (let niet op de rommel ;) )
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="imageRequest.send(); productsRequest.send()" horizontalAlign="center" backgroundGradientColors="[#ffffff, #ffffff]" paddingLeft="10" viewSourceURL="srcview/index.html" verticalScrollPolicy="off" horizontalScrollPolicy="off" visible="true" verticalGap="30">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.managers.PopUpManager;
import mx.utils.ArrayUtil;
public var myWindow:Object;
[Bindable] private var MyString:String;
private function showWindow1():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img1.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow2():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img2.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow3():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img3.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow4():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img4.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow5():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img5.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow6():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img6.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow7():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img7.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow8():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img8.source;
myWindow.x = 100;
myWindow.expand.play();
}
private function showWindow9():void{
myWindow = PopUpManager.createPopUp(this, MyWindow, false);
myWindow.MyString = img9.source;
myWindow.x = 100;
myWindow.expand.play();
}
// countryID=1 is nederlands.
// countryID=2 is engels.
// countryID=3 is duits.
// countryID=4 is frans.
// countryID=5 is spaans.
// countryID=4 is italiaans.
]]>
</mx:Script>
<mx:HTTPService id="productsRequest" url="test.asp?countryID=2" />
<mx:HTTPService id="imageRequest" url="getimages.asp" />
<mx:Grid horizontalCenter="4.5" >
<mx:GridRow width="100%" height="100%">
<mx:GridItem width="100%" height="100%" paddingBottom="-7" >
<mx:Image height="155" width="978" id="imageheader" source="top.jpg" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" paddingBottom="-7">
<mx:GridItem width="100%" height="20" borderThickness="2" horizontalAlign="center" backgroundImage="title.jpg" backgroundSize="100%" >
<mx:Text width="400" id="title" htmlText="{productsRequest.lastResult.product.productname}" fontSize="12" textAlign="center" selectable="false" fontWeight="bold"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" paddingBottom="-7">
<mx:GridItem width="100%" height="100%">
<mx:Image height="13" width="978" id="imagelinertop" source="liner.jpg"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%">
<mx:GridItem width="609" height="100%" autoLayout="true" backgroundImage="fill.jpg" backgroundSize="100%">
<mx:Grid paddingLeft="20" width="294" horizontalAlign="center">
<mx:GridRow width="270" height="100%" horizontalAlign="center">
<mx:GridItem id="grid1" width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img1" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image)}" click="this.showWindow1()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem id="grid2" width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img2" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image1)}" click="this.showWindow2()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem id="grid3" width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderStyle="solid" borderColor="#808080" cornerRadius="5">
<mx:Image id="img3" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image2)}" click="this.showWindow3()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="270" height="100%" horizontalAlign="center">
<mx:GridItem width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img4" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image3)}" click="this.showWindow4()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5" >
<mx:Image id="img5" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image4)}" click="this.showWindow5()" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img6" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image5)}" click="this.showWindow6()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="270" height="100%" horizontalAlign="center">
<mx:GridItem width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img7" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image6)}" click="this.showWindow7()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5" >
<mx:Image id="img8" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image7)}" click="this.showWindow8()" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
<mx:GridItem id="grid9" width="80" height="80" verticalAlign="middle" horizontalAlign="center" borderColor="#808080" borderStyle="solid" cornerRadius="5">
<mx:Image id="img9" source="{ArrayUtil.toArray(imageRequest.lastResult.Pimages .image8)}" click="this.showWindow9()" width="50" height="50" scaleContent="true" horizontalAlign="center" verticalAlign="middle" useHandCursor="true" />
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
<mx:Text paddingBottom="7" selectable="false" id="content" height="100%" width="650" htmlText="{productsRequest.lastResult.product.producttext}" textAlign="left" fontSize="11" fontFamily="Arial"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" paddingTop="-7">
<mx:GridItem width="100%" height="100%">
<mx:Image height="13" width="978" id="imagelinerfoot" source="liner.jpg"/>
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" paddingTop="-7">
<mx:GridItem width="100%" height="100%" backgroundImage="fill.jpg" backgroundSize="100%">
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" paddingTop="-7">
<mx:GridItem width="100%" height="100%">
<mx:Image height="192" width="978" id="imagefooter" source="footer.jpg"/>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:Application>
[^] ziet er mischien omslachtig uit maar werkt wel, vind dat er nog maar weinig over te vinden is.
maar alvast bedankt :P
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.