Integrating Flex created SWF into Flash project

Hi all,
Hopefully some one here will be able to help. I am using
Flash CS4 so I was hoping this would work fine as it can target the
flex library. I have a contact form created in flex which uses the
accordion component and flex's great validate functions and the
alert box. Now I can load the contact form into the flash project
via a loader and I have no problem with it bieng viewable or
opperational in the final swf. However when the user clicks the
submit button, nothing works and I get a bunch of error messages:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at
mx.core::UIComponent/setFocus()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ore\UIComponent.as:6857]
at
mx.controls.alertClasses::AlertForm/commitProperties()[C:\autobuild\3.2.0\frameworks\proj ects\framework\src\mx\controls\alertClasses\AlertForm.as:243]
at
mx.core::UIComponent/validateProperties()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\core\UIComponent.as:5807]
at
mx.managers::LayoutManager/validateClient()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\managers\LayoutManager.as:811]
at
mx.managers::PopUpManagerImpl/addPopUp()[C:\autobuild\3.2.0\frameworks\projects\framework \src\mx\managers\PopUpManagerImpl.as:347]
at
mx.managers::PopUpManager$/addPopUp()[C:\autobuild\3.2.0\frameworks\projects\framework\sr c\mx\managers\PopUpManager.as:169]
at
mx.controls::Alert$/show()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\contro ls\Alert.as:519]
at UV_Website_Contact_Form/submit()[E:\Documents\Flash\Flash
Projects\Flex
Workspace\UV_Website_Contact_Form\src\UV_Website_Contact_Form.mxml:46]
at
UV_Website_Contact_Form/__Submit_btn_click()[E:\Documents\Flash\Flash
Projects\Flex
Workspace\UV_Website_Contact_Form\src\UV_Website_Contact_Form.mxml:97]
It looks like Flash is having problems creating the Alert box
from the flex library, but surely this has been exported into the
flex swf when that was compiled? Dunno......can anyone shed any
light?
Thanks
Shane

My guess is this won't work as Flash 8 player isn't
compatible with ActionScript 3.

Similar Messages

  • Loading purchased swf into Flash Builder 4 Flex app

    I have purchased a Flash "fundraising thermometer" from an online Flash components site. It takes input from an xml file and displays a thermometer with the goal at the top and the current amount raised indicated. It came with the following files:
    thermometer.swf
    thermometer01.fla
    thermometer01.html (A sample that works.)
    xml/thermometer.xml (The source file: goal amount, current amount, mark interval, etc.)
    caurina/transitions (Mostly .as files.)
    Since the test html (thermometer01.html) works fine, I thought this would be a no-brainer.
    I first unzipped the files into a "thermometer" folder in my current project. I then went into Flash Builder and created a SWFLoader object as follows:
    <mx:SWFLoader 
    id="myLoader" source="../thermometer/thermometer.swf" complete="initThermometer();" autoLoad="true" scaleContent="false"/>\
     private function initThermometer():void { 
         Alert.show('Thermometer loaded');
    The Design view looks fine. I can see the thermometer default image (see below).
    When I run the app, I get no errors, just a broken image link in a box (see below). The alert box also never shows up.
    I'm new to Flex, so I may be doing something stupid that keeps this from working. I contacted the author of the thermometer widget but he doesn't know anything about Flex.
    Any help figuring out how to get this to work in a flex app would be appreciated.

    You should probably add more event handlers to see what's going on.  Especially "ioError". The complete list is below.  For coverage, add a handler for each event. You can also use in MXML
         complete="initThermometer(event)
    and add an argument to your Actionscript method, to find out details about the event.
    private function initThermometer(event:Event):void { 
         Alert.show('Thermometer loaded ' + event.type);}
    Events
        complete="No default"
        httpStatus="No default"
        init="No default"
        ioError="No default"
        open="No default"
        progress="No default"
        securityError="No default"
        unload="No default
    General info here:
         http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html
    I did not test my code suggestions, but it's probably close.

  • Need to import .swf into Flash 8 project

    I'm working on a project that requires me to use an already
    made .swf file in it. I'm creating the whole project (which is a
    presentation) strictly in Flash 8. This project requires a user to
    be able to navigate through various menus and categories to see
    what's in them. Most of the categories have a slide-show of images
    that are accompanied by a voice over sound track that explains to
    them what they're watching; however, for other categories I already
    have a previously created .swf file that I need to import into
    Flash 8. The issue that I've noticed when I just import the .swf
    file into Flash is that the file plays at about 100x the original
    speed. I think that it is because Flash looks at this file as one
    frame and tried to play everything all at once. I also looked into
    the possibility of trying to the loadMovie() function, but that is
    not that convenient for me because this requires me to decompile
    the .swf file into .fla and edit it so that a user has a way of
    coming back to the main menu of the presentation from that movie,
    unless there is a function parameter of loadMovie() similar to
    HTML's "_blank" where a new window opens so that the user can close
    this window without having to worry about restarting the
    presentation. I hope that what I'm doing is clear, and I'm very
    much open to any suggestions about what I should do about it or any
    other ways of doing what I'm trying to achieve, which is to be able
    to play already-made .swf files in my Flash project. To give more
    details on these .swf files, they were originally created in Adobe
    Captivate and exported into .swf. They play perfectly when you play
    them, but it's just that there is an issue when I try to play them
    from my Flash project. Thank you in advance for your help.

    Hi Braulio
    a good tutorial site can be found at
    http://www.kirupa.com
    and also, look in your Flash Docs, for loadClip() and
    loavMovie() methods. They should get you started on some ideas to
    import external content.

  • Importing Quiz project as swf into another project

    I've been playing around trying to get projects within
    projects. My latest attempt has been to create a multiquestion
    project, export, and then import into another project which has
    demos, images, ect...
    I've been able to rig it so one question swf files are
    working, but when I import projects with more than one question
    slide in them it seems to display both slides at once. I've tried
    using a paused transparent button, to no avail.
    Does this make sense? Any ideas?

    >>TypeError: Error #1009: Cannot access a property or method of a null object reference.
    That's a common mistake when loading swf's. Likely you are trying to reference the stage in the loaded movie, before it's actually been added to the stage. Use the ADDED_TO_STAGE event to init your objects...

  • Importing Video into Flash Project ?

    Hi, I want to ask you about how can I import video into my Flash Project and make it possible to view ?
    I tried to choose embed FLV but the sound quality is quite shity and the video quality too. Furthermore, It expands the timeline which is too long because my video is quite long too. It said that it can be at least 16000 Frames to run.
    Now I choose Import -> Import Video -> Load External ..... and then I put it on one scene. The thing is that when I test it, it looks like I have to expands the timeline too so that I can play the videos fully. And It will slow down the computer so much when I want to export. Is there any way I can play the video only by just creating one keyframe ?
    Please help me.

    i choose Load -> External and it gives me some FLVPlayback in the library too ... But how I can make it relate to the previous scene and it can play the whole video and then back to the first scene...
    First scene is where people can choose some option that I made of ...
    A is where I link to the scene 3 of my project
    B comes to Scene 4
    C comes to Scene 5
    What I'm stucking right now is how can I made the C choice for people to choose and they can see the videos. I tried to drag the FLVPlayback to the scene 6 and it shows some result. But I think if I want to watch the whole video I need to expand the timeline as much as possible and I really don't want that. Is there any actionscript code or some tips that I can make it possible? Sorry because I'm a newbie so I don't understand your words. Can you explain it more ?

  • Importing SWFs into Flash Library

    I used Camtasia Studio 4 on the Windows side to record some
    screen action. They play clean as SWFs in Flash player when I want
    to just watch them. However, when I import the SWF into the library
    of a new Flash project so I can use them in that project, the SWF
    comes in with a bunch of bitmaps and the bitmaps don't line up
    quite properly, the animation comes in with all sorts of artifacts.
    Why? Does anyone have a solution?

    I actually have the same question. What the previous post was referring to is that when you hit the import button in ITunes, a window appears that lets you browse your own drives for music files (like the 'file open" command). Mine defaults to the Drive D which is where my CD is inserted but the song files don't appear because my files are being read as ".acd" files and not any of the supported files. Any suggestions?
    In the import preferences in iTunes, there is no
    option to select .txt (or any of the others you
    mention), so I'm not sure what you are doing.
    Have a look at this.
    How to import music from CDs
    into iTunes.

  • Error after Integrating of Xcelsius SWF into Enterprise Portal

    Hi all,
    I integrated Xcelsius SWF file into portal using Business Objects Integration Kit - iView Template. I can see dashboard in Portal. Its working fine. I have Refresh Button in the Dashboard.  If I refresh the dashboard , it shows cannot access External Data. Failed to get the document information(LO26315).
    How can I resolve? Help me in this regard.
    I am using BOE 3.1 and LO 3.1.
    Thanks & Regards,
    Hemalatha J

    With a Live Office connection, you would typically use the URL iView and the opendocument URL to integrate the dashboard into the Enterprise Portal. There are existing posts on this forum about opendocument and Xcelsius dashboards.
    Obviously you need to make sure the dashboard refreshes fine outside of the portal, for instance from Infoview.
    Then, you need to look at the cross domain constraints : have both Infoview and Enterprise Portal in the same domain or use crossdomain.xml. They are lots of posts on this forum about that too.

  • Unable to open or import .swf into flash CC IDE

    hello, since I installed flash CC yesterday, I am unable to import .swf file into my .fla neither open .swf file in flash IDE. SWF extension is even not listed in list of supported files (I did all this normally in CS6 and before). When I try to open swf file in flash (because I got some assets in swf and need to edit it and put it to fla) it says something like "one or more files  were not imported because there were problems to read them." Shall I reinstall flash CC again or any other suggestion please ? thank you

    Maýbe you can install the trial CS6 from the product page and then sign in with your cloud ID? It has worked for me before when I had to re-install. After installed it should ask if you want trial or has a license, sign in to license and it should work again I hope. You may have to update CS6 after through the cc manager.
    Adobe should have put a full list of dropped features to read in one place before updating. It´s very poor customer management not to. But wise to all previous updates of Flash I keep every version, for ever if possible.

  • Insert multiple Camtasia created swfs as animation only displays the first animation with the template/control bar

    Greetings,
    I have started adding Camtasia created .swfs to Captivate
    projects.
    The first added animation will display the template and
    control bar the animation file is published with in Camtasia.
    After that, any additional .swf animation files also created
    exactly the same do n ot display the template or control bar and
    just play as soon as the slide begins.
    My theory is that the initial template and play button
    convince all the subsequent animations the user has pushed play.
    I would like for each animation on individual slides to
    display the template and control bar correctly and have tried to
    adjust animation timing to no avail...
    Anyone else run into this one
    Template is Camtasia Studio 5 Express Show Published as .swf
    files then inserted as animation into Captivate
    Both Camtasia and Captivate latest versions.
    Animations work correctly just need Camtasia template and
    control bar to show in all animations....
    Any help much appreciated!

    Hi maya12357 and welcome to our community
    Out of curiosity, since you already have your project output
    from Camtasia, why are you trying to insert into Captivate?
    I do have Camtasia 4, so I'm not sure if the output files
    from it are similar to 5. But I'm not sure if you will be 100%
    successful in getting all the Camtasia elements to show inside a
    Captivate project.
    Cheers... Rick

  • Link INTO Flash Site?

    My photographer wife just posted her brand new Flash site.
    And it's great.
    But, we just noticed that other specialist sites linked to
    the relevant page of her old site. Is there a way to create links
    into Flash sites without creating separate HTML pages? The idea
    would be to go to a specific navigation point.
    Thanks,
    Gary

    You can use a javascript code within the .html file pointing
    to your exact section on the flash movie. I just forget what's the
    term of that. I'll look at it and get back to you
    Spain Travel - one
    of my inspirations in using flash

  • Generating PDF with Flex App (swf) embedded

    Hi,
    Does anyone has the experience in developing a Flex Application that is to be
    embedded into a PDF and open in the Reader/Acrobat for data capturing?
    How to embed the Flex Application (swf) into a PDF in a Livecycle process?
    With the XML data prepopulated into the PDF (embedded with a schema) and
    accessible by the Flex Application when open in Reader/Acrobat.
    Users will still be able to save the data filled in the Flex Application into the PDF
    and also to generate a XML data (with data capturing in the Flex App) to be
    submitted back to the server.
    How can these be achieve? Any example?
    Thanks alot.

    Just wondering, am I in the correct section of the forum? it seems like most of the discussions listed here are related to form designing rather than form rendering.
    I know this is FORMS ES section, just that i come across something that might related to the topic.
    Has anyone try out Adobe LiveCycle PDF Generator ES2 new features?
    Based on Adobe Upgrade Center http://www.adobe.com/products/livecycle/upgrade/pdfgenerator.html, it mentioned that PDF Generator ES2 has the ability to embed SWF files in PDF.
    But is this also applicable to Flex Application compiled SWF file?
    Does the generated PDF function as a normal interactive form?
    Able to retain its embedded schema and objects (scripts)?
    I will try to install LC ES2 to try out but need sometime to setup the system, really appreciate if someone can give me a head start.
    Thanks.

  • Can I import a swf file (created in FC) into Flash?

    Can I import a swf file (created in FC) into Flash?
    ...also, do you need Flash Player 10 to play these files?

    Just did some testing here, and Flash Professional definitely does not like Catalyst projects. Importing to the stage failed silently (gotta love that), while Import to Library appeared to work - I got a MovieClip in my library. However, the clip is empty. I'd guess it is as Chris said, having to do with the fundamental differences in the Flex framework from the way Flash Pro works.
    As this did spark my curiosity, I decided to give loading the Catalyst-created project into a Flash Pro project at runtime using ActionScript. I was able to at least get the Catalyst content to appear through this method, but the effects (in this case, a simply button with a Rotate3D effect applied) was a mess.
    So the simple answer is "no".

  • Flash beginner... insert SWF into web page and create play button

    I am trying to insert and SWF into my webpage.  I have 3 problems, 1. I am new to flash and aren't any good at it yet. 2. How do I tell the movie to stop at the end, and insert a "play again" button?  3. What do I need to do to insert that into my webpage.
    I realize these aren't yes or no answers, so I even appreciate input on the best way to learn Flash for myself.

    2. It can depend, but snce you are probably using the timeline, most likely you just need to put a stop(); command in the last frame to have it stop at the end.
    To get it to play again, your button's function code will need to include something like: gotoAndPlay(1);
    How the button code gets done depends on which version of Actionscript your file is using.
    3. When you publish your swf file, also have Flash publish an html file (you set this up in the Publish Settings).  You can then take that html file and copy the embedding code it contains into your web page html file.  You may have to include a javascript file as well to make it work, and you can tell that by looking in the head code of the html file Flash created... that head code also needs to go into your web page html file and the javascript file needs to be placed according to how your html code targets it.
    You might do best just to get the html page Flash creates working for you first.  It might make figuring out how to move it into your web page easier.
    My opinion: the best way to learn Flash for yourself is to just dig in and keep at it.  You will lose hair and sleep and your mind as you go, but eventually you either get used to that and/or you overcome it.

  • Installing Flex SDK into Flash Builder 4.7 problems

    Hi,
    Im completely new to Flash Builder, today I have installed Flash Builder 4.7 & Flash CS6 from Creative Cloud for my son to start to learn game programming (with my help), I have used simple coding in web design however this terminology is new to me.
    I bought my son the latest 'Foundation Game Design with ActionScript 3.0' book on recommendation but it was written when FB was version 4.5 so im guessing this might be the problem.
    The book is very easy to follow but have hit problems at the beginning of the tutorials, the book talks about Flex SDK but it seems that FB 4.7 uses AIR SDK ?
    So the first project called HelloWorld, we got up to:
    Got an exclamation mark which said
    'The import flash.display.Sprite is not used
    locally'
    Continuing with the rest of the project the exclamation mark disappeared:
    However on selecting run- Debug we got a blank Flash Player window  ('generate HTML wrapper file' was deselected)
    So either we've done something wrong, or the book and FB version are not compatible?
    Any advice would be great!
    Thank you
    Latest ...
    I thought that installing Flex SDK may solve the problem but after following instructions I have the error message, see image below. Really stumped now!

    Sorry, if I went a little overboard. After re-reading your post, perhaps I should back up a little.
    First, there are little things that Flash Builder (FB) will complain about. Having extra import statements in your code doesn't hurt anything. If I'm trying different solutions and then commenting out the code, the import statements will hang around, FB will complain, but just ignore it. If you see a little icon on the left edge of your code editor and its a red circle with an X in it, then that is something that will have to be fixed.
    When you create an app in FB or Flash you can choose to create a web app which means it will run in a browser window. The project can optionally create an HTML wrapper, or web page that will load your app. In Flash Pro you can choose File->Publish Settings and there will be a checkbox on the left to publish a HTML wrapper. In FB, you can right click your project in the Package Explorer, select Properties at the bottom, select the ActionScript Compiler, and down at the bottom there will be a checkbox to create a HTML wrapper.
    If you're just learning Flash Builder, then the FlexSDK 4.6 and the AIR SDK 3.1 that comes with it should be fine. You mentioned Apache SDK and I'd recently been working with that so I ended up getting side-tracked.
    Getting an AIRSDK to work with when build ActionScript projects is easy. Just go to the adobe site, type AIR SDK in the search box, and you should find a page that will let you downloaded the latest version. There's also a page to let you download the latest AIR runtime, and if you were just going to run AIR apps and not build them, then that's all you would need. As a developer you'll want to install the runtime from the downloaded .exe file. With the SDK, after downloading it, installing it is easy. Just create a new folder an unzip the SDK into it, then place it somewhere easy to find. I put all my SDK's in their own directory right off the c: drive. So I have c:\AIRSDK_3.5.0.880 and c:\AIRSDK_3.7.0.1530. I use very descriptive folder names so I always know which SDK's I have to work from.
    To use the SDK in Flash Pro select Help -> Manage AIR SDK, hit the plus button and add the folder you created. Now when you've opened a Flash project, you go to File->Publish Settings and select the combo box at the top, you'll see options like 'AIR 3.7.0.1530 for Android' in the list that reflect the SDK's you've added.
    Generally with FB you'll be using a FlexSDK, or perhaps a FlexSDK overlaid with a newer version of AIRSDK. Overlaid basically means you copied the contents of the AIR SDK into the Flex Folder. The article I mentioned above will give you all the details on creating those. For instance, I downloaded the Apache Flex installer, installed it, then created an empty folder called c:\ApacheFlexSDK_4.9.1, launched the Apache installer, gave it the new empty folder I'd created, selected all the download options, and let it all download. If it launches a popup box or a security warning, you can allow it, and it will continue. Once you have the SDK and you want to use it with a project in FB, just right click the project, select Properties, selected that Compiler tab again, and up in the right corner you'll see 'Manage SDK's...'. Hit that link, add your new SDK to the list and give it a descriptive name, then selected the checkbox beside it to set it up as your default. If you do this, then all your projects set to use the default will automatically switch to it and rebuild. So if you want a project to stay with a specific SDK then select that option in your Compiler tab, and then you could use the combo box to select your new added SDK.
    When I started with FB I think I spent the first 2 days going round and round with project settings and options until I got them all figured out.
    When I develop, I usually have my browser open and I have bookmarks and favorites to let me quickly get to all the pages I use most often. Here are a few of them:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html  <---- The API reference. In the packages window check out 'Top Level' at the top and Language Elements near the bottom. I think I have this page open in one or more tabs almost every day.
    http://www.adobe.com/devnet.html
    http://www.adobe.com/devnet/actionscript/learning.html
    http://help.adobe.com/en_US/as3/learn/index.html
    http://helpx.adobe.com/flash.html
    http://help.adobe.com/en_US/flashbuilder/using/index.html
    Free videos to help you learn Flash Pro:
    http://tv.adobe.com/show/learn-flash-professional-cs6-/
    http://tv.adobe.com/show/learn-flash-professional-cs5/
    And you've already found the forums! But if you don't find an answer here, many times you can find your question already answered on www.stackoverflow.com forums.
    Ok, I think I went a little overboard again.

  • Inserting A SWF into a Captive Project

    Hi All,
    I'm trying to insert a swf into my captivate project. It goes
    onto the slide with no problem but when I preview the project the
    swf is not animated. I'm using AS3 to code the animation so there
    is only one frame. I set the frame rate in Captivate to match the
    frame rate of the swf with no success. Any help is appreciated,
    thanks.

    Hi there
    I suppose that's possible. I'm not a Flash Coder yet but
    would imagine the sky is the limit once you get things into Flash,
    as at that point it's a Flash project, no? I don't believe an
    avenue exists to take a Flash project and pop it into Captivate.
    (By that, I mean to export from Flash as a .CP file - I am well
    aware that one may create a .SWF from Flash and pop it into
    Captivate as an Animation)
    Cheers... Rick

Maybe you are looking for