How to display ads in Flex APP

Hi All,
How i can place a ads in the flex application.
Any work around.
Please send the sample link or tutorials
Thanks & Regards,
chaitanya

An ad would be an image or Flash movie, both of which can be displayed quite easily and given hyperlink behavior. It all depends on what kind of logic you need to support rotation. You will want to keep the ad content resources external of the swf. Maybe have an XML properties file to load in specifying resources, their links, and whatever else you need.

Similar Messages

  • How to display bitmap in Flex App

    Hi,
    I want to alter pixel data in an image and then display the
    altered version alongside original image. I am manipulating the
    bitmapData from the original image and then creating a new Bitmap
    from the altered bitmapData.
    How can I add the new Bitmap to the display list? I am
    getting a "not UIComponent" error message when I try to add it.
    Casting it as a UIComponent also fails.
    Or am I taking the wrong approach?
    TIA

    Hi,
    Please try as show in the code below.
    Hope this helps.

  • Convert displayed datetime in Flex app to database's

    I currently use Flex web services to request data from an sql
    server database (via a .net app) and bind the result set .net
    datatable to a flex datagrid. The datagrid has a datetime column
    that displays the local time at which the client created the record
    instead of the sql server datetime value. How can I change my
    datagrid records to show the database's datetime? Here's an
    articles related to this issue... but wasn't able to get it to work
    in my context:
    http://blog.shrefler.net/?p=13.
    Any help would be appreciated!

    "justneed2know" <[email protected]> wrote in
    message
    news:g980h7$m5f$[email protected]..
    >I currently use Flex web services to request data from an
    sql server
    >database
    > (via a .net app) and bind the result set .net datatable
    to a flex
    > datagrid.
    > The datagrid has a datetime column that displays the
    local time at which
    > the
    > client created the record instead of the sql server
    datetime value. How
    > can I
    > change my datagrid records to show the database's
    datetime? Here's an
    > articles
    > related to this issue... but wasn't able to get it to
    work in my context:
    >
    http://blog.shrefler.net/?p=13.
    >
    > Any help would be appreciated!
    Why not just send the request to create the record to the
    server _before_
    you do anything with it in Flex, then bring it back and
    display it in Flex?

  • How to display reply in flex data grid?

    Hello All,
    Frompast couple of months i am working on a Flex Application which used MySQL databse and PHP as server side language. In this application user can login and they can post their comments which will be displayed in a datagrid. This will have a reply button where other users can send their reply. My problem is how i will be displying the reply of a msg in a datagrid. Here is the screenshot of my datagrid
    I thought of 2 options:
    1. Displaying the reply in the datagrid and disaply in the same row: i don know how we can do this.
    2. Store all the replies in data base and display in toher panel though a button. From flex side it is easy to do but i don know how i can store them in database.
    Please let me know if you have any ideas/tutorials on this

    This is only in theory, haven't actually checked it but I think it could work
    If each one of those posts is done by an itemrender, your renderer can have 2 states stateone and statetwo for example.
    The reply state (statetwo) being bigger and containing space for the reply post.
    Store your replies in the database and have another boolean column ( Tinyint(1) or something) in your MySql db indicating that a particular post has a reply . When you pull your data from the database and put in in an arraycollection check this column for each post and use it to set the state of the itemrenderer.
    That way posts with no reply with be state one, and posts with replies will be state 2 and you can populate the reply field with data from the object in your arraycollection.
    I suppose it all does depend on how you get your data from MySQL and how you store it in Flex but I think states is a way you could accomplish things like this.

  • How to display ads with Vungle?

    Hi, I´m working on App and it seems like I have integrated Vungle correctly because I can see it reflected on my dashboard, the problem is when I call for the ads the app crashes or simply doesnt display the ads
    This is part of my code where I want it to work
    I have imported these
    import com.vungle.extensions.*;
    import com.vungle.extensions.events.*;
    import com.vungle.extensions.Vungle;
    import com.vungle.extensions.events.VungleEvent;
    public function main()
      menuStart.showStartScreen();
      menuStart.addEventListener("START_PLAYING", startGame);
      menuStart.addEventListener("GO_OPTIONS", openOpt);
      Vungle.create([,"53dc06fd5d261a11060001a3"]);
      introChannel = introS.play();
      function openOpt(e:Event):void
      menuStart.hideStartScreen();
      menuEnd.hideScreen();
      menuOpt.showScreen();
      Vungle.vungle.displayAd();
      popS.play();
      menuOpt.addEventListener("GO_BACK", goBack);
    And I have made all modifications to my xml according to Vungle
    <application>
        <activity
          android:name="com.vungle.sdk.VungleAdvert"
          android:configChanges="keyboardHidden|orientation|screenSize"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        />
        <service android:name="com.vungle.sdk.VungleIntentService"/>
      </application>
    ... and the permissions
    Any idea why this might be happening?
    Thanks in advance

    Hi,
    Looks like the AppID you're using with Vungle.create is not actually a valid AppID. You can find yours on your app's page on our dashboard. It's in red, at the top left. If you have further questions, please contact us at [email protected]
    Thanks!
    Jordyn
    Vungle Tech Support Engineer

  • How many display options for Web Apps are there?

    I know this is going to sound stupid,
    But are there only 2 ways to show web apps?
    Basically - I want to get links to auto populate on one web app, pulling just links to another web page (this web page is one of the fields in another web app), but automatically updated when the category of the "linked to" web app has another product linked to it.
    I know what that reads like!
    The only thing is - these are separate web apps.
    The alternate/backup view of the first web app looks like this:
    Currently - the user has to manually add the links like this:
    Which is not ideal - I just want them to dynamically populate on the fly.
    Is this possible?
    Cheers, Dave

    Funny you say that - as the most obvious things appear in your brain immediately after posting a question... Will see how that works...

  • How to call Flex app from Javascript in portal question

    I've setup my flex 4 app with a callback function. The flex app is embedded in a Java portlet on a WebLogic Portal 10.3.2. How can I call the Flex app from the portlets javascript function? Code below shows how the flex app is embedded in the wrapper jsp.
    <script language="JavaScript" type="text/javascript">
            AC_FL_RunContent(
                        "src", "<%= srcPath %>",
                        "id", "<%= (String)request.getAttribute("portlet_name") %>",
                        "name", "<%= (String)request.getAttribute("portlet_name") %>", 
                        "width", "<%= request.getAttribute("width") %>",
                        "height", "<%= request.getAttribute("height") %>",
                        "align", "middle",
                        "quality", "high",
                        "FlashVars", "PORTLET_WS=<%= request.getAttribute("window_state")%><%= wsrpEncodedChannel %>",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash",
                        "pluginspage", "http://www.adobe.com/go/getflashplayer");         
    </script>

    Thanks for the response. I followed the instructions in the link, but it does not appear to work within a Weblogic 10.3.2 portal. My Flex app is wrapped in a Java JSR 286 portlet. Should this approach work or is there a different approach for the portlets wrapper JavaScript to call a Flex callback function?
    thanks
    Dan

  • Configuring socket policy for flex apps(with blocked port 843)?

    We have built several flex-based ecommerce apps for a fortune 500 customer of ours, that for various reasons, we need to use sockets to a different domain and requires a socket policy file, but were having trouble configuring our flex apps for deployment in thier enviornment where they are blocking virtually everything except port 80 . The current documentation in in regards to socket policy files and crossdomain files in a non-standard configuration not using port 843 is not providing any useful help to us.
    Here is the scenario:
    Flex apps are served from domain www.a.com in  to users browsers via http. The apps then make socket connections to domain www.b.com:80 where there are php scripts serving json data to the flex apps via port 80 using http(we use sockets because we need to set and read back http headers). The problem is the flex apps cannot make socket connections to the www.b.com domain without errors like below(unless we setup a socket policy server on port 843 of www.b.com, in which case everything works):
    Warning: Timeout on xmlsocket://www.b.com:80 (at 3 seconds) while waiting for socket policy file.  This should not cause any problems, but see http://www.adobe.com/go/strict_policy_files for an explanation.
    Error: Request for resource at xmlsocket://www.b.com:80 by requestor from http://www.a.com/bin-debug/DownloadManagerFlex.swf is denied due to lack of policy file permissions.
    Error: Request for resource at xmlsocket://www.b.com:80 by requestor from http://www.a.com.us/bin-debug/DownloadManagerFlex.swf is denied due to lack of policy file permissions.
    Since we cannot use port  843 for the socket policy file server, we setup the socket policy server on a different ip in the same domain: spf.b.com:80 (using the sample perl code Adobe provides), and per the docs(cited below), use Security.loadPolicyFile("xmlsocket://spf.b.com:80") before we invoke "socket.connect", to supposedly tell the flash player to check there for the socket policy file. The problem, as you can see from the error log, is that the  loadPolicyFile("xmlsocket://spf.b.com:80") is ignored.
    No matter what we do or how we set things up, we cannot get the flash player to recognize the loadPolicyFile(), it always wants to go to the port were making the socket connection on. It is unclear how to properly configure the flex app, socket policy file and crossdomain file for the above scenario. The docs allude to being able to serve  the socket policy file from a different port 80 in the same domain as the socket connection were trying to make, but were having no luck with that.
    ->Can anyone shed some light on how to make this work or what are we  missing/doing wrong? Also, if we can get this to work, are we  stuck with a 3 second delay because this(very large) customer is blocking port 843?
    As an aside,  the documentation for all this is a bit scattered, unclear and contrdictory:
    One document says:(http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_07.html)
    "This warning usually means one of two things: first, that you need to set up a
                socket policy file server on port 843, which is the first location that Flash
                Player checks by default; or second, that you need to provide more explicit
                guidance to Flash Player from ActionScript by calling loadPolicyFile to indicate the location
                of a socket policy file. When you call loadPolicyFile rather than allowing Flash Player to check
                locations by default, Flash Player will wait as long as necessary for a
                response from a socket policy file server, rather than timing out after 3
                seconds."
    Another document says(http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html):
    "If an ActionScript Security.loadPolicyFile() command exists within               the SWF file, then the Flash Player runtime checks that location. Flash Player checks               the destination of the loadPolicyFile() only after it has checked the               master policy file on port 843 for permission to acknowledge other policy               files. If the developer has not specified a loadPolicyFile() command,               then Flash Player checks the destination port of the connection."

    I found the reason why the Flex application was ignoring the socket policy (crossdomain.XML). I have a policy server that listens to port 843 and submits the policy to the Flex client. My policy was getting ignored by the Flex application and I was getting the sandbox security error you were getting. The solution to this problem isto write a null byte right after the policy server sends the policy. I'm using Apache Mina that is wrtten is Java and the null byte is written as follows:
    public void sessionCreated (IoSession session)
            throws Exception
            session.write(_policy);  -- > policy string
            session.write("\u0000"); --> null byte
             //session.close(true); ---> No need to close the session because it is closed by the Flex client after it receives the null byte.
    Now my Flex application can read and accept the policy from port 843 and I'm not getting more security violations.
    Thanks for your reply,
    Alberto

  • Security for deployed Flex Apps

    I know that there are many decompilers available for .SWF
    files. How can you make your Flex apps secure ?
    I have seen this product, is this reccomened for flex
    http://www.amayeta.com/software/swfencrypt/

    Refer tohttp://www.oracle.com/technology/documentation/1012_solaris/install.1012/install/ports.htm

  • An AS component doesn't appear in a flex app

    The following AS draws a line and works in its own right,
    package components {
    import flash.display.Sprite;
    import flash.display.Shape;
    public class DrawTest1 extends Sprite {
    public function DrawTest1() {
    var shape:Shape = new Shape();
    shape.graphics.lineStyle(0,0x0000FF, 1);
    shape.graphics.lineTo(100,100);
    addChild(shape);
    It was then included in a flex app as
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:custom="components.*"
    layout="horizontal">
    <custom:DrawTest1 />
    </mx:Application>
    but only a blank screen (i.e. without the line) was displayed
    when the flex app was executed (no error message was given during
    compilation). Please help.

    Flex containers (incluing Application) can contain only
    components which are derived from UIComponent or implement
    IUIComponent interface.
    To get your component to display in the application create a
    UIComponent as child and add the DrawTest1 component as a child to
    it.
    <mx:UIComponent id="p1"
    creationComplete="p1.addChild(t1)"/>
    <custom:DrawTest1 id="t1"/>

  • Displaying Ads on a Flex App ?

    Hi,
    I have a flex based application that resides on 100% of the browser page.Now i want to display some Ads on the flex based App. Google Adsense is not supported i think.I read some blogs using an iframe we can display some Ads.I don't want to do that, it might slow the app.Is there a better way.
    There are some Ads that i see made in flash, we should be able to display them directly right.Can you suggest some ad networks that provide such ads.
    Thanks
    Rajat

    I would suggest a proxy located on the server.  It would connect to adSense, then communicate with your FLEX app.  BLAZE could be used for both the proxy and the "PUSH" to you app to display the text in the ads.  We are building this for ourselves right now, if you'd like to know more you can contact me at curtis dot fisher at procontent dot net.
    cheers,
    Curtis

  • How do you clean safari from virus displaying ads?

    how do you clean mac from virus displaying ads?

    There is no need to download anything to solve this problem.
    You may have installed one or more of the common types of ad-injection malware. Follow the instructions on this Apple Support page to remove it. It's been reported that some variants of the "VSearch" malware block access to the page. If that happens, start in safe mode by holding down the shift key at the startup chime, then try again.
    Back up all data before making any changes.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those. If Safari crashes on launch, skip that step and come back to it after you've done everything else.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, ask for further instructions.
    Make sure you don't repeat the mistake that led you to install the malware. It may have come from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    Malware is also found on websites that traffic in pirated content such as video. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • How to exit a Flex app

    I have a Flex application that is run in a browser.  There is a public page and then other pages that cannot be accessed unless the user logs in.  To log in, I show a popup window and the results of their username, password and role determines which page in a viewstack gets displayed.
    My issue is this.  When the user clicks the logout button, I want the app to go back to the public page as if they just eneterd the application for the first time.  Is there are easy way to accomplish this, and is it secure?  If so, how?
    Thanks again!

    if you wanted to just close the window all together you could write some Javascript to close the window, then in your flex app call the function when they click the logout button
    If you want to actually end it with Actionscript you could try:
    public function applicationExit():void {
         var exitingEvent:Event = new Event(Event.EXITING, false, true);
         NativeApplication.nativeApplication.dispatchEvent(exitingEvent);
         if (!exitingEvent.isDefaultPrevented()) {
              NativeApplication.nativeApplication.exit();
    Source: http://livedocs.adobe.com/flex/3/html/help.html?content=app_launch_1.html

  • How use PHP to read image files from a folder and display them in Flex 3 tilelist.

    Hello. I need help on displaying images from a folder dynamically using PHP and display it on FLEX 3 TileList. Im currently able to read the image files from the folder but i don't know how to display them in the TileList. This is my current code
    PHP :
    PHP Code:
    <?php
    //Open images directory
    $imglist = '';
    $dir = dir("C:\Documents and Settings\april09mpsip\My Documents\Flex Builder 3\PHPTEST\src\Assets\images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "filename: " . $file . "\n";
    $dir->close();
    ?>
    FLEX 3 :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="pic.send();">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    public var image:Object;
    private function resultHandler(event:ResultEvent):void
    image = (event.result);
    ta1.text = String(event.result);
    private function faultHandler(event:FaultEvent):void
    ta1.text = "Fault Response from HTTPService call:\n ";
    ]]>
    </mx:Script>
    <mx:TileList x="31" y="22" initialize="init();" dataProvider = "{image}" width="630" height="149"/>
    <mx:String id="phpPicture">http://localhost/php/Picture.php</mx:String>
    <mx:HTTPService id="pic" url="{phpPicture}" method="POST"
    result="{resultHandler(event)}" fault="{faultHandler(event)}"/>
    <mx:TextArea x="136" y="325" width="182" height="221" id="ta1" editable="false"/>
    <mx:Label x="136" y="297" text="List of files in the folder" width="182" height="20" fontWeight="bold" fontSize="13"/>
    </mx:Application>
    Thanks. Need help as soon as possbile. URGENT.

    i have made some changes, in the php part too, and following is the resulting code( i tried it, and found that it works.):
    PHP Code:
    <?php
    echo '<?xml version="1.0" encoding="utf-8"?>';
    ?>
    <root>
    <images>
    <?php
    //Open images directory
    $dir = dir("images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "<image>" . $file . "</image>"; // i expect you to use the relative path in $dir, not C:\..........
    //$dir->close();
    ?>
    </images>
    </root>
    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="callPHP();">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var arr:ArrayCollection = new ArrayCollection();
    private function callPHP():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Picture.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    arr = event.result.root.images.image as ArrayCollection;
    private function faultHandler( event:FaultEvent ):void
    Alert.show( "Fault Response from HTTPService call:\n " );
    ]]>
    </mx:Script>
    <mx:TileList id="tilelist"
    dataProvider="{arr}">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Image source="images/{data}" />
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

  • How to display all data on one page in web app

    Hello.
    So I have web app JSF (IceFaces framework) + JBoss all Crystal Report working perfectly. So I have page with Crystal Report tags (e.g.
    <bocrv:reportPageViewer reportSource="#{crystalReport.reportPath}" ...
    in this report I have table with some data (data from DB) and I want to display this data on one page. Unfortunately now this data are moving to the next page and unfortunately I even donu2019t know how switch to the next page (I see only info e.g. 1with 2).
    So how to display this data on one page if its impossible how to torn on pagination.

    So I canu2019t do this, I canu2019t display all data on one page (until Iu2019m using JSF tags)?
    In JSF tags Iu2019m setting only path to file. In my bean Iu2019m using u201CReportClientDocumentu201D object itu2019s easy way to load report file (u201Copenu201D method) and set parameters (u201CgetDataDefController().getParameterFieldController()u201D method) and also connect to data base (u201Clogonu201D method) but I havenu2019t this property u201CsetSeparatePages(boolean)u201D.
    Maybe Iu2019m doing this wrong and there is a simpler way maybe I can use somehow u201CCrystalReportVieweru201D please give my any advice.

Maybe you are looking for