[Flex 4] calculate the width/height of online or with function bindable component
What I want to achieve is something like these two examples (it does not work, it's just the idea):
(1) online
< s:Group id = "main" width = "100%" height = "100%" minWidth = minHeight "950" = "650" >
< s:Group width = "100%" height = "{If (main.height < main.minHeight) {return (main.minHeight-;)} else footer.height {return (main.height - footer.height ;)})}" > ")}}"
< / s:Group >
< s:Group id = "footer" width = "100%" height = "50" >
< / s:Group >
< / s:Group >
(2) somehow set the calculation to the outside in a function maybe like this:
[Bindable] (as it seems to work, but the compiler generates error that there should be some event specified as this [Bindable(event="someEvent")]name, but then it does not work)
public Function calcHeight (): number {}
If (main.height < main.minHeight) {}
return (main.minHeight - footer.height);
} else {}
return (main.height - footer.height);
}
}
< s:Group id = "main" width = "100%" height = "100%" minWidth = minHeight "950" = "650" > < s:Group width = "100%" height = "{calcHeight ()}" > < / s:Group > < s:Group id = "footer" width = "100%" height = "50" > < / s:Group > < / s:Group >
It must be something very simple... but I've been Googling for it for 2 hours now and I could not find what I was looking for. Help please
So that the first option (online) working, you can use a short variant of if-else:
height = "{hand. Height < main.minHeight? "{main.minHeight - footer.height: main.height - footer.height}.
Note the sequence < : MXML is just an XML file, < and=""> (and other symbols) have a special meaning and must be escaped. But it is a ugly looking code and you should avoid that.
Now at atchieve you can use option 2: create a function. The reason why it doesn't work for you, it is to bind a function, you need a custom event. In your case you can listen on main.heigh, main.minHeight, and footer.height properties propertyChange events or resize event on the hand and who knows what else. It is unnecessary and difficult.
If my interpretation of what you're trying to atchieve is correct, this should do the trick.
Or you could do it like this (I prefer this variant):
As you can see, no data binding or listening to all kinds of events and customized shipment that aren't necessary. Correct use of containers and layouts can save your day.
See you soon,.
Michael
PS You should really look at things in a simple way somehow.
Tags: Flex
Similar Questions
-
SWFLoader and access the width/height
Hello
I have an AS3 swf I am trying to integrate within a Flex 3 application. The problem is that I need to know the size of the width/height available from inside the swf file. When the swf file is embedded in a Web page, I can easily access it by stage.stageWidth, but in the case of an embedded swf, it doesn't because the scene is of the entire application and not only my swf. Is anyway in my swf embedded to understand these values?
Thank you!
ChristieIf the embedded SWF has been loaded via SWFLoader, then this.parent.parent.parent.width (and height) of the file integrated SWF will give you what you want.
-
Stupid question, but I cant find it through various research.
How can I calculate the width of the code and relate that back on my sensor units.
If I have a 24 bit ADC with a range of 500mV I get 2.98 mV E-5 steps. How to convert to the engineering units.
Solved the stupid question.
a gain factor for sensor that is (in increments of V/unit)
Then, just multiplied by my calculated voltage code entry.
to get unit/data acquisition engineering bit
=(DAQVoltage range) EU / (bit) *(Sensor Gain)
-
When I started Photoshop CC (20151209.r.327 x 64) (Windows 10) and create a new file, I can't change the width, height, or resolution.
I tried to reset the settings of Photoshops (Ctrl + K-> reset settings) without success.
Any ideas?
Concerning
Simon
SystemInfo:
Adobe Photoshop version: 2015.1.1 20151209.r.327 2015/12 / 09:23:59:59 CL 1055659 x 64
Operativsystem: 10 64 bitar Windows
Version: 10 eller later
Systemarkitektur: AMD Datorfamilj:15, Modell:1, Version: 2 med MMX, SSE-heltal, SSE, SSE2, SSE3, SSE4.1, SSE4.2, AVX FP
Antal processorer fysiska: 3
Antal processorer logiska: 6
Processorhastighet: 3311 MHz
Inbyggt minne: 8094 MB
Ledigt minne: 4389 MB
Minne having for Photoshop: 6973 MB
Minne som anvands av Photoshop: 70%
Basic but often made mistake, tried restarting your computer?
Try it once and see if it still works very well.
~ Assani
-
How to determine the width/height of the text
Hello.
I created the layout of text format and text flow.
I must now determine the width/height of the container is adjusted exactly to the text.
Is it possible to get the width/height of the text before creating the container controller?
Thank you.
It depends on what effect you are trying to get. If you want the text to go and not wind, you can set the width and height "Nan". To get the actual width and height that has been used, you call getContentBounds(). But if you wanted the text, you must select a thickness to wrap up in and then to get the required width used account height. If the latter case to work, you could create a controller with a width you specify, but let the height as "NaN".
-robin
-
How to calculate the width for assets
Hello
I want to have a large image that covers the entire width of a device.
How can I calculate which corresponds to the width I want?
I'll probably have 3 versions, each for one of the 3 DPI settings.
Thank you.
A desktop application is very different from a mobile application. On the desktop, you usually have a threshold of width/height that you know that each monitor will be at least in bulk, for example 800 x 600. Some people design applications for just this minimum resolution and some people create applications that can grow bigger than, but in the end you basically the exact same application on each monitor.
The story is very different on mobile devices. The range of screen size and screen DPIS is much more important and should be taken into account. You have cell phones that are often something like 480 x 800 in portrait orientation, but then also 800 x 480 in landscape orientation. If you really can't design an app that can be only 480 x 480 because it's just not lots of space and all devices will have a ton of valuable space that is not used.
Then put in the form of tablets, which usually have a screen size much more important for the provision of application you have a mobile phone often is not make sense on a tablet. Many applications have a completely different user interface on tablet vs on the phone.
So in the mobile applications you will want to use relative sizing and positioning as much as possible (width/height=100%, top, left, right, down, VerticalLayout/HorizontalLayout, etc.), you'll want to learn more about the options you have available in the Flex SDK kit to treat the different PPP (dpi scaling and CSS media questions), and you also need to think if your application needs to act even on shelves as on mobile phones or if the interface User should be completely different.
-
How to determine and set the width/height of a movie
Hi all
It is perhaps a fundamental issue, but I can't seem to find this information anywhere. I want to determine what the default size, in pixels, is a project of actionscript 3 to be able to set the width and height of an individual and to be displayed in the browser at its actual size.
The project I'm working on that will be used on a Web page with a bunch of other data no flash so it is important, it is the right size and fits well into the rest of the content.
So far, I've seen I can force the values by editing the files in the html-template folder and I can query the size of the stage object, but really what I want to do is find these values inside Flex Builder and for run/debug mode display the full-scale project, not to stretch out it. I can want to resize it upwards or downwards later on or to allow the resizing of the browser scaling, but I want to default to actual size for development, if you see what I mean :)
Thanks in advance,
DavidW
If you want to say a pure ActionScript, not Flex project, then do this:
[SWF (width = "300", height = "300")]
SerializableAttribute public class MyApp extends Sprite... -
Get the width/height of the current image / information of KING of user input
Hello
I have two problems:
First of all:
Y at - it an option to get the width and height of the image to use for calculations or set a return on investment for the right settings?
Second (more complicated):
I have used Labview 8.5 custom interface (see the interface.jpg attachment).
I am trying to get the return on investment of the Interface and use it in my app Builder of Vision, but I don't see the return on investment or its size or position or something...
Is it possible to get this information from the Interface?
Information:
I use Vision Builder 2009 SP1, LabVIEW 8.5
Thanks for your replies!
Hello
I missed that when I tested it... the display image control must have been larger than the size of the image and the property node returned the value that I expected.
A restriction of the VI to Interface custom that you create in LabVIEW, is that it cannot have any dependencies (call any subgroup screws), other than the methods and the nodes property of the objects you put on. Therefore, I can't just call IMAQ GetImageSize her. So it does not seem possible at this point for the VI of custom Interface return the size of the image.
The solution, at this stage, to get the size of the image of the Interior Vision Builder AI, is to use a step in LabVIEW Run, calling a simple VI that takes an image as input, called IMAQ GetImageSize and return res X and Y.
Note that for purposes of distribution, when you call a VI using a LabVIEW execution step, you must save it as a source distribution in a Bachelor's degree in LAW and you must redistribute this llb with your inspection. See using setup step run LabVIEW for more details.
Sorry there is no better way to do this now.
Best regards
Christophe
-
Hello world
I often work between Illustrator and Photoshop, copy lineart in PS and since I recently updated two programs, somehow I changed a setting or something has changed in the software itself.
The steps that I "used" to take...
1 Select lineart illustrator and copy
2 create a new record in PS - change the resolution from 72 to 3003. close the new document (because the width and height would be in 72 dpi)
4. create the document again - this time she would have saved my setting of 300 DPI and automatically adjust the pixels accordingly
Unfortunately step 4 doesn't seem to work for me. He just stay at 72 dpi.
Is there a setting that has changed, or is there another way to "easily" copy lineart in a new PS document at 300 DPI and the right size?
Thank you for your time
Zoe
I just wanted to report that I found a solution in case anyone else think the wrong way as if I was.
If you change the dropdown to "pixels" in inches or centimeters, for example, and then change the resolution to 300, it will resize the jury to "Printable" size at 300 dpi.
-
Retrieve the width/height of the Applet in form 10g
Dear members:
Is it possible that I could capture width & height of applet, which has been formsweb.cfg the runtime - appreciate your suggestion.
Thank you.
AdamHello
It is a solution with A Java Bean
François -
Determine the width/height of a BLOB/LOB?
No one knows the function to determine the width or height of a BLOB/LOB file?Hello
Sorry, I don't get you. What does YOY with width?
Kind regards
-
Selection at the level of the document at the level and focus on the width + height of the page
Hello
I've got little experince with ID-scripting. Can someone help me out here? It should be really simple
What I do now is stick my graphics and then check the height of doc in the "Document Setup" and type doc mm height in the scale height field. (Not the height-field, ' caus I want all my selection to scale uniformly!)
Then I centered horizontally and vertically.
If this will not be easy to script? I hope so. THX!
Try now,
var doc = app.activeDocument, sel = app.selection[0], w = doc.documentPreferences.pageWidth, h = doc.documentPreferences.pageHeight; doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS; doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS; doc.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin; var currscale = sel.verticalScale; selheight = sel.geometricBounds[2]-sel.geometricBounds[0]; sel.horizontalScale= sel.verticalScale = (((h - selheight)/selheight) * currscale) + currscale; selwidth = sel.geometricBounds[3]-sel.geometricBounds[1]; sel.move([(w-selwidth)/2,0]);
Kind regards
Cognet
-
How to calculate the difference between 2 dates, but with interruptions and stops between
Hello
How can I calculate the difference in minutes between 2 dates but taking into account the existence of a table in the Appendix, so if between start_date and end_date arguments, there is no 'work time' then this part of the time will not be included in the total difference.
Records of the time table example:
Time_configuration start_hour end_day end_hour 2 19:00 3 07:00 3 19:00 4 07:00 so for example first record said that on Monday you start at 19:00 and leave the next day at 7:00 and then save the same sort of thing.
There is an event that I want to track how many minutes lasted. for example, this event began the day 2 at 19:00 and ended the day 3 at 21:00
Theoretically, this event really lasted: 840 minutes. This 840 minutes are within the limits of the annex.
Thanks in advance.
The storage of the dates not as data type DATE in most cases is bad design. In addition, how do you know what day of the date is 2 at 19:00? East - Monday 2 November 2015 or Monday, March 7, 2016? It is the same for the event. In any case, assuming that both calendar and events don't extend over several weeks:
According to schedule)
Select time_configuration 2, 19:00 ' start_hour, end_day 3,' 07:00 ' end_hour of all the double union
Select 3, 19:00 ', 4,' 07:00 ' double
),
event like)
Select event_id 1, time_configuration 2, 19:00 ' start_hour, end_day 3: 21:00 ' end_hour of the double
)
Select e.event_id,
Sum)
less (e.end_day + to_date (e.end_hour, 'HH24'), s.end_day + to_date (s.end_hour, 'hh24:mi')).
greater (e.start_day + to_date (e.start_hour, 'HH24'), s.start_day + to_date (s.start_hour,'hh24:mi'))))
) * 24 * 60 minutes
Appendix s,
e event
where e.start_day + to_date(e.start_hour,'hh24:mi')< s.end_day="" +="">
and e.end_day + to_date(e.end_hour,'hh24:mi') > s.start_day + to_date(s.start_hour,'hh24:mi')
E.event_id group
/EVENT_ID MINUTES
---------- ----------
1 840SQL >
SY.
-
Calculate the fastest path between 2 nodes with the data model for the Oracle network
Hi all,
I have Oracle 10 g 2.
My problem is the following:
I created a network named ITALIA_NET in the data model for the Oracle network.
The table of links of this network is named: ITALIA_NET_LINK$.
The table of the nodes of this network is named: ITALIA_NET_NODE$.
The table ITALIA_NET_LINK$ contains a field named COST that contains links (in meters) lengths.
I've already calculated the SHORTEST PATH between two nodes of the network, by using the method of shortestPath() (using the Java API) as shown on "Pro Oracle Spatial for Oracle Database 11 g" manual. Infact, this method makes reference to the COST field for $ ITALIA_NET_LINK to make this calculation.
Now, I want to calculate the FASTER PATH between two nodes of the network. I have the links (in hours) travel time to make this calculation.
My idea is to create a new field in ITALIA_NET_LINK$ named Cost2 containing the travel time from the links and then do the math by using the shorthestPath() method, referring to the Cost2 field to $ ITALIA_NET_LINK COST field instead.
By default, I know that the shorthestPath() method returns the COST field for $ ITALIA_NET_LINK. Is possible to change this setting and do that this method refers to the Cost2 field?
In the alternative, is another way for the calculation of the fastest way?
I want to leave the creation of another network as last solution, because I will have other costs of field (Cost3, cos4t,...)
Thank you much in advance.Your approach is good. You will have two networks and you can read them in memory and analyze of shortest path. The shortestPath method is static for the class of NetworkManager. You can use the same method for both networks, once they are read into memory.
...
read the network with time as cost of link
NetTime network = NetworkManager.readNetwork (dbConnection, 'ITALIA_NET_TIME');
read the network length as cost of link
Network netLength = NetworkManager.readNetwork (dbConnection, 'ITALIA_NET_LENGTH');calculate the quickest way
PathTime path = NetworkManager.shortestPath (netTime, startNodeID, endNodeID);
calculate the shortest path
PathLength path = NetworkManager.shortestPath (netLength, startNodeID, endNodeID);
...In the future, if you upgrade to 11g, network data model provides a load on demand (LOD) API that loads only the scores of necessary network in memory during the analysis. This command removes the restriction of the memory of the 10g (in memory API you use) API. API of LOD can handle very large networks and offers more features analysis and modeling capabilities.
The following link contains the tutorial of NDM LOD API ready for download. Just for your information.
https://spatial.SampleCode.Oracle.com/servlets/ProjectProcess?PageID=0Zl7oVKind regards
Jack -
New to CS5.5 you can enlarge the width (height) of the timeline
Hello
I use Adobe Premiere 6.5 and learn to first Pro CS5.5. In Adobe Premiere 6.5, you could make the video and audio tracks in the timeline more large-height-wise. It is a very simple process - right mouse click on timeline area and choose the size you want.
Is this possible in CS5.5?
Thank you for your help.
Select the track and hover over with the mouse at the top of the track. The cursor turns into a pointer "resize". Drag upward to increase the height of the track.
Maybe you are looking for
-
Unable to start my laptop Satellite Pro - orange flashing
I can't boot my laptop Satellite Pro.I have an orange light flashes. I tried to remove the battery and hold the power button, but it did not work... Help
-
Desktop HP Compaq Elite SFF 8200 - SDM "this particular model could not be matched" - why?
-
Slow down the Satellite A40 - how to set factory settings
I have a Satellite A40 series and over time it began to slow down. I want to do is go back to its factory settings. Everyone there of suggestions on how to get there. Thanking you in advance.
-
Switch from Acer 10 from 32 bit to 64 bit OS
Hello I have the model SW05-11. Please, is there a way how to upgrade my 32 bit to 64 bit Windows 8.1? Adobe Premiere Pro and After Effects are (CS5 and above) 64-bit only... need for my shool projects, I realized :/ so I´ll by VERY VERY happy if som
-
[WAG200G] problem to connect to the modem cable Alloys Atlanta Dcp2203
Hi all! I recently got my new cable internet access (I used to have DSL) and I want to use my WAG200G to distribute internet by air. When I connect my laptop to the Dcp2203 of Atlanta Alloys via ethernet, I get an external IP (200.XXX.XXX.XXX). I nee