Actionscript :: Collapsible Flex Container That Can Handle Dynamic Content That Works When Pre-collapsed?
Feb 2, 2011
Do you know any collapsible flex container that can handle dynamic content that works when pre-collapsed? I tried the CollapsiblePanel component by Arc90 for Flex, but it did not work when pre-collapsed.If I have a VBox inside the panel, and I set the "collapsed" property of the CollapsiblePanel to true, the size of the CollapsiblePanel cannot be restored. It seems like this is what is happening:
The CollapsiblePanel's collapsed property is pre-set to true in the MXML markup.
The VBox auto-adjusts its height to 0 since the CollapsiblePanel is collapsed.
When the CollapsiblePanel's collapsed property changes to false (i.e., it is expanded by the user), the VBox does not expand itself because its parent's content area is 0. Therefore the CollapsiblePanel remains at the same height because its content's height is 0.
Note: This occurs only when the CollapsiblePanel is pre-collapsed, as seen in the markup below.I've already tried this (didn't work):
I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way is to create a new panel (panel creates fine) and then add collapsable panels(nested) to that panel. Here is the code from the else loop.
else if (newPanel == false){ // simpleData is just for the title bar of the new panel // otherwise the panel has no content
[Code]....
The error I get is: ReferenceError: Error #1069: Property panel4.4 not found on components.readTest and there is no default value.
I have tried setting the "name" property instead of the "id" property.
I'm extending a Panel to build a custom component. Without knowing what this will contain later, how can I add a method to temporarily hide all contents and displaying an internal object (which is normally invisible) instead?
How do I get the size of the content area of Container objects? One non generic solution is checking for styles I suppose but I am looking for some code that works generic for all standard flex Container objects. The controls are Flex 3
I have two datagrids 1. OPTION GRID and 2. ELECTION GRID. I have used VBox container as itemRenderer in ELECTION GRID which consists of TextInput in Description Column. The following is the sample SWF.
Whenever the checkbox is selected in the OPTION GRID i have to add a corresponding text input with description value in the 2nd grid (ELECTION GRID) for all the rows. Suppose if two checkboxes are selected, i have to add two textinput in the 2nd grid and so on... This is working fine. But whenever if i edit the textinput and scrolled up or down, the value gets collapsed between the rows or get vanished. I suspect that the itemRenderers will be re-used for the other rows while scrolling. How to retain the edited value in textinput ?
The Election Event is a customised event which will be triggered and invoke the listener function addTextInput whenever the checkbox is selected/de-selected in OPTION GRID.
private function addTextInput(electionEvent : ElectionEvent) : void
Is their a way to retain the edited value in TextInput ?
I'm just finished my first month of getting to grips with flex. All of my projects so far have be very small fixed sized containers with everything in the application resting in an absolute position.The next up and coming project is going to require a more dynamic layout and need some advice.The app will consist of 3 container (not sure what ones to use yet)
Container 1Will be the entire width of the app and a quater of its height.
Container 2Will be beneath Container 1. It will be half the width of the app and 3 quaters of its height.
Container 3 will be the same as container 2.
I want to be able to collapse each container and have the other containers respond to this.For example, I would like to collapse container 1 so that container 2 and 3 go from 3 quaters height to 100% height.
If I collapse container 2 conatainer 1 remains the same but container 3 goes from half thes apps width to 100% of the width.
I am using this collapsible panel - link. Unfortunately, I have a problem using it with application states. I have a state where this panel is visible, when I switch to this state, this panel shows, when I click on it, it opens and its content shows. If I switch to another state (this panel is removed from display), and then switch back to the previous state, the collapsible panel stays open, but its content disappears. In other words, the collapsible panel's content doesn't persist through states. Anyone know what the problem is? Or is there another collapsible panel that can work around this issue?
I'm having a bit of trouble with this logic. My setup is typical, with a content MC and a handle MC the runs along a track with specified bounds. All I want to do is have the handle height adjust based on content height but in relation to the track height?
In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.
If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.
Anyway so, at the top of my itemRenderer I tried specifying:
And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.
I have a stage with Top, Middle & Bottom Movieclip's set on it. On resize the content is scaled to fit and maintain the correct proportions.I am loading each content (page) in as external SWF files into the Middle container using a Loader and URLRequest.Here is my onCompleteHandler function:
Actionscript Code: function onCompleteHandler(loadEvent:Event){ // Remove Preloader middle.removeChild(preload); content =
I`Ve hijacked this .fla and tried to modify it by loading external content into the container. For some reason the loaded content is getting messes up when loaded..
I have made a custom class which extends Sprite. This class is a vertical long rectangle with different contents inside. I used a mask in order to show only a part of this vertical "rectangle" (let's call it this way for clarity). Just at its side there's a scroll bar which has to deal with the scroll (up and down) of all this rectangle along its mask.
The problem is that I don't know how to set up the scrollbar in order to get it all working. I've made a function to set it up:
[Code]...
The scroll bar appears where I wanted, it's fully operative, but still it doesn't scroll up/down the container. From this point on, I don't know what to do in order to displace the container upwards/downwards at the same time the slider is displaced. Is there any Actionscript method to do that? If not, what is the formula?
I am creating an flex Air project,so mxml file will run. I have circles in one Big circle at one side and will be same on other side.
Now how to drag any circle from any Big circle to other side. Or it could be like any two container having circles, then how to drag and drop circle?
For one circle i am able to do drag and drop.But I want one Big circle on left hand side and one big circle on right hand side .And small circles with class names will be in these big circles.Now i want to drag and drop those small circles in big circles.Big cicles should not move. Even i have tried this code in actionscript
how it is possible to edit dynamic content and modify the content and save it, all within flash.I have tried some experiments in the past and have got the text to change etc which is easy but i need a way to save the content so the next time anybody sees the flash it will have the latest content until i change it again.
I am making a full flash site in which one container clip on the main timeline loads all the pages. I want to place a tween on this container so that once the content loads it animates as it enters. Code below.
I would like to add preloader with progress bar to my AS3 page. It's an image gallery. The preloader is on frame 1 and the content is on frame 2. It seems like that the loader works after all the content is loaded. And the progress bar doesn't appear on the screen. What am I doing wrong? For the quick view, the code is below. I also attach the code. To make it simple, I am testing the code with just one image.
was just trying to make my site more efficient when its online. I have an image/video gallery. When the thumbnail is clicked, an image or video will be displayed in the container I have. Currently, the code is like
[Code]...
And if so, will it be in the cache or anything when it is loaded again within the click event?
I've set up an event listener to check if an image has been loaded. If yes, then change the width and height of it. I achieved this by using .target.loader.content. It works fine on my machine, but things are different, when I upload the swf to the server. the images get loaded, but aren't resized as they were offline. What might be causing this? What changes should I do in the snippet to get it working.This is the function that is called using the eventListenerfunction setImage(evt:Event){ sig_txt.text =evt.currentTarget.content.toString(); var loader:Bitmap = evt.target.loader.content as Bitmap; gallery_mc.addChild(loader); var ratio:Number = loader.width / loader.height; loader.width = 100; loader.height = 100 / ratio; loader.y = total_height; total_height += loader.height + 20
I have loaded various external swf in my flash site,thew problem is that when i test my site with ctrl+alt+enter they all display properly, when i test the movie form its folder or online some of their functions or aspects bug.
I'm creating a scrollbar gallery from a tutorial on this site. Though I've completed the tutorial, and customised the gallery to my own needs, however I'm trying to make a very small change to it - and no matter what I do, keep running into problems. I'm trying to replace the rectangular handle with my own customised handle - a (20 x 20) 'circular' png image that I've imported into Flash, made a graphic and stored in the library (though I understand it can be imported using actionscript, like the other images in the gallery).
I'm currently working on a custom component which extends Canvas (let's call it SuperCanvas) ; it's basically a container that let you zoom & pan its contents. It would be too long to explain why, but I can't use scrollRect, so I was forced to declare a Canvas object (called innerCanvas)... inside my SuperCanvas (I know, not very nice =/) I would like to know if there's a proper way to "redirect" the creation of my component's children in this canvas.
I have an image gallery with a thumbnail class which needs information about the content being loaded to be able to resize it appropiatly. Using.content.height and .content.width I can acces this information, however the swf (online) stops working when this code is encountered. No errors are thrown.piece of code from where it stops working
Code: if (targetThumb.content.width > targetThumb.content.height) { //scale the width
I basically want to be able to drag any item out of that list, and when doing so, have it that item automatically go to the bottom, and have the remaining items scroll up. I can handle the drag and drop part of it, but I'm confused on how I could get the remaining column of items to dynamically move up depending on which item is taken out. I'm thinking mayble along the lines of an array?
I have several vertical collapsible menus that open just fine, but I need the code that closes a menu after another's been chosen.If you look at the attachment, you'll see what I mean. In the attachment, the gray 'help topics' nav is open. If I want to rollover and open the blue 'training' nav, I want the gray to close after blue's been selected.
I have flip_mc which contains listSide_mc and videoInfoSide_mc both of the above mc's contain a button name spin_btn.My flip_mc should rotate around the y axis and swapping whichever of the 2 (listSide_mc and videoInfoSide_mc) should be visible.All the rotating and adding a child stuff works fine.BUT the whole flip_mc seems to be a button, the spinIt function runs when I click anywhere on the mc, it should only happen when I click the spin_btn buttons.[code]