Embed .swf question

I have a flash .swf file inwhich I embed into my flex
application. In the flex application I have a login. In the flash
file i have buttons which control the navigation of the flash file.
I want to validate if the user is logged in before allowing the
buttons to work. Is this possible?
Thanks
JoSh

If you flash SWF is a SWF9 then you will be able to
communicate in a function-call fashion as if the flash SWF is a
component. Using SWFLoader, the content child is the flash SWF.
If you are using a SWF8 or anything earlier, you will need to
use LocalConnection. The reason is the SWF9 is ActionScript 3, just
like Flex, and they reside in the same Flash Player VM (virtual
machine). SWF8 and earlier are ActionScript 2 and must run in a
different virtual machine; this makes it possible for Flash Player
9 to play all previous Flash content.
LocalConnection allows for one-way communication between any
two Flash Players (or VMs).

Similar Messages

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • How to embed swf in fla?

    can anyone help me how to embed swf to an fla?
    thnx!

    If the swf has actionscript in it, then you cannot embed it and still have it work (it will lose its code), so you need to load the file dynamically instead.

  • Problem with embed swf in fla

    hallo,
    I am trying to embed an SWF into an FLA (My website)
    I want to embed an SWF movie on page 4 of my website along with other content.
    There are a lot of tutorials on the web, but to be honest, I get so confused, a lof of them have errors so I figured i'd ask here if anyone knows of a good, simple tutorial on how to embed SWF in FLA.
    thanks so much.

    The mask would be a separate layer that sits above the layer your animation is in.  So if you right clicked the layer the animation is in and selected mask, then that's not masking it, it turning it into a mask.  What you want to do is create another layer above it and draw a rectangle that would be the same size as the stage of the swf.  Then if you right click that layer it and select mask, the rectangle will be the mask for the anoimation--allowing only what is beneath it to be viewed.

  • Can you embed survey questions in discontinuous places on a Web site?

    Can you embed survey questions in discontinuous places on a Web site? By analogy, think of an online magazine that would have survey questions at the end of each article. The reader would never go through the survey from start to finish, but rather read an article, then answer questions about subjects covered in the article, then read the next article, answer or skip questions, and so on. In this scenario, if there are 30 survey questions, I would not want 30 separate surveys, but rather an means of rolling up all the answers from a single respondent who logs into the Web site. Can Acrobat forms help in this context, or do you know of other software/services that I should consider?

    You could look into a service such as http://www.formsite.com/. I believe it can do what you want. The support there is excellent so if you can't find the answer looking around, just contact them.

  • Interactive swf question

    hello forumers.
    im exporting an swf file from indesign,and id like to know why indesign or the swf  generates an empty blank left hand page.?
    and when im making a pdf file,everything seems a bit buckled and pixelated although my images are 300dpi
    thank you.

    Hi
    First - There is nothing stopping you continuing to use swf's with html5 as the object/embed code used is still valid and recognised by html5.
    Second - You are probably asking this question due to the fact that the iPhone/iPad does not allow flash content. Unfortunately there is no way to get flash to play on these devices, (at the moment, but this could / probably will change). To use interactive graphics on these devices requires the use of the canvas element and javascript, but unfortunately the canvas element are not usable on current versions of IE, (IE9 does allow them).
    There is a javascript fix that will allow the use of canvas on IE versions prior to IE9 but I cannot recommend its use due to its speed of rendering except for very simple animations, (and I do mean very simple).
    The general opinion of most designers/developers appears to be that unless your target audience is the iPhone/iPad, then continue to use swf's for such items for the next few years at least, after all, the purchasers of the iPhone/iPad did buy these devices, (in most cases) knowing that they could not render flash.
    PZ

  • Publishing .index Vs .swf  How to make my file look like the .swf Question

    Hi, I currenly have a site published where the domain is reading
    www.mysite.com/index.html  (example)
    When I view this site the image is not centered and when I expand it in different browers it does not look good.
    When I view the site by looking at it through the exact location of where I have the flash, for example www.mysite.com/index.swf  It's exactly how I want it to look.
    Is there a code I can put into the html where I can have the same look as the .swf but view it with the .index.html
    For example when I am testing the .swf extension and change the size of the browers or expand it, the flash movie is always centered and looks great in every brower.
    I was thinking of changing the domains link to the .swf file to solve the issue, but is by having the .html extension provide greater serach information.   What is it nessary?

    You seem to be confusing the .swf file with the Web page that the .swf file goes on. For Internet delivery you want the index.html web page.
    You can "Publish" the page directly from Flash. Under the "File" menu, look for Publish Settings and review ALL the options before "Publishing" the swf.
    If you don't understand them, Google for that specific option.
    Also review "Flash scaling"
    Here are examples of different scaling parameters available in the Publish settings. You can also add these parameters directly in the html (<param name="scale" value="noscale"). All the examples replace the actual Flash dimensions with 100% for both width and height (width="100%" height="100%"). These examples use the old <object> and <embed> to illustrate the different ways to scale Flash. Once you understand how it works I’d recommend that you use swfobject to place the Flash in your final project.
    View the source code for each page to see the full code.
    http://www.cidigitalmedia.com/tutorials/scale/exact_fit.html
    "exactFit" scales the file to fit exactly within the confines of the screen, irregardless if the movie becomes consequently distorted. The original aspect ratio is not maintained. So round things are not round and squares are not square.
    http://www.cidigitalmedia.com/tutorials/scale/noScale.html
    "noScale" is the default setting, and causes the movie to be displayed at the originally designed dimensions.
    http://www.cidigitalmedia.com/tutorials/scale/no_border.html
    "noBorder" causes the movie to be scaled to what ever dimensions are needed to have no border surrounding the movie within the player, which consequently could result in some of the movie being cut off from view. In other words, the movie will maintain the original aspect ratio and will fill the screen completely. But if the movie has to be streched wider to fill both sides of the screen, it will also stretch taller, but then some of the top and the bottom of the movie may be cut off from view.
    http://www.cidigitalmedia.com/tutorials/scale/show_all.html
    "showAll" scales the movie to the size of the screen (which could cause pixelation if the file contains raster information), the difference between showAll and exactFit is that showAll mantains initial movie size proportions. Because it maintains the original aspect ratio, there can be space to the sides or the top and bottom. But everything always shows and they are not distorted. But notice the photo in the center, it becomes pixilated at larger screen resolutions.
    The trickiest part of trying to go full screen is that it’s difficult to make the Flash wider without making it taller also, that is, to maintain the correct proportions or aspect ratio of everything on the stage. These methods are just simple scaling accomplished with html. There are also methods to dynamically scale the stage and it’s elements using Actionscript… but that’s a much more complex undertaking.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    Adninjastrator

  • Embed swf to open in new page

    Hey guys,
    I got this code to upload a few swf files. It worked just great, except I have the swf plays within the same page. I'd like to add something like a "_blank" code to have the swf plays in a new browers window. But I don't think that's the code for it, and I don't know where to put it.
    PLEASE help..
    THANKS
    existing code I"m using:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0"
    WIDTH="320" HEIGHT="240" id="XXX">
    <PARAM NAME=movie VALUE="XXX.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=base VALUE=".">
    <EMBED src="XXX.swf" quality=high WIDTH="320" HEIGHT="240"
    NAME="Nextel1" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" base=".">
    </EMBED>
    </OBJECT>

    There's nothing wrong with the code.
    If you want the flash file to open in a new browser window, put the swf file on the server and make a hyperlink to it that opens in a new browser window.
    Or create a webpage as you have now and make a hyperlink to it so the page opens in a new window.
    You add a hyperlink on the page where you want the hyperlink.
    It's the way a website works and it's not iWeb specific.
    You may want to learn html etc.

  • How to embed swf in flash player with skin

    Hi,
    I tried to embed a swf in asp.net page. The code is
    OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" WIDTH="498" HEIGHT="288" >
                    <PARAM NAME=movie VALUE="../Flash/PersonalGreetingMovie_002a_B.swf">
                    <PARAM NAME=quality VALUE=high>
                    <param name="wmode" value="transparent">
                    <param name="FlashVars" value="&streamName=FLV_Video_URL&skinName=Flash%2FSkinOverAllNoCaption%2Eswf&autoPlay=fal se&autoRewind=false">
                    <EMBED src="../Flash/PersonalGreetingMovie_002a_B.swf" quality=high wmode="transparent" FlashVars="&streamName=FLV_Video_URL&skinName=Flash%2FSkinOverAllNoCaption%2Eswf&autoPlay =false&autoRewind=false" WIDTH="498" HEIGHT="288" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
                </OBJECT>
    But it got error:
    Error #2044: Unhandled skinError:. text=[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="
    Error #2035: URL Not Found. URL: SkinOverAllNoCaption.swf"]
    It seem that skin swf of SkinOverAllNoCaption.swf can not be found or loaded. Please help.Thanks.
    York

    If the swf has actionscript in it, then you cannot embed it and still have it work (it will lose its code), so you need to load the file dynamically instead.

  • Embed SWF in to Slide Presentation

    I've started a Flash animation from a Slide Presenation
    Template in Flash 8. I'm using it to share information prior to a
    web conference. I'd like to embed a SWF game on the last slide so
    the participants can play the game while they are waiting for the
    conference to start. What is the best way to do that?

    "LoudBARC" <[email protected]> wrote in
    message
    news:f64gr2$mor$[email protected]..
    > I've started a Flash animation from a Slide Presenation
    Template in Flash
    > 8.
    > I'm using it to share information prior to a web
    conference. I'd like to
    > embed
    > a SWF game on the last slide so the participants can
    play the game while
    > they
    > are waiting for the conference to start. What is the
    best way to do that?
    Dump your game into a container movieclip (if that's possible
    - assuming you
    have the source .fla file for the game) that you can then
    drag onstage.

  • Embed SWF into blog

    Hope this is the right place to ask.  I am having trouble embedding a SWF file that I created into my blog page. I tried to upload it to sites.google.com but the direct link to the SWF file is hidden behind an https:// that I can't get rid of and other people can't see it. How can I embed a SWF into blogger?  Are there other free sites where you can simply upload files and link directly to them?

    I have also had this issue since www.megaswf.com started charging for hosting services.  The solution I found was to host the file on Google Sites as you mentioned, however I created a FileCabinet page, using a blank google template (you can google how to do this) and this enabled me to host the file.
    Once the file was hosted, I simple looked up an appropriate html code to embed into Blogger, such as the one here: http://www.free-video-hosting.net/embed-flash.php
    When you paste in the url from the google site, it creates a ton of numbers at the end of the URL.  You need to delete everything after the .swf of your filename.  You need to replace the words "video-filename.swf"  with your url both times that it appears.
    I hope you have solved the problem by now and hope this is able to help some others...

  • Load SWF Question

    In an effort to explain my question as best I can, I will
    name the three swf files A, B, and C.
    So I have swf A which has an opening call to load swf B into
    an empty container inside swf A. This works just fine using:
    loadFile("B.swf");
    Now, once swf B loads into the container which contains an
    "enter site" button, I cant figure out how to load swf C into swf
    A's container to replace swf B. Does that make sense? I have
    uploaded my struggle so far for you to see...
    http://vojodesign.com/proofs/bohemianInd
    Thanks in advance

    Hmmm, I'm not quite sure what you mean. Here is what I have
    currently inside swf A's timeline. Where do I plug in the code you
    suggested?
    btnEnter.onRollOver = over;
    btnEnter.onRollOut = out;
    btnEnter.onRelease = function() {
    if(current != "bohemianIndHome.swf")
    loadFile("bohemianIndHome.swf");
    function over():Void {
    this.over = true;
    this.play();
    function out():Void {
    this.over = false;
    this.play();
    }

  • HTML to embed SWF

    Well got my portfolio site finished in Flash but neither of
    the size of the layout (600x800p) and therefore sharpness of the
    text publishes properly - I was trying to get around embedding the
    swf in html but I guess I'm gonna have to.. anyone got any inspired
    solutions/code for these problems?? thanks

    try this code
    replace red type with your own info
    <HTML>
    <HEAD>
    <TITLE>your page name</TITLE>
    </HEAD>
    <BODY bgcolor="#000000">
    <CENTER>
    <!-- URL's used in the movie-->
    <!-- text used in the movie-->
    <!--your page name-->
    <OBJECT
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
    WIDTH=715 HEIGHT=445>
    <PARAM NAME=movie VALUE="Your swf.file.swf">
    <PARAM NAME=loop VALUE=true>
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#000000>
    <EMBED src="Your swf.file.swf" loop=true quality=medium
    bgcolor=#000000
    WIDTH=715 HEIGHT=445 TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="
    http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
    </EMBED>
    </OBJECT>
    </CENTER>
    </BODY>
    </HTML>

  • Embed swf change Stage.scaleMode

    Is it possable To change the scale mode of a swf in the html embed code?
    my problem: I have the popular free flash game 'metal slug' as a swf, Its too large and wont resize as it was exported by who ever made it to preserve aspect ratio....
    Ive been trying all day to get it to resize but it wont:
    <div id="Nested" style="position:absolute; left:22px; top:32px; width:400px; height:300px; z-index:1;">
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="300">
        <param name="movie" value="metal_slug.swf">
    <param name="scale" value="exactFit">
        <param name="quality" value="high">
    <param name="flashvars" value="Stage.scaleMode=exactFit">
        <embed src="metal_slug.swf" scale="exactFit" flashvars="Stage.scaleMode=exactFit" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="300"></embed>
      </object>
    I have tryed lots of different things including trying to tell the swf through flashvars to be 400 by 300, Ive tryed to decompile it and re-export it with sothink but that didnt work as its no longer reconised any of the game sounds, text, and didnt load any more (tryed and tryed)
    I have searched and searched all through google but this swf still refuses every thing i try!
    please can some one show me how to resize this swf?

    Try publishing swf as width 100% and height 100% (File -> Publish Settings -> HTML -> Dimensions: Percent). Then you can bound it with div and set dimensions of div.
    Hope it solves your problem.

  • Embed SWF in Firefox & Safari is Tiny

    I am using some swf files as buttons in flex as follows, and
    they look fine in Firefox when testing from Flex Builder, and in
    IE(6&7) when run, but in Firefox & Safari the embedded swf
    are tiny, 1px high and a few wide when I view them from a web
    server. I can click them and they work, but I have no idea what is
    causing them to be so miniscule just in Firefox.
    [Embed(source="../assets/MostRecent.swf")]
    [Bindable]
    public var btnMostRecentSWF:Class;
    <mx:Image id="most_recent_btn"
    source="{btnMostRecentSWF}" width="95" y="20" x="0"
    useHandCursor="true" buttonMode="true"
    click="onNavClick('mostrecent')"/>
    Any ideas would be appreciated. I've tried loading with and
    without SWFObject, getting rid of various attributes, etc. I almost
    want to say that Flex thinks the buttons are sitting in a stage
    800x630 (the app size) or something and is then scaling them down
    to fit in the space provided.
    Using Flex Builder 3 M2 (tried with 2.01 hotfix as well).
    Thanks.

    I'm having a similar problem with a Flex app in Firefox when
    running from a remote server. The page opens, but the swf file is
    just a strip across the top of the page. I know there's a problem
    with Firefox when the app is sized to width=100% and height=100%,
    but I want the app to be able to re-size. I also discovered there
    is a DOCTYPE issue with Firefox and Flex. If you add a doctype to
    your html wrapper, things will look fine in IE, but not work in
    Firefox. I haven't found (yet) a good solution, other than to have
    the page without a DOCTYPE (works fine then) and I want to be
    standards compliant.
    If I find an answer, I'll let you know.

Maybe you are looking for