Programming in Flex 4.5
I want a scroller to be wrapped around a popup window (based on borderconatiner)
I cant put my scroller correctly.
<s:Scroller width="600" height="70%" id="scroller>
<s:Group id="myGroup">
// Here is the rest of my code..
</s:Group>
</s:Scroller>
Any suggestions?
You should check this example from Tour de Flex
Right click then View Source.
Related
In my flex mobile project I have a vgroup inside a scroller and I add element to the vgroup.
When I scroll (because only 5 elements fits the visible space) the scroller get crazy, and the new element that I add to the vgroup is not placed as last element. And my code doesn't work anymore. Is there a sort of virtual layout also for scrollers?
EDIT
This is the Scroller
<s:Scroller top="0" width="100%" bottom="100">
<s:VGroup id="areaList" width="100%" gap="5">
</s:VGroup>
</s:Scroller>
When I add an Area to the VGroup (Area is a SpriteVisualElement) is displayed after the previous area. But when I scroll and add a new area, the new one is not displayed in the last position of the VGroup as expected.
In the code i use the method areaList.getElementAt(k) to get the area at index k, but after the scroll it doesn't return the correct item.
I have a TabNaivgator which I fill in runtime with NavigatorContent filled in runtime as well with content.
I see though that my content is taller than the NavigatorContent height, but instead of creating a scrollbar, Flex makes the content exit the NavigatorContent bounds
here is the code: http://pastebin.com/xxnSz6pk
and here is the result: http://dl.dropbox.com/u/4064417/Immagine.png
how do I make that content scroll?
thanx in advance
Use the Scroller component inside the NavigationContent tags, and a Group inside the Scroller tags:
<s:NavigatorContent width="100%" height="100%">
<s:Scroller width="100%" height="100%">
<s:Group>
<!-- Your component(s) here! -->
</s:Group>
</s:Scroller>
</s:NavigatorContent>
If you add an Accordion navigation component to Flex Application, like this:
<mx:Accordion x="14" y="570" width="321" height="200">
<s:NavigatorContent label="Accordion Pane 1" width="100%" height="100%">
</s:NavigatorContent>
<s:NavigatorContent label="Accordion Pane 2" width="100%" height="100%">
</s:NavigatorContent>
</mx:Accordion>
then your Accordion's panes will jump open and closed instantly.
Question is: what code should I write to make my Accordion's panes switching animated?
(Like in Adobe's demo called Tour de Flex)
To see what I mean by animated switching between panes:
1) go here: http://www.adobe.com/devnet-apps/flex/tourdeflex/web/
2) select Other Components -> Containers -> Super Accordion in the left pane
3) click on Super Accordion's pane headers and see them moving
Thanks!
Add 'openDuration' attribute to 'Accordion'. The number should be in milliseconds.
FTQuest
By default TitleWindows seem to have no padding. I tried the properties "left", "right" etc and it doesn't work. Actually I'd like to have a default for my whole app, so I tried creating a skin but no matter where in the skin I add 'left="50"' it just doesn't create padding on the left. You'd think that you should add it to the element with id="contentGroup", as described on this Adobe Skinning help page, but that does not work.
Surely this is something almost everyone wants to do?
The contentGroup in the default TitleWindowSkin is inside a VerticalLayout which does not respect top/left/right/bottom constraints.
You could do this by duplicating the default TitleWindowSkin and wrapping the contentGroup with a Group with width/height of 100%:
...
<s:Group width="100%" height="100%">
<!--- #copy spark.components.SkinnableContainer#contentGroup -->
<s:Group id="contentGroup" top="10" left="10" right="10" bottom="10" minWidth="0" minHeight="0" />
</s:Group>
...
Since the TitleWindow extends the Panel component, it doesn't support the padding properties a HGroup or VGroup based component would. As far as I know, there's no way to skin a TitleWindow so that the padding properties are automatically set.
All I do is set the x and y coordinates of my components within the TitleWindow so that they are laid out where I want them.
I'm new in flex.
I faced problem to make full screen in flex 3.My layout container type like below.
<mx:Application >
<mx:Panel>
<mx:ViewStack>
<mx:VBox >
<mx:VBox >
<mx:Canvas >
<mx:HBox width="300" height="300">
</mx:HBox>
</mx:Canvas>
</mx:VBox>
</mx:VBox>
</mx:ViewStack>
</mx:Panel>
</mx:Application>
the container width and height will be fixed like above.Then when i click a button full screen it will be full screen mode. Please help me with example and tutorial.
best regard.
Mahedi
Assuming you are referring to full screen as in 'use the whole monitor':
Calling stage.displayState = StageDisplayState.FULL_SCREEN; will set your flash movie to full screen mode (provided that the allowFullScreen parameter has been set to true in the object/embed tags of the embedding html page). Scale up the hbox (change its width/height) so that it occupies the whole space available.
Just set
<mx:HBox width="100%" height="100%">
//Other Codes
</mx:HBox>
From what I understand what you want is to change the width / height of the component at run-time.
In this case you need to give an id to the HBOx, add a script block, and call the 'width' / 'height' setter on your block.
Is that what you want to do ?
Thanks
PH