Change defined states via Actionscript - actionscript

I use states in a Flex application to switch from normal to fullscreen view. These states are defined in mxml and in a specific tag:
<local:RSVideo
id="video"
width.normal="534"
height.normal="300"
width.fullScreen="100%"
height.fullScreen="100%"
/>
How can i change the width.fullscreen & height.fullscreen in the AS Sourcecode? I need the dimension of the display that are computed at runtime.
Thanks in advance

i think, i found the solution:
<local:RSVideo
id="video"
width.normal="534"
height.normal="300"
width.fullScreen="{Capabilities.screenResolutionX}"
height.fullScreen="{Capabilities.screenResolutionY}"
/>
Thanks for reading my question.
If you got another solution. Please, let me know.

Related

How to get pseudo elements in WebdriverIO+Appium

I want to get a value (content) from the CSS of a pseudo element (::before) while inside a test made using WDIO and Appium for an Android hybrid app because the designer has stored the current responsive-design state there. So my tests would know which layout (elements) to expect.
Multiple answers to related questions (1; 2; 3) indicated that using .getComputedStyle() might be the only solution. But this does not seem to work in my tests. The error is window is not defined for window.getComputedStyle(...) or document is not defined if I use document.defaultView.getComputedStyle(...). Also selectors themselves can't address pseudo-elements it seems.
Example of one of my many attempts:
document.defaultView.getComputedStyle($('body'),'::before').getPropertyValue('content')
Question: Do I need to somehow import window or document to my test? Is there some other way to get window or document from inside the test?
Ultimately: how can I get the content value of ::before of the <body> of a hybrid Android app?
Thanks to Jeremy Schneider (#YmerejRedienhcs) & Erwin Heitzman (#erwinheitzman) for help!
One solution is to use the execute function:
let contentMode = browser.execute(() => {
let style = document.defaultView.getComputedStyle(document.querySelector('body'),'::before');
return style.getPropertyValue('content')
});
Alternatively maybe something could also be done with getHTML.

Error while rendering volume data with x3dom

I tried to set up the same volume renderer as in the official demo. Unfortunately, I always get the error Cannot read property 'textures' of null. I created a simple JSFiddle to demonstrate the problem.
How do I make the volume show up?
Simple problem: You have been using the XHTML syntax. JSFiddle needs the HTML syntax. I have fixed this here:
<X3D xmlns='http://www.web3d.org/specifications/x3d-namespace' showStat='true' showLog='false' width='500px' height='500px'>
<Scene>
<Background skyColor='0.0 0.0 0.0'>
</Background>
<VolumeData id='volume' dimensions='4.0 4.0 4.0'>
<ImageTextureAtlas containerField='voxels' url='https://examples.x3dom.org/volren/aorta4096.png' numberOfSlices='96' slicesOverX='10' slicesOverY='10'>
</ImageTextureAtlas>
<OpacityMapVolumeStyle lightFactor='1.2' opacityFactor='6.0'>
<ImageTexture containerField='transferFunction' url='https://examples.x3dom.org/volren/transfer.png'></ImageTexture>
</OpacityMapVolumeStyle>
</VolumeData>
</Scene>
</X3D>
I think it was documented in the past, but nowadays I only found the simple examples where there are different examples for HTML and XHTML respectively.
A similar answer can be found at https://stackoverflow.com/a/32201556/698496

iOS 8 + Swift - Looking to define multiple lanes, but draw them based on events

I have 3 buttons in one of my app storyboards. Based on the button pressed by the user, I would like to have a different line drawn. I'm new to iOS development and I was looking at Apple's Developer Library for details on how to create a context, path and line definition, but I was not able to figure out the implementation to define the contexts and paths for multiple lines.
Thanks in advance for the help.
Edit - 2015-02-24: To clarify the question and adding a video explaining how I do this on another platform.
Because the question might be difficult to understand, and because I have more experience with Windows development, I created a Windows Phone app showing what I'd like to do on iOS+Swift.
Here is how I do this in XAML + C# for Windows Universal Apps (Runtime)
First, I define the line in MainPage.xaml (The Tranform tags are added later):
<Line x:Name="line1" Stroke="Black" StrokeThickness="6" Y1="60" Y2="60" RenderTransformOrigin="0.5,0.5" Margin="1,0,-1,0" X1="30" X2="30">
<Line.RenderTransform>
<CompositeTransform/>
</Line.RenderTransform>
</Line>
Then I define the storyboard animation within the Page.Resources section in the XAML file:
<Storyboard x:Name="anLine2">
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="line1" d:IsOptimized="True"/>
<DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetProperty="(Line.X2)" Storyboard.TargetName="line2">
<EasingDoubleKeyFrame KeyTime="0" Value="30"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.30" Value="380"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
I define the button:
<Button x:Name="btnL1" Content="Line 1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,0" Click="btnL1_Click"/>
And finally I trigger the animation <> when the button is pressed:
private void btnL1_Click(object sender, RoutedEventArgs e)
{
anLine1.Begin();
}
I defined 3 lines and 3 buttons. The result is seen in this video (It looks a bit choppy in the video, but it is because of the screen capture software. The execution in the emulator and test devices is very smooth):
http://youtu.be/Y4i2IUehl7U
Now, what I want is being able to do exactly this, but on iOS using Swift. I hope this helps clarifying the question.
Thanks in advance!
I think what you want is to animate a line being drawn - if so, see this questions:
how to draw line with animation?
In particular one of the answers has this link:
http://tumbljack.com/post/179975074/complex-interpolation-with-cashapelayer-free
Basically, use a CAShapeLayer and animate from an empty path to a path with your destination.

Create TYPO3 Fluid link for typolink fields generated by a link wizard

I regularly use the link wizard in my TCA.
Its horrible to find out with conditions which kind of link I have to render in Fluid (page/email/external). Is there a solution for this or do I have to create my own ViewHelper?
It seems to be undocumented, but you can pass it to <f:link.page> and it will be rendered correctly, even if it is external, email, or file link. This is because internally, <f:link.page> uses UriBuilder to build the URL, and that UriBuilder uses Typolink.
<f:link.page pageUid="{myLinkFieldValue}">My link</f:link.page>
This is the ViewHelper i´m using for this (+a helper Class):
https://gist.github.com/BenjaminBeck/7220623
I think the link.typolink ViewHelper is what you are looking for, at least for TYPO3 7.0 and above.
<f:link.typolink parameter="{link}">
Linktext
</f:link.typolink>
See Changelog Feature #59396 - TypolinkViewHelper (TYPO3 7.0)
see link.typolink in ViewHelper Reference
External Link --
<f:link.external uri="http://www.typo3.org" target="_blank">external link</f:link.external>
Email --
<f:link.email additionalAttributes="{foo: 'bar'}" email="NULL" class="NULL" dir="NULL" id="NULL" lang="NULL" style="NULL" title="NULL" accesskey="NULL" tabindex="123" onclick="NULL" name="NULL" rel="NULL" rev="NULL" target="NULL">
<!-- tag content - may be ignored! -->
</f:link.email>
Internal Link --
<f:link.page pageUid="1" additionalParams="{extension_key: {foo: 'bar'}}">page link</f:link.page>
In Fluid, there are different link view helpers:
<f:link.action action="show">action link</f:link.action>
<f:link.email email="foo#bar.tld" />
<f:link.external uri="http://www.typo3.org" target="_blank">external link</f:link.external>
<f:link.page>page link</f:link.page>
The Code (and some examples) can be found at: typo3/sysext/fluid/Classes/ViewHelpers/Link

Flash stream player (tutorial?)

I'm working at a radio station in my free time. I host a radio show there and currently were building a new website for the show. There is a audio stream available but there's no flahs player or what so ever, so i decided to build one for the new website. I know a bit about flash, i can create animations etc but i have no knowledge about actionscript... Could someone tell me where i could find a tutorial about this stuff?
This is the content of the asx file from the stream (http://content.streamone.nl/livestream/ne48FnM3kp.asx) :
<ASX version = "3.0">
<Abstract>Served by StreamOne - Streaming Media Platform</Abstract>
<Title>Seaport FM</Title>
<Author>NA</Author>
<Copyright>Copyright</Copyright>
<Param NAME="Prebuffer" Value="True" />
<Entry>
<Ref href="http://icecast.streamone.nl/ne48FnM3kp" />
<Title>Seaport FM</Title>
<Author>NA</Author>
<Copyright>Copyright</Copyright>
<Abstract></Abstract>
</Entry>
</ASX>
I have searched on google etc but i cant find anything i can understand
Greetz, rutgerinc
two simple examples.
and reference: flash.media.Video, flash.net.NetConnection and flash.net.NetStream

Resources