Flex :: Viewbox - Make The Path Scale To The Container (View Box)?
Nov 3, 2010
I have the following markup:
<s:Group width="100%" height="100%">
<s:BorderContainer borderWeight="3" borderColor="black" cornerRadius="5" width="100%" height="100%">
[code]....
View 3 Replies
Similar Posts:
Feb 1, 2012
I have setup a Scroller container around an HGroup of labels. The Scroller is setup to only display a single label at a time. What I am trying to do is determine which label is in view of the Scroller when a button is clicked. I have scoured the reference material on Scrollers and HGroups, but cannot formulate a programmatic strategy to determine what element of the group is in view.
[Code]...
View 2 Replies
May 6, 2010
I need to place an image into a container. The problem is that I will not know the size of the image or the container beforehand, so it all has to be dynamic.this is how I started (have not gotten to stage(or container) changing size yet. No matter what I try, either all the images are the same width, or they are all the same height. If some images are portrait and other landscape, I don't want all the images to be X pixels high. In this variation of the code, all the images turn out the same height, regardless of portrait or landscape.
ActionScript Code:
var ratio:Number = container.width/container.height;//get the ratio, if width is bigger than height then ratio is greater than 1, else ratio is smaller than 1
[code]........
View 0 Replies
Mar 18, 2010
I am wondering how to make a 360º view bubble, like they use for Google Street View, but have no idea how to go at accomplishing this task... i have the string of photos that i attached in photoshop(so that if you connected the left to the right it would be a full 360º view).
View 1 Replies
Jul 24, 2009
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?
View 1 Replies
Jul 29, 2009
i'm new in flex.Here is my problem [code]i want to make source path dynamic.i mean i collected userName and albumName from php and i could print in flex.But when i use in source like this this way source="../../user/{userName}/{albumName}/album/{data}".
View 1 Replies
Nov 28, 2009
(i'm using flashdevelop / flex sdk)IS there any way filters applied to a DisplayObject (drop shadow, glow, bevel) can scale relatively with the parent (the DisplayObject it is inside)?And what about other properties like .distance for drop shadow?
For example... If I have a 100px rectangle with a 10px glow inside a container object, and I set scaleX/scaleY of the container to .1, I want the glow to inherit the scale change from the parent (1/10th the size) just as the display object does that the filter is applied to.Instead, if you try this, you will see the glow stays at 10px no matter what scale the filter target or the container is transformed by.Pseudocode example (steps to reproduce),
1) create a sprite called _myOuterSprite on stage at scaleX = scaleY = 1
2) create a sprite called _myInnerSprite inside _myOuterSprite at scaleX = scaleY = 1
3) draw 100px rectangle into _myInnerSprite
4) apply 10px glow to _myInnerSprite
5) transform scale of _myOuterSprite to .1
Result:
- child sprite (rectangle) scales to 1/10th the size
- glow stays the same size
How can I make it so that glow scales to 1/10th as well?...without capturing and scaling bitmap data ...without losing interactivity on objects...in a way that would work visually for every filter, not just glow (drop shadow has distance property too, etc)
View 4 Replies
Jan 15, 2010
What's the best way to scale a container mc but not scale the children inside it? Basically I have a box mc with a background colour, with a logo added using addChild, if the user changes the browser size the box scales to the height of the window but it's also scaling the logo, I just want to change the height of the container box really.
View 4 Replies
Apr 3, 2012
I am coming from flash to flashbuilder I have a directory, AS3_classes_dir, on my computer that stores all of my classes, including my greensock and papervision packages. In every flash app that I make I include that directory in the Source Path, so that I can import whatever I may need. Compiling in flash (using ctrl/enter) takes very little time; only the classes that are specifically imported are compiled.So today I did that in flashbuilder, included AS3_classes_dir via Flex Build Path/Source Path ... but now the compile time are a couple of minutes, even though I am not even importing ANY of the classes from within.
View 2 Replies
Feb 19, 2010
I'm developing on Flex 4. I have a datagrid container and custom itemrenderer with a text field, a button and a few boxes. Every time some data is displayed, the app stalls for a second or two before rendering completely. Is there any way to make it render more fluidly or render one after another...?
View 1 Replies
Mar 16, 2010
I'm trying to create a Flex application that can automatically shrink based on the size of the components that it contains, so that a user can shrink it to a minimal view to see more of the HTML page it's embedded in.
I know how to change the size of the whole application using ExternalInterface, but I'm having trouble automatically figuring out how much the size changed when something is hidden or shown.
For example:
Let's say I have the following flex layout:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:VBox width="100%" paddingTop="0" paddingBottom="0"
[Code]....
How can I hide one of the text fields and cause the VBox to shrink? I'm currently setting it to visible = false, but that doesn't seem to affect the parent VBox.
Once the VBox shrinks, how can I detect that the Application no longer needs so much space, and then go about figuring out how much less space it needs?
I've tried using ResizeEvent, but I haven't been able to get them to work, but I could be doing something wrong.
View 1 Replies
Jun 21, 2008
I've been going through the Transitions Between External SWF tutorials and all is going well except I wish to situate my buttons in a movieclip and not on the main timeline as the tutorial teaches. The tutorial does point out; 'If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. If your buttons are not on the main timeline, you must change container to the appropriate path.'Does anyone know how I'd do that to the below code? (for some reason the code tags were messing up so I've just copy and pasted.)
[Code]...
View 5 Replies
Aug 15, 2011
I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.
View 1 Replies
Oct 8, 2010
I'm loading png files on movieClips attached on the scene dynamically (reading an xml file). then i'm making a tween (with actionscript) to scale the container clip on RollOver.
the png file pixelate when the clip is scaled(to 110%).
View 1 Replies
Aug 27, 2010
I'm trying to add zoom functionality to Lex Talkington's great Panning Class HTML Code: [URL] and have run into the following issue: I cannot seem to get the image to scale without also scaling the container _rectangle. Here's my code
[Code]...
View 2 Replies
Sep 7, 2010
I can't seem to figure out how to accomplish a fairly simple task: I have a simple graphic and I'd like to apply an "orbiting" effect to it - so that the graphic moves in a circle around an arbitrary point (without rotating around its own center).[code]...
View 1 Replies
Jun 13, 2010
I have one .mxml file (the Application) with a ViewStack (with 4 views) and a ControlBard, obviously I can change the views with it, but what I want to do is: in view #1 I have an image which I want to convert to a "hyperlink", so when I click it I go to View #2, is this doable? Also I would like to pass somehow some data (like a String) to that View #2 (lets say the it's a user avatar I click so I want to go to the second view which will show me his profile, that's why I need his name/id).
View 1 Replies
Sep 28, 2011
My problem is that when I try to pass an object from the navigator.pushView(view, dataobject), I can't figure out how to access the dataobject from actionscript. I can access {dataobject.property} from MXML easily, but I want to set a variable in the new view to the passed dataobjects property.
View 1 Replies
Jun 23, 2009
One movie, named Gallery_1, with hotpots via which external swfs are loaded into a container mc of the main timeline of the Gallery_1 movie,
Via another button function the Gallery_1.swf is loaded into a container mc on the timeline of the main swf, which works alright as well, but when one then clicks the hotspots of the Gallery_1.swf one gets following error message:
ReferenceError: Error #1065: Variable GallerySite not defined.
at HotSpot1/PictureLoad()
at HotSpot1/PictureCall()
[code]....
The traces in the eventHandler function work alright.I wildly imported all relevant classes I could think of, e.g. the GallerySite class to the WebSite class and vice versa, and tried various variable definitions, but am at a loss by now as to where to define the GallerySite variable.
View 3 Replies
Jul 2, 2011
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:
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">
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.
<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">
[Code]....
View 1 Replies
Sep 21, 2011
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.
View 1 Replies
Nov 11, 2010
I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?
or
I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.
UPDATE: *There will be not any object over another.
*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.
Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?
View 1 Replies
Dec 23, 2010
I have a viewstack container w/ 3 views: red, black, and blue. How can I completely hide the black & not include it?
[Code]...
View 2 Replies
Jan 13, 2012
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
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
[Code].....
But in this i want big circles should not move and small circles should only be dragged.
View 1 Replies
Jan 23, 2009
I have two swf files, each one almost with the same classes, the most important one is a Singleton class, each swf does "singleton.getInstance()". The diference is that one swf is like a container and the other one is like a module. So when the container loads the module from an absolute path like loader.load("file://c:/modules/module.swf") or loader.load("[URL]"), two different singletons (same class) are created
But when the container loads from a relative path like loader.load("module.swf") , just one singleton is created (that is what I want) I am just intrigued with this behavior, could someone explain me this? PD: I believe is something related to loaderContext and applicationDomain but It also appears that isn't working right. -Patricio Foieri , Vertigo Labs
View 1 Replies
Jan 27, 2010
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.
[Code]...
View 1 Replies
Dec 9, 2010
apologies if this question doesn't seem very clear, i'm finding it difficult to describe what i mean.can i make object move 'out of view' in a movieclip?for example, in the same waya movieclip can move offstage, i'm trying to find a way to make the content of a movieclip move out of view to the side but within the scope of the movieclip.so if i have a square movieclip size x=100 y=100 with a circle size 10 in the centre, i'm trying to make it so when my circle moves to the left more than the size of the movieclip it starts to move out of view.another example would be if i had a character on a television (the screen being the movieclip
View 3 Replies
Sep 20, 2009
I have created an xml slide show and currently when one presses the next or back btns then the next or previous image will come on screen. I am trying to make it where when one presses next the next image will slide on the screen from the right side and stop at the center while the previous image slides off to the left side.
var xmlRequest:URLRequest = new URLRequest("imageData.xml");
var xmlLoader:URLLoader = new URLLoader(xmlRequest);
var imgData:XML;
[Code]....
View 2 Replies
Jul 20, 2005
I'm trying to make a panoramatic view for my site but I can't find any good tut or .fla for it.
View 4 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies