Remove logo from extent report - extentreports

How to remove blue color "Extent" logo from extent report.
Extend report version =3.1.5

Find and edit extent-config.xml, copy and paste the script below over the existing 'scripts' tags.
<scripts>
<![CDATA[
$(document).ready(function() {
$('.brand-logo.blue.darken-3').css('display','none');
});
]]>
</scripts>

$(document).ready(function() {
$('.logo-content').hide();
$('.logo-container').html(your Text);
});

Related

Avoid overlapping while resizing a panel in flex

In my application i am using a borderContainer which contains two or more panels.All these panels are resizable.
My problem is while resizing a panel if it touches the panel next to it i have to stop resizing automatically.
I used hittestObject and able to catch the hitting point but i dont know how to stop resize event.
Please help me.
I haven't tested this code but you can try. :). Basically I have to use the preventDefault method whenever I need to stop the execution of the default behavior of that specific method.
<mx:Script>
<![CDATA[
import mx.containers.Panel;
import mx.events.ResizeEvent;
//Your other codes here
public function panel_resizeHandler(event:ResizeEvent):void
{
var isTouched:Boolean = firstPanel.hitTestObject(secondPanel);
if(isTouched)
{
event.preventDefault();
}
}
]]>
</mx:Script>
<mx:Panel id="firstPanel" resize="panel_resizeHandler(event)>
<!-- Panel contents here-->
</mx:Panel>
<mx:Panel id="secondPanel" ">
<!--Panel Contents Here -->
</mx:Panel>

view sitching how to?

I have a mxml flex application where I have to launch a VideoPlayer on button click event. Any idea what solutions I can use to open a new "frame" or "view" (I'm not sure what the right terminology is) with the VideoPlayer playing a media clip so that it wouldn't interfere with the original "view"?
What I would do is create a component (like a TitleWindow, Group, Panel, etc.) that has your VideoPlayer added to it and then use the PopUpManager to display it on screen when your button is clicked. Make sure you add a method to close the pop up when you're done with it.
Some links on the PopUpManager to get you started:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/managers/PopUpManager.html
http://blog.flexexamples.com/category/popupmanager/
http://blog.flexexamples.com/2008/03/20/creating-custom-pop-up-windows-with-the-popupmanager-class-redux/
A (really) rough example:
<fx:Script>
<![CDATA[
private var myVideoPlayerComponent:VideoPlayer;
protected function btnHistory_clickHandler(event:MouseEvent):void
{
myVideoPlayerComponent = PopUpManager.createPopUp(this, VideoPlayer, false);
PopUpManager.centerPopUp(myVideoPlayerComponent);
}
]]>
</fx:Script>
<s:Button label="Play" id="myButton" click="myButton_clickHandler(event)" />

how to provide functionalities for buttons in flex 3?

i am new to flex. I want to create some buttons and when v click on that button, it should open some images. how to give this functionality in flex builder 3. Thanks for ur time
Try this example if it helps.
The important thing is embedding the image before you use it.Another way of embedding is inline in the mx:Image tag.Please be careful with the path to the location of the image.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
/*in the source put the absolute path(like directory:/folder/image.gif) or the relative path (../image.gif where ../ is your project directory )to the location of your image
*/
[Embed (source="../src/assets/images/image.gif")]
[Bindable]
//this variable of type Class is used to refer to the aboveimage..
public var img:Class;
public function buttonClickHandler():void{
if(image.visible)
image.visible = false;
else
image.visible = true;
}
]]>
</mx:Script>
<mx:Image source="{img}" visible="false" id="image"/>
<mx:Button x="172" y="225" label="Button" id="button" click="buttonClickHandler()"/>
</mx:Application>
hi have a click handler for the button. in the function of click handler handle displaying of image by switching visibilities.have the image embedded in the design before itself. then play with its visibilities on button click.
try going through the examples here.explains about all kind of asset embedding,including sound
http://livedocs.adobe.com/flex/3/html/help.html?content=04_OO_Programming_09.html

Adobe Flex:change the text in <mx:text> with a click effect

I am new to flex, how do you change the text inside of a text control when a user has clicked a button. I could not find a way to do this. I used an event handler to input a .xml to a string and then to the text control. This doesn't seem to work. Any suggestions?
let's see if I can do this off the top of my head:
<mx:Button [all your button properties] onClick"buttonClick()"/>
<mx:Script>
<![CDATA[
public function buttonClick():void{
myText.text = "My new String";
}
]]>
yeah, that should do it.

Bookmark a page

How can we bookmark a page on clicking a button or a link button in flex using actionscript
A working example based on the information in previous answers:
bookmarks.js (add this to your html-template directory):
function CreateBookmarkLink(title, url)
{
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
} else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title); }
else if(window.opera && window.print) { // Opera Hotlist
return true; }
}
Then add this line to index.template.html:
<script src="bookmarks.js" language="javascript"></script>
Now you have javascript code "wrapping" your Flex application which can be called by this code (bookmarks.mxml):
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function AddBookmark() : void
{
ExternalInterface.call("CreateBookmarkLink",
"Stack Overflow",
"http://www.stackoverflow.com");
}
]]>
</mx:Script>
<mx:Button x="10" y="10" label="Bookmark!" click="AddBookmark()"/>
</mx:Application>
Tested on IE.
You'll have to use javascript for that. Just create a javascript function to bookmark a page in your html file that is hosting the swf and then call that function from inside the swf using ExternalInterface.
Here's an example of a javascript function for bookmarking: http://labnol.blogspot.com/2006/01/add-to-favorites-ie-bookmark-firefox.html
Here's the Flex docs on how to use ExternalInterface: http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001009.html
AFAIK, you can't do that from actionscript directly. However, you can invoke javascript from actionscript unsing the ExternalInterface class, and the web is teeming with javascript functions to create bookmarks. Take a look at this, for example (I have not tested it).

Resources