Accessing the content of SWFLoader

In Flex 1.5 it was possible to do the following:
<mx:Application xmlns:mx="
http://www.macromedia.com/2003/mxml">
<mx:Button label="Browse"
click="myLoader.content.browse('myFile')" id="browseButton" />
<mx:Button label="Upload"
click="myLoader.content.upload('
http://localhost:8300/upload.cfm')"
id="uploadButton" />
<mx:Loader source="fileIO.swf" height="10" width="10"
id="myLoader" />
</mx:Application>
(above example is from
http://www.adobe.com/devnet/flex/articles/fp8_features.html)
However, when you try running methods in an swf (compiled
from .mxml in Flex 2) and then call those methods from an SWFLoader
instance's content property, nothing happens. I just get errors.
How can I communicate between my application and an
application loaded in SWFLoader in Flex 2.0?

Man, this is crazy, I have followed the example to a tee,
(well I believe so, but I still get the error:
Error #1034: Type Coercion failed: cannot convert
_ChildApp_mx_managers_SystemManager@101650b1 to MainApp.
On my main app, I have,
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script >
<![CDATA[
import mx.managers.SystemManager;
private var loadedSM:SystemManager;
private function allowInteraction() : void {
loadedSM = SystemManager(swfChild.content);
private function sendData():void {
ChildApp(loadedSM.application).fromMain.text = toChild.text;
]]>
</mx:Script>
<mx:SWFLoader id="swfChild" source="ChildApp.swf"
init="allowInteraction()" y="60" width="261"/>
<mx:Canvas width="278" height="150">
<mx:TextInput id="toChild" width="200" height="20"/>
<mx:Button click="sendData();" label="Submit" y="22"
/>
</mx:Canvas>
</mx:Application>
On my ChildApp, I have
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
public function toParent(): void {
MainApp(MainApp).toChild.text = toMain.text;
//local2(owner).fromChild.text = toMain.text;
]]>
</mx:Script>
<mx:Canvas width="204" height="98" x="10" y="10">
<mx:TextArea id="fromMain" width="200" />
<mx:TextInput id="toMain" width="200" y="32" />
<mx:Button label="submit" x="10" y="62"
click="toParent();" />
</mx:Canvas>
</mx:Application>
does anyone have any idea what is wrong with my sample?
Thanks
Curtis

Similar Messages

  • An error occurred while accessing the content repository from JDeveloper

    Hello,
    I'm using Jdeveloper Studio Edition Version 11.1.1.5.0
    I created Content Repository conection, following:
    RIDC Socket Type: socket
    Server hostname: localhost
    Content Server Listener Port: 4444
    Executing "Teste Connection" result "Success!"
    But, trying connect, I receive:
    oracle.webcenter.content.internal.model.rc.AbstractRepositoryLogic listFolder
    An error occurred while accessing the content repository.
    and when I login to my portal and go to administration page, then I am getting this error
    "Messages for this page are listed below.
    Could not retrieve members from policy store.
    and when I go to services tab then i am getting this error "The Documents service is unavailable.
    Error contacting the content repository."
    Please help me to resolve this problem.
    Thank You,
    Muhammad Nasir

    can anybody help me to resolve this issue please.

  • Unable to access the content of a Window (PopUp)

    Hi,
    I am trying to access the contents of a MovieClip I placed
    inside a PopUpWindow component, but can't figure how to do that. I
    have created the window with something like this:
    var SAedit_win:MovieClip =
    mx.managers.PopUpManager.createPopUp(_root, Window, true,
    {closeButton:true, title:"Arterias Sistemicas",
    contentPath:"contentSA"});
    With this code, the window IS correctly created and the
    "contentSA" MovieClip (which is in the library) is correctly shown.
    However, I wanted to access objects inside "contentSA", but I can't
    find a way to do that. I have already tried:
    - SAedit_win.content (which is read-only...)
    - SAedit_win.contentsPath (which obviously didn't work)
    - SAedit_win.target
    - SAedit_win.contentSA
    Can anybody please help me with that?
    Tanks in advance
    JLonardoni

    I believe I was not very clear in my post... What I want is
    to address a MovieClip inside a Window component I created. I used
    the PopWindow Manager to create the Window instance, and attached
    the MovieClip using the contentPath variable. The problem is that
    now I have no reference to my MovieClip, and thus, I can't access
    objects inside it.
    Is there any other way to create a window using the Window
    component, so that I could have access to my MovieClip?
    Thanks again!

  • Can a HTML Widget access the content of a iBook page?

    I am writing a HTML Widget that will present more information about the content where it is located by accessing a database. To do so, it needs to access the content of the page where it located, or, at least, the page number. Is there a way to do this?
    Sure I can 'hard code' the info in the widget's javascript and have one different widget per page/content, but that will be difficult to maintain and deploy.
    Thanks in advance.

    Hi KT!
    Thanks for your help.
    In the same line of thinking I would like to ask if it is posible to access, via javascript, the propeties of the widget so that, in thesis, use the description or title property to pass info to the script about content or page number.

  • Web Dynpro ABAP: How to access the content of a mime object?

    Hi everyone,
    does anybody know how to access the content of a mime object of a Web Dynpro component? I added a XML file as mime object to a web dynpro component. Now I want to read the content of this xml file within a method of the component controller. The code would look something like:
    DATA: xml_content type xstring.
    xml_content = read_mime_object("test_123.xml").
    Any ideas?
    Regards,
    Nils

    dude here's the modification that i've done but I can't still access the content of the properties...
               Mail mail = new Mail();
               String message2 = sqlException.getMessage();
               File file = new File("Add.properties");
               Properties props = new Properties();
               props.load(new FileInputStream(file));
               String[] emailadd = {props.getProperty("emailadd","defaultValue")};
               mail.postMail(emailadd,"An error has occurred, Auto-archive was unsuccessful.", message2,"[email protected]");
               Message was edited by:
    ryshi1264

  • How to access the content in the configuration files

    Hi, Folks,
    To make it easy, the questions can be like this:
    how to access the content in web.xml in a web application?
    Through ServletConfig and context?
    how to access the content in ejb-jar.xml in an ejb?
    initial context?
    Thanks

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • Cannot access the content producer portal via reverse proxy

    Hi all,
    I hope my post is in the right forum
    We have an FPN environment using RRA with our EP (NW 7.0 SPS18) as the consumer and our BI portal (NW 7.0 SPS18) as the content producer.  The consumer is registered with the producer using HTTP protocol.  Everything works as expected.
    We're trying to implement an Apache reverse proxy for our FPN with SSL termination so that we can access the portals from the Internet with HTTPS protocol while keeping HTTP protocol for the internal users.
    Through the reverse proxy, we can access the consumer portal and we can access the producer portal directly without any problem.  The only problem is that, if we logged onto the consumer via the reverse proxy, we cannot access the content from the producer.  We'd get the browser security warning message
    "Although this page is encrypted.  The information you have entered will be sent over an unencrypted connection. ..."
    When we hit the Continue button, we'd get the eror 404 Not Found - The request resource does not exist.
    Our Unix admin tried both Apache and SAP Web Dispatcher but we couldn't get it to work properly.  We went through a lot of blogs and documents and we are at our wits end.  We would greatly appreciate if someone can point out where we should look at.
    Thank you very much in advance.
    Dao

    Hi Kevin,
    Unfortunately, our Unix admin thinks you missed the point because my question was not clear enough
    We do not have problems with the "correct name" in the reverse proxy and our main SSL termination works fine. 
    It's just that the consumer is registered with the producer using HTTP protocol; as a result, the producer's URL link is 'hard-coded' to use HTTP protocol in the consumer portal since we are not using SSL in the internal network.  Hence, we'd like to know if there's any way to change them to HTTPS for the Internet clients while keeping the HTTP protocol for the internal users.
    I hope I made it clearer this time
    Regards,
    Dao

  • I have downloaded a book in iBooks and it shows that the purchase has gone through, but when I try to open the book it says it can't access the content.

    I have downloaded a book in iBooks and it shows that the purchase has gone through, but when I try to open the book it says it can't access the content.

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Accessing the content of the MediaPlayer for filtering purposes

    Am I correct in assuming that you can access the content of an element in the MediaPlayer so that you can apply a filter directly to it? If this is possible how can this be done? So far all my attempts to access the media content directly have failed. Help needed, Please.

    The framework has a useful utility class (called ListenerProxyElement) which manages the registration of trait add/remove events that Ryan alludes to.  You could subclass ListenerProxyElement and override the processViewChange method, which exposes the DisplayObject as a parameter, to apply your filter.  The ExamplePlayer sample app has a number of examples that use ListenerProxyElement for similar cases (i.e. to non-invasively alter the behavior of a MediaElement).

  • Accessing the Content of JMS Message

    Hi, i'm very much a beginner in Java EE so I apologise if the question is overly simple.
    I have an Enterprise Java Application which consists of an application client a web application and a Message Bean.
    The application client can send JMS messages to the message bean, which it recieves and accesses the content with message.getText(). My question is how to access this text in a servlet contained in the webapp?
    Also the servlet can send messages, which another message bean recieves, and which I want to access in the application client. This I also don't know how to do.
    Thanks for your time,
    atreides7887

    1. Do you actually have a need to convert to and from string? Why not send a java instance directly onto JMS?
    2. JMS (and Sun MQ, doesn't provide for the gathering of multiple messages. For that, you would have to either code it yourself, or take a look at iep (See [here for a blog|http://blogs.sun.com/sblais/entry/iep_for_message_ordering] on an aspect of it.) Iep is the exact answer for this type of problems, but it would require you to learn another technology and include open esb in your project. Not something you would like to do at the moment. Later when you're ready, I guess.
    3.With Java, there are many solutions to any problems. Knowing little about the problem you're trying to address, you will get a lot of different avenues from people. Hence, the topic discussion. From this description, it doesn't sound like you need them. The choice for the implementation is yours, based on your needs and expertise.
    It sound like you're using JMS as a state machine for your servlet. Is that the case? Do you actually have multiple applications talking to one another? You may need just a DB to store your image and related information, using the queuing as a trigger to know that the data is there and ready... It would avoid you sending the same data over an over again on MQ... Unless I misunderstand what you are trying to do.
    TE

  • I can't access the contents of my email. I can see the message, but the email itself won't open.

    I can't access the contents of my email on my i-pad 2. I can see the message, but the email itself won't open.

    There are 3 things you can try:
    1.  Fully close you mail app.  From your home screen, press your home button twice to bring up your most recently used apps (task bar).  With your finger, hold it on any of those apps until they all start to jiggle.  You'll see a minus sign sign on the upper left side of each app.  Touch the on the Mail icon.  Touch your home button once more to stop the apps from jiggling and then again to return to your home screen. 
    2.  If that doesn't work, reboot your iPad.  Press and hold BOTH the power and home buttons at the SAME time for at least 10 seconds (hold past the red slider to shut down) until the Apple Logo appears, then let go of both buttons and your iPad will restart.
    3.  If that doesn't work, the last resort might be to delete this mailbox from Settings > Mail COntacts Calendars, then re-install the mailbox.
    I hope one of these suggestions helps.......

  • HT1578 I have found that I can't access the contents of the encrypted disk in time machine backups.  The Finder window displays a grayed-out icon representing the disk.  Can this be remedied?

    I have found that I can't access the contents of the encrypted disk in time machine backups.  The Finder window displays a grayed-out icon representing the disk.  Can this be remedied?

    Time Machine error: Apple Support Communities
    OSStatus 5 when trying to use Lion...: Apple Support Communities

  • Can't access the content on my website server

    I recently installed an Airport Extreme router in place of a Linksys wired router. I access two outside servers connecting with FTP Transmit - one server is my local ISP on which I have 5 mg personal space and I can access this still with no problem. I also have space for my club website on another server (which I am told is probably more secure than my ISPs) and since installing Airport Extreme I am no longer able to access the files in order to update the content.
    I was able to access this server from my local library's Wi Fi so feel it must be the new router which is causing the problem.
    Does anyone know what settings I could change to remedy this problem?

    Problem resolved. AE was disabled and Airport Utility said resolution was to install update 7.5.2 which I had not done because of all the negative postings here. Didn't have much choice so installed update. Was immediately able to access my club website server!!

  • How can you access the content behind an Animate .oam file in Muse?

    I have an animation to open doors at the bottom of a parallax scroll, but once the doors open, I cannot click on any of the buttons in my "room" that were set up in Muse. Anyone have any ideas of how to fix this? I am using CC for both programs.
    par·al·lax: The effect whereby the position or direction of an object appears to differ when viewed from different positions, e.g., through the viewfinder and the lens of a camera
    More »

    Hello,
    In case .oam file is placed above the content, then I am afraid user would not be able to click on the content which is behind the animation.
    There are two workarounds that you have. Either have the content (Buttons behind the open door) placed inside the Animation itself so that users can click on it.
    Or you can have transparent Rectangles (boxes) placed in front of the animation and apply links to them. it should appear like the buttons behind the animation are clickable however it should be these transparent Boxes which would be clickable and are placed above the Buttons and the animation (on the top layer).
    Hope this helps.
    Regards,
    Sachin

  • How can I access the content of a textarea component?

    I'm trying to use a javascript form editor in my jsf project.
    The form editor writes to an html <textarea> component.
    The jsp page looks like this:
    <div style="height: 336px; left: 0px; top: 0px; position: absolute; width: 672px">
    <script language="javascript" type="text/javascript">
    tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    </script>
    <textarea cols="50" name="content" rows="15">This is some content that will be editable with TinyMCE.</textarea>
    </div>
    The content of the <textarea> component is changed with the editor.
    What I need to do is capture that content after it has been edited.
    How can I do that??
    Thanks

    I have a similar problem. When I try to watch the rented movie a pop up says "Cannot Open: The content is not authorized"     What exactly is the problem. I'm not in the US at the current moment. I'm in France. But that shouldn't be a problem right?

Maybe you are looking for