FlashVars into AS3 Project.....!!?

I am working in AS3, I know what needs to be done in AS2. I am needing to pass the FlashVars value to my swf. the FlashVars variable statement for this example is hard coded, but is actually dynamic data being passed from CF. So, to simplify this, I hard coded the FlashVars variable.
So, I am having trouble passing the FlashVars variable in the following code to the AS3 coding below. Instead of "data/cgal.xml", I need it to pass the variable and dynamically read "http://www.stuartsandlin.com/adirectory/anxmlfile.xml".
I'm sure can't be that much different from AS2.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="main" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<param name="FlashVars" value="http://www.stuartsandlin.com/adirectory/anxmlfile.xml" />
<embed src="main.swf" quality="high" bgcolor="#000000" width="100%" height="100%" name="main" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
var loaderXML:URLLoader = new URLLoader();
LoaderXML.load(NewURLRequest("data/cgal.xml"));

actually you need to fix your html:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=9,0,0,0" width="100%" height="100%" id="main" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param  name="movie" value="main.swf" /><param name="quality"  value="high" /><param name="bgcolor" value="#000000" />
<param name="FlashVars" value="xmlVar=http://www.stuartsandlin.com/adirectory/anxmlfile.xml" />
<embed src="main.swf" FlashVars="xmlVar=http://www.stuartsandlin.com/adirectory/anxmlfile.xml"  quality="high" bgcolor="#000000" width="100%" height="100%" name="main"  align="middle" allowScriptAccess="sameDomain" allowFullScreen="true"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
and that actionscript:
var loaderXML:URLLoader = new URLLoader();
LoaderXML.load(NewURLRequest(LoaderInfo(loaderInfo).parameters["xmlVar"]));
and if you're using a tlf textfield that's loaded you may need an additional step.

Similar Messages

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • Loading an AS2 swf into a AS3 project?

    I have an AS2 swf that is merely an image gallery made with a few components. I tried loading this swf into an AS3 project I am working on and it seems to load in and play properly in my AS3 file. I'm not looking to communicate with the AS2 swf with AS3 code, I just want to display it and be able to use the component buttons in the AS2 file that play or stop the images from being played.  I was wondering if using this will cause any potential issues in my AS3 project. It seems to render and work fine on my machine. Thanks

    as2 swfs will play without problem when loaded into an as3 swf.

  • Other problems with loading Captivate files into Flash AS3 project

    I have a Captivate file done with Captivate 3, published to
    Flash player 9 that is being loaded into Flash AS3. The captivate
    is a simple recording of some mouse clicks in a browser. I am
    displaying the playbar along the bottom, and its buttons all work
    fine except for the progress bar, where you can drag the knob and
    scrub back & forth in your presentation.
    This progress bar is not working as it should. I see the
    mouse cursor change to a hand, but when I click I cannot drag the
    knob to control the progress bar. The other buttons in the playbar
    do work (replay, pause, play, back, forward).
    This is a unique problem in that it is only happening when
    viewed in IE (7) when loaded into my Flash AS3 project. When viewed
    in Firefox in my project, or as a standalone SWF, or as a SWF
    simply embedded onto a plain HTML page, it works just fine.
    Does anybody have any insight?
    Another thing I notice with loading Captivate files with AS3
    is the the amount of output messages it displays. Rather annoying
    (unless this is a "feature" I've yet to be aware of - heh)

    Hi,
    I know exactly how you feel, there is simple answer; replace
    Captivate for Camtasia Studio 5 at techsmith.com. The weight on
    those shoulders will be gone! You'll smile more, be more
    socialable. One Happy Person.
    I am very happy person ;)
    Kind Regards,
    Boxing Boom

  • FlashVar to as2 loaded into as3

    I am afraid I already know the answer to my question but I am
    hoping otherwise. Previously an AS2 movie loaded into an AS2 movie
    could get flashvar values through _level0 or _root. My problem is
    having an AS2 movie loaded into an AS3 movie and still letting the
    loaded AS2 have access to the flashvars. I can successfully get the
    flashvars into the AS3 movie so that isn't an issue. I searched
    around and couldn't find any posts that helped and if this has
    already been covered I would appreciate a point in the right
    direction.

    First off thank you for your replies, links and help.
    So my fears were correct, there is no easy solution. I was
    hoping that I could use loader variables to load flashvars to the
    loaded clip or something where I could still have the as2 continue
    to use _level0. The reason for keeping _level0 is the classic "I
    don't want to rewrite everything."
    Thanks again.

  • AS3 project development into Flashbuilder

    I have been using Flex3 for mxml flex RIA development and I do pure AS3 development with Flash CS3 resources, which in most cases I code in Flex Builder but test and compile in Flash AS3. Twisted I know but the reasons are simple:
    1. I can't access the fl components packages in Flex Builder easily (I have heard of ways to do so but having had a chance to research).
    2. I am often using resources from the library in a .fla file
    3. Clients in most cases have Flash but not Flex and expect a FLA
    4. I also use systems like SWFAddress so I need to compile to a .swf and test live or test the .swf in a standalone player
    Request:
    So firstly I know flex has its own components that are part of the framework but why not give us Developers easy access to the fl flash components (hence Flash Builder)?
    There needs to be an easy way of importing and using a FLA based AS3 project in Flash Builder. I heard about a Flex component that does that but why not at least give access to the library content off a FLA?
    I noticed it expects an AS3 project to be set out as Flex Builder does, using an application .as file named as that project. In the launch configuration you need to be able to browse and set your own application .as (that maybe the document class from the FLA). This would help the above request by letting users export/test in their current file/folder structure.
    Just my intial feedback.
    Cheers
    Elliot Rock

    Also, the best (and most official) way to suggest features is to log an enhancement request in the public Flex bug base at http://bugs.adobe.com/flex/.
    You may want to search to see if these have already been suggested and if so, vote on the issue. If not, file a new enhancement request and encourage people to vote on it.  

  • AS3 Project in Flash Builder

    Hi I am an experienced AS3 developer working on a Mac, been working in the CS4 IDE and using Textmate for html, PHP etc. I am very keen to use Flash Builder IDE to build my AS3 projects. I have been able to create actionscript projects but when I try to incorporate FLA and the library assets in FLAs I get stuck.The way I want to work is to use CS4  for creating graphics, timeline animation, so when I run the project it compiles the fla and scripts as if I was in CS4 ide.
    So my question: Is there any good tutorials or sites that can guide me thru setting up an Actionscript project in Flash Builder and manipulation of stage, timeline and library assets from an FLA?

    Firstly flashbuilder doesn't use a timeline, it can use assets in a CS4 compiled flash file, but knows nothing about the fla format. A good starting point would probably be to down load the tour deflex which has a lot of  flex examples with the source.
    http://www.adobe.com/devnet/flex/tourdeflex/
    there is also the cookbook page
    http://www.adobe.com/devnet/logged_in/esullivan_cookbook_20.html
    this is a great site for resources when you run into problems
    http://blog.flexexamples.com/
    Adobe also have a lot of video tutorials which are great to get an idea of just how Builder works.
    David.

  • There are some strange problems when i used swc files in my as3 project

    Hello everyone,
            My development environment:  fdk4.0,  flash cs5.5,  I publish fla file by using flash cs5.5,   publish setting is  fp version :10.0&10.1 ->swc. I imported swc files to my as3 project and  complied them by using flex sdk4.0. When i run my project,fp was crash.   when i republished on fp 10.2, the project works. Is there any reason?
            another strange problem, for example   a MovieClip's aslink named "A" in swc, it has a textfield named "subText".  I write code like below:
                            var mc:A = new A();
                            mc.subText.text = "test";  
             when mc called "subText" , fp throws null property error, it can't find  subText..  very small number of movieclips have this problem,  I sloved this by duplicating a new one and rename it.
             but i don't  know why ? 
              thank you for your reply.

    I should have figured that out from your original post. I think there is a possibility that your bookmarks/history database (places.sqlite) has a corrupted record. Rather than take drastic action on that immediately, could you do a test? The test is to exit Firefox, rename your existing database, and restart Firefox. Firefox should import your last bookmarks backup. You then could check whether the problem remains or whether you got a clean restore of bookmarks. After the test, assuming you prefer to retain your history, you could undo the procedure and try restoring your bookmark backup into the database to see whether that overwrites the problem record. If not, then we would go back to possible drastic action.
    '''Test procedure''':
    Open your current Firefox settings (AKA Firefox profile) folder using
    Help > Troubleshooting Information > "Show Folder" button
    Switch back to Firefox and Exit
    Pause while Firefox finishes its cleanup, then rename '''places.sqlite''' to something like places_20130614.sqlite. Keep this window open.
    Restart Firefox. By design, Firefox should import your last automatic bookmark backup.
    If you return to the Library dialog, how does it look?
    '''To reverse the test''' (but preserve a backup of your history/bookmark database):
    Exit Firefox
    Delete the newly created places.sqlite file
    Right-click copy and paste the places_20130614.sqlite and rename the copy to places.sqlite
    Restart Firefox and open the Library dialog. Should look like it did a few minutes ago before any changes.
    ''If the test showed no corruption,'' try to restore your last bookmarks backup. The procedure is described in this article: [[Restore bookmarks from backup or move them to another computer]].
    Does any of that get us closer to a solution?

  • Help with getting Events into a Project please

    I apologize if this topics been covered here or somewhere else on the Apple website(s), but I cannot get my Events into a Project in iMovie. I've read the directions, watched the videos, and looked at these pages but can't seem to find an answer. At this point, all I want to do is download video from my camcorder to save it and edit later (when I have more time). I managed to download video from several events from the flash drive on my Canon Vixia HF11 and it appears in the Events library. I can play it and select clips without difficulty. I tried to select all the Events (all together and separately) to move to a project (after opening a new project), but the cursor bounces back. It will allow me to select clips but this is very cumbersome and time consuming and I don't want to edit now - I want to save all the video. The "add to project" button doesn't work. Am I missing something? There must be some way to select ALL the video in all the Events I've downloaded to put into one project. BTW, we're only talking about 40 minutes of video. If possible, please post screen shots so that I can see exactly what to do. Any help is much appreciated.

    DocRock54 wrote:
    .. to select ALL the video in all the Events I've downloaded to put into one project. ..
    no, not avail.
    and 'off'-concept of that tiny edit-app:
    when you import, you create a Library of all footage.
    iM will split these videos (by date) into seperate 'Folders' = Events.
    the idea of iM is, to offer you this Library to create a SELECTION of it for any given Project. there are very rare cases I can imagine, you add ALL material of one Event into one Project (in the Event Window hit apple-a), even a Lecture allows to edit here&there.
    but adding all material from any imports into one Project? no. no need = no feature.

  • I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0.  Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file ext

    I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0. so I can reburn the films on a single BluRay disc. Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file extensions on the VOB files to MPEG but this was no help. Some of the VOB files contain numerous film clips but my software does not appear to be able to recognize them as such. I need to know if replacing my old Premier Elements with the new Version 13 would solve this problem or not. Any advice would be greatly appreciated!
    Bob

    Bob
    What do you have now.....
    What computer operating system do you have?
    We can go into the finer points of source and your intentions, but for now it would appear that you are using SD 4:3 source media to get to a HD 16:9 result. Lots to discuss in this regard.
    What was given to you on the DVD disc? DVD-VIDEO 4:3 or something else?
    If DVD-VIDEO on DVD disc, you should expect to find on the disc a folder named VIDEO_TS. That is your target for your video files.
    If you were given a DVD-VIDEO on DVD disc, then all you want from it are the video files, specifically
    VTS_01_1.VOB, VTS_01_2.VOB, and so on through that series until possibly getting to
    VTS_02_1.VOB, and so on. How many files you have beyond the VTS_01_1.VOB file will depend on the size of the DVD-VIDEO.
    Does the above scenario apply to you?
    The alternative might be someone giving a DVD disc (data disc) which contains just the VTS files mentioned which were copied from
    the VIDEO_TS Folder. So, you do not get the whole VIDEO_TS Folder, just the essential video files. Does this scenario apply to you.
    I see no need to replace your Premiere Elements 4 with a later version unless you have a huge project and need a later version that will be a 64 bit application running specifically on Windows 7, 8, or 8.1 64 bit computer.
    Consider...Premiere Elements 4 and if you have DVD-VIDEO on DVD....
    1. Place the DVD disc in the burner tray
    2. Open Premiere Elements 4 and set the project preset for NTSC DV Standard (assuming you are working in a NTSC setup)
    3. Go to
    Get Media
    "DVD, Digital Camera, Mobile Phone, Hard Drive Camcorder, Card Reader"
    "Adobe Premiere Elements - Media Downloader" and its Advanced dialog.
    Set the Source in the latter dialog for the drive which has your DVD disc inserted in its tray
    You should see your VTS_01_1.VOB thumbnail in the "Adobe Premiere Elements - Media Downloader" Advanced dialog.
    With this VOB selected, click on Get Media to get the file from there into the project.
    Should work fine.
    Complications may be involved if the people who processed your footage gave you something other what is described above.
    Please review and consider, and then we can plan our project strategy accordingly.
    Thank you.
    ATR

  • How can I combine to different projects into one project?

    I would like to combine various projets into one project is the possible.

    Hello Tom,
    I have tried to copy and paste the two projects, both in the project library and in the timeline.  In the timeline the paste option is not highlighted and paste does not work.  In the project library I highlighted the project and copied the project, but I was unable to paste into the other project.  Is this done in the project library?  The paste option is hightlight but each time I paste it does not work.
    Thanks for your help

  • How to add a project into master project by Powershell

    How to add a master project and sub-projects powershell
    I use project server 2013, I want inserting multiple sub-project plans into a project master

    Hello,
    You can't do this directly in PowerShell using the PSI etc. as the PSI can't create master projects / insert subprojects. You could however do this in VBA if required or automate Project using PowerShell COM object.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to add the library of linphone into existing project ?

    How to add the library of linphone into existing project ?

    How to add the library of linphone into existing project ?

  • Merged Project - Can you share images between multiple projects/topics without images actually copied into each project?

    I have a merged project that I use the same images in several topics in different projects. I use the resource manager but each time these images are being copied into each project. My merged project is getting so large it is taking forever to download. I hope I'm just missing a step to eliminate the redundant usage of these images.

    I'm concerned since the complete merged projects have increased in size on a steady basis. For example, January 2014 project size was 288mb and I just published again today and it has increased to 353mb. There are so many images replicated over and over in each merged project. We are getting complainants from our customers on the size of our online documentation. I was hoping for a easy solution and thought this might be the best way.

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

Maybe you are looking for

  • Tecra M11-17V with Windows 7 - Web Cam image is very grainy

    Hi, Yesterday my webcam (built into the laptop) worked perfectly, today it doesn't.... Whenever I use it now, the image is very grainy, almost like a tartan pattern of criss-crossing lines, but I can still just about make out myself in the background

  • CS6 Master Suite Trial Issues Getting Started

    Hi, I am both a Macbook andCS newbie  ;-) I've had a nightmare first downloading the Adobe CS Download Assistant and now the actual software. It has put Adobe CS6 folders in my Finder, but they seem to be empty and I can't open them. Can anyone help

  • Relating debugging of program.

    hi experts. i want to learn how to do debug of program. how to use break point. how to use watch. how to debug selection-screen and module pool programming. please help it is very urgent. give some link also.

  • EDI Inbound-Port definition

    Hi, We are doing EDI Inbound for PO. For this I need to define the port(Sender Port) as in the control record(i.e as they r sending) .If they change their port it is not working what shold I do for this. regds, Vinsa.R

  • System errors -  creating a log file

    Is there any class, method for trapping system, application errors, exceptions and warnings in a system and then creating a log file.