Final .swf file works different (and BAD) like while runing in flex

OK, next question!
How is it possible, that when I compile Flex project, everything works, but when I click on html file from bin-debug folder, nothing works?!
I use SDK 3.2. and flash player version is set up to 10.0.0.
When I run the project, I am able to load image and work with it. When I run html file from bin-debug folder, I am suddenly NOT ABLE to load that image!
What's wrong?
This is my code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="632">
    <mx:Script>
        <![CDATA[
            private var fileRef            : FileReference; //browser souboru
            private var fileFilter        : FileFilter; //seznam pozadovanych koncovek souboru (obrazky = ".jpg ...")
            private var loader            : Loader; //nahraje obrazek z browseru
            private var photoBitmap        : Bitmap; //nahrany obrazek ze souboru
            private var photoData        : BitmapData; //data obrazku ze souboru (pristup k pixelum obrazku)
            private var shape            : Shape = new Shape();
            public function Browse() : void
                fileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
                fileRef = new FileReference();
                fileRef.browse([fileFilter])
                fileRef.addEventListener(Event.SELECT, onImageSelect);
            private function onImageSelect(event:Event) : void
                photoPanel.title = fileRef.name;
                fileRef.load();
                fileRef.addEventListener(Event.COMPLETE, onDataLoaded);
            private function onDataLoaded(event:Event) : void
                var tempFileRef : FileReference = FileReference(event.target);
                loader = new Loader();
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPhotoLoaded) ;
                loader.loadBytes(tempFileRef.data);
            private function onPhotoLoaded(event:Event) : void
                photoBitmap = Bitmap(event.target.content);
                photoImage.source = photoBitmap;
            private var isDrawing        : Boolean;
            private var drawSize        : Number;
            private var drawColor        : Number;
            private function onImageMouseDown(event:MouseEvent) : void
                isDrawing = true;
            private function onImageMouseUp(event:MouseEvent) : void
            private function onImageMouseMove(event:MouseEvent) : void
                shape.graphics.beginFill(0xFF0000);
                shape.graphics.drawRect(event.localX-1, event.localY-1, 3, 3);
                shape.graphics.endFill();
                photoImage.addChild(shape);
        ]]>
    </mx:Script>
    <mx:Button x="10" y="418" label="Upload" click = "Browse()" />
    <mx:Panel x="10" y="10" width="400" height="400" layout="absolute" id="photoPanel" backgroundColor="#D9D4D4">
        <mx:Image x="0" y="0" id="photoImage" mouseMove="onImageMouseMove(event)"/>
    </mx:Panel>
</mx:Application>
IN HTML pages I call the swf file this way
            <script type="text/javascript">
                if (AC_FL_RunContent == 0) {
                   alert("This page requires AC_RunActiveContent.js.");
             } else {
                   AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0','nam e','postcard','width','700','height','500','align','middle','id','postcard','src','postcar d','quality','high','bgcolor','#ffffff','allowscriptaccess','sameDomain','allowfullscreen' ,'false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','postcard' ); //end AC code
            </script>
            <noscript>
                <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" name="postcard" width="700" height="500" align="middle" id="postcard">
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="false" />
                <param name="movie" value="postcard.swf" />
              <param name="quality" value="high" />
              <param name="bgcolor" value="#ffffff" />
              <embed src="postcard.swf" quality="high" bgcolor="#ffffff" width="700" height="500" name="postcard" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                </object>
            </noscript>

Is there a difference in the URL in the address bar in the browser?
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

Similar Messages

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • How to export swf file in different versions of flash like (6,7,8,9) ?

    Hi,
        System Specification :
        -XP with SP3
        -MS Office 2003
        -Flash V.10
        -Xcelsius Engage 2008 ( 5.3.0.0 )
        -Xcelsius Build number 12,3,0,670
       When I export output in swf format then xcelsius generating swf file of version 9.  I want to export swf file in different versions of flash like (6,7,8,9) .  I tried to install older versions of flash to do this but I am not able to open xcelsius in older version. I am getting error saying 'Install latest flash player'.
    Is there any way to export  swf files in different  versions?
    Is this build is compatible with only flash 10?
    Thanks,
    Ganesh

    Xcelsius only support Flash version from 9 on. There is no way to export to 6,7 or 8.

  • Flash CS6 cant open play SWF files without importing and destroying them, how can I get around this?

    Flash CS6 can't open play SWF files without importing and destroying them, how can I get around this?
    I'm just trying to preview an swf file in flash like I have with all previous versions.

    What if my SWF loads external content from an online server?
    Not only does the current flash player prohibit such activity, it doesn't even pop open an error anymore saying there was an error connecting to an online source.
    Normally, I would simply drag the SWF into Flash and all connections would go through.  I could see traces, errors, and experience no issues.
    Now I can't even do that.  So what then?  You have crippled a fundamental use of the program, but THANK GOD we have that deco brush that nobody asked for.
    And for the record, the nature of my work benefits from not necessarily allowing the Flash Player to connect to online content.  The error it pops up?  That's simply another method of error checking that I require.  Updating the Flash Player options is not an option.
    Why would you even remove this key feature from Flash anyways?  It's been there for years ... has the ratio of people importing SWFs (a rather useless gesture in an increasing OOP world) really outweighed the people using Flash as a testing environment that much?

  • Reply address: is it possible to use another reply address other than the pop address used in my account. I have a special work account and would like to send emails with that address as my reply address...or sent from address

    Reply address: is it possible to use another reply address other than the pop address used in my account. I have a special work account and would like to send emails with that address as my reply address...or sent from address

    i found out how to do this finally!
    1) set up google gmail account to forward your emails to (from the [email protected])
    2) go to your gmail account
    3) go to settings (cog in right hand corner)
    4) go to 'accounts and import'
    5) go to 'send mail as'
    6) click 'Add another email address you own' - add your [email protected] address
    7) google will send a verification email with code to that email address.
    8) enter code
    9) go back to gmail account  >'send mail as' and select 'make default'
    10) close mac 'mail' program and reopen it.
    as long as you have gmail account selected as the primary account in MAIL - mail will now come throught as being sent from that  [email protected] address!!

  • Save as swf file using httpconnection and file io

    I have one application which is fatch the swf file from web and i want to save as in same to swf file format.
    when i have fatch the swf file and save as .swf format i have unable to view as flash animation in browser and micromedia.
    Anyone suggest me ?
    URL url = new URL("http://nileshpatel.com/abc.swf");
    HttpURLConnection con = (HttpURLConnection) url.openConnection();
    con.setRequestProperty( "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );
    BufferedReader rd;
    rd = new BufferedReader(new InputStreamReader(con.getInputStream()));
    String line="";
    String content="";
    File f = new File("users/nileshpatel/neo.swf");
    FileWriter fw = new FileWriter(f);
    while ((line = rd.readLine()) != null) {
    content += line;
    rd.close();
    fw.write(content);
    fw.close();
    ############################################################

    BTW sometimes flash uses communication with server to obtain some information before/during running. In such case you'll need to provide kind of your own HTTP server, pass swf to browser using HTTP protocol (not directly from HDD) then pass all additional data.
    Hope this is not your case :)

  • One day it just stopped focusing and the pictures are blurry.  If I switch it to the front camera it works well and looks like it should but when I turn it back it goes back to being out of focus and I can't figure out how to fix it?

    i installed ios 7.after  that my primary cam, one day it just stopped focusing and the pictures are blurry.  If I switch it to the front camera it works well and looks like it should but when I turn it back it goes back to being out of focus and I can't figure out how to fix it?

    This advice will sound like a joke or prank, but believe me it worked on my iPhone 5 and my daughter's.  The lens mechanism got stock on each of our iPhones.  We found a post on these message boards that said to hold the iPhone about 6 inches above a table or counter top and drop it so that it lands flat on it's back.  Now try the camera ...Fixed!  It has been more than six months now and neither of our iPhones have ever experienced the problem again. 

  • Swf file works but not html when preview and publish

    hi,
    i made a simple nav bar with a dropdown menu it works fine in flash mode and preview but when i try to embed into html it only show the nav bar but not the dropdown menu. please advice.
    thanks in advance!

    http://lunarvision.zxq.net/banner_flash_test.swf // the swf file
    http://lunarvision.zxq.net // when it on the website.
    thanks!

  • Newbie, please help--swf files work fine separately, don't work when on same page

    Hello all,
    I am new to flash, and piecing together different templates to try and  learn things.
    I have run across a strange problem. When I load products2.swf by  itself, I can call the two "copy" files and everything works. When I  open 0342.swf (the index page), I can switch between the home and  products2 pages, but I can't view the "copy" pages.
    I'm guessing there may be some sort of conflict with variable names,  but I have been messing with it for most of today.
    I have uploaded all of the FLA files to here:
    http://littlebuddymedia.com/flashhelp.zip
    If you make an swf file out of each of the attached items, and open  the 0342 file, you will see what is supposed to be happening.
    Any help anyone can offer is greatly appreciated.
    Below is the code from each relevant button in case that is easier for  some of you.
    Thank you in advance!
    From the 0342 page (the index page)
    My "Home" button
    on (release) {
    if (_root.currMovie == undefined) {
    _root.currMovie = "home";
    _root.container.loadMovie("home.swf");
    } else if (_root.currMovie != "home") {
    if (_root.container._currentframe >= container.midframe) {
    _root.currMovie = "home";
    _root.container.play();
    My "Products" button
    on (release) {
    if (_root.currMovie == undefined) {
    _root.currMovie = "products";
    _root.container.loadMovie("products.swf");
    } else if (_root.currMovie != "products") {
    if (_root.container._currentframe >= container.midframe) {
    _root.currMovie = "products";
    _root.container.play();
    FROM THE PRODUCTS2 page
    My "copywebdev" button
    on (release) {
    if (_root.currMovie == undefined) {
    _root.currMovie = "copywebdev";
    _root.copycontainer.loadMovie("copywebdev.swf");
    } else if (_root.currMovie != "copywebdev") {
    if (_root.copycontainer._currentframe >= container.midframe) {
    _root.currMovie = "copywebdev";
    _root.copycontainer.play();
    My "officetech" button
    on (release) {
    if (_root.currMovie == undefined) {
    _root.currMovie = "copyworktech";
    _root.copycontainer.loadMovie("copyworktech.swf");
    } else if (_root.currMovie != "copyworktech") {
    if (_root.copycontainer._currentframe >= copycontainer.midframe) {
    _root.currMovie = "copyworktech";
    _root.copycontainer.play();
    }

    Not in the example I linked to.
    I added the code and uploaded an example of what it does.
    When I put "this._lockroot=true" into the first frame of the products.swf file, this occurs:
    http://littlebuddymedia.com/flashhelp/withlockroot/0342.html
    i.e. you can click over to the products page, but you can not navigate back clicking the "Home" button does not bring up the home page, it refreshes the product page. You are also not able to switch between the two text boxes (copywebdev and officetech) on the products page (though one of them will load--whichever one you click first).
    I guess this was "two steps forward and one step back"?
    Thank you for continuing to take a look at this.

  • Why don't links placed in swf files work in Dreamweaver?

    I created a swf file and embeded a link in in to go to another page in my site. The application program (Easy Web Animator) generates the swf file and an html file. When I open the generated html file, the link to another page works when I click on the button. But if I import this swf file in dreamweaver, the link does not work. The generated html file dosen't seem to have anything extra to make the link work, it seems it just dosent work when placed in Dreamweaver.
    Anyone with any suggestions, please
    Dexter.

    Hello, Nancy
    I feel so stupid. I uploaded both files to my server, and they are 
    both working now (on the server). I have been previewing the file in a 
    browser on my hard drive all the time, and the original worked, but 
    the file placed in Dreamweaver did not. But they both work when 
    uploaded to the server!
    I don't understand it, but maybe you can. I would love to know why I 
    wasted about 2 days just trying every different setting I can in the 
    swf file and in dreamweaver.
    Thanks for the help!!!!!!!
    Dexter

  • Swf file in different places on different browsers

    Hi,
    new to this web design, but I am getting there (very slowly)
    I have a web page that is live www.chm-berkshire.com but it has an issue on the index page where the swf file is not being centered on each browser i use.
    I can set it up perfectly on my ie web page where the file is centered under the spry bar, when  look at my work PC and the swf file is over to the left, if i use firefox it is even further over to the left
    Is there an easy way to make all browswers see the file in the center of the page?
    any help greatfully recieved, (in as simple terms as possible, as I am hard of thinking:-) )

    Just changing things from position:absolute to position:relative is thrashing, and will usually not help.
    The solution is to do this -
    Change this -
    .oneColElsCtrHdr #container {
         width: 46em;
         margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
         border: 1px solid #000000;
         text-align: left; /* this overrides the text-align: center on the body element. */
         background-color: #FFFFFF;
         background-position: center;
    to this -
    .oneColElsCtrHdr #container {
         width: 46em;
         margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
         border: 1px solid #000000;
         text-align: left; /* this overrides the text-align: center on the body element. */
         background-color: #FFFFFF;
         background-position: center;
            position:relative;
    What this change will do is to change the reference point for all absolutely positioned elements on the page from the upper, left-hand corner of the browser viewport (which is the default reference for AP elements when there is no positioned ancestor), to the location of the centering element div#container.  Now, when that element centers, it will carry all the AP elements along with it.  You will have to reposition each AP element on the page to accommodate this change, but once positioned properly in DW, they will stay in that correct relative location.
    Now - to see what a mess you have made by using AP for all your content - just browse to this page and increase the text size a few ticks in the browser.  Your simple layout goes south in a hurry....
    It's much better to use sound practice methods in building your pages - http://www.apptools.com/pagelayout101.php will show you the way.

  • SWF files work in browsers, but not local?

    I can view flash content from the net in web browsers, but
    the swf files I have on my local hard drive do not work. They are
    asking for 'open With' but when I look for the flash folder in
    programs files its not there. I have have also looked in system32
    folder can find it anywhere. Can anybody please help, this is
    driving me up the wall.

    The code you have posted is not the same code as used in:
    <div id="gallery">
    in the link above.
    The reason that the Flash is not displaying in FF is that the portion of the code used by FF was omitted. The code currently used on the page only works in IE.
    I'm no great fan of the IE conditional statements used in the code you posted so I don't blame you for not using it. But you do need to provide something for FF.... the old, out dated method would be to add and <embed> for FF... here's the newer method..
    So either use code you posted above or better yet, get rid of that and replace the current <object> with
    <div id="gallery">
    <object id="FlashID" data="flash/201.swf" type="application/x-shockwave-flash" width="958" height="242">
       <param name="movie" value="flash/201.swf">
       <param name="quality" value="high" />
         <param name="wmode" value="opaque" />
         <param name="swfversion" value="6.0.65.0"/>
    </object>
    </div>
    Give that a try. Will work in both FF and newer IE versions.
    Best wishes,
    Adninjastrator

  • Problem when load more swf files work with xml files into my movie

    hi ;
    I have one flash file & more of swf files which work with xml files .
    when I load one swf file into my flash file  and remove it and load anther one on the same movieclip in my flash file it load the old swf file.
    when i load one on movieclip and remove it and load anther swf  on anther movieclip the file doesn`t work  and stoped.
    when test my flash file to load and remove swf files without xml file it work fine but when repleaced the swf files with other work with xml files the problem hapend.
    thanks;

    YOu should trace the names of the files that are being targeted for loading to see if they agree with what you expect.  If you want help with the coding you will need to show the code that is relevant to your problem (not all of it)

  • Getting an unwanted line when adding a swf file to dreamweaver and previewing it in the browser...

    I created a very simple swf with a box moving from stage right onto the stage.  It works fine when previewing the swf itself, but when previewing from dreamweaver there is a small line that only extends half way across the swf file (which happens to be the length of the box). I even made the box smaller than the stage but the line still appears at the bottom.

    Sometimes it helps to create a box in the background color that overlaps the edge of the stage. I had the same problem with a .swf that had a black background. The web page had a black background too but there was a white line at the bottom of the .swf when I previewed it in the browser. I added a black box to the background that went past the bottom of the stage and into the surrounding area and resaved it. The white line disappeared.

  • Importing swf file with skin and closed captioning problems

    I created a flv file in Preimere and I pulled it into flash to create close captioning.  When I publish it, it creates a swf file that I can open up on its own and it has the skin with the button to push to show the closed caption.  When I try to bring that file into captivate, it doesnt bring in the skin and it just automatically shows the captions.  How do I get it to bring the skin in with it?

    Are you seeing this problem when you preview you project. or only after you publish it? If it is when you publish, is it in both the local version and/or in the web version?
    Also, which version of Flash Catalyst? 1.0 or 5.5.?
    Chris

Maybe you are looking for

  • Difference with CUCM 8.6 and 9.0

    Hi Friends, We are planning to up grade our CUCM setup from 8.6 to 9.0. Before doing it, would like to the difference between version 8.6 and 9.0. Basic information about our setup: 1. Current CUCM ver: 8.6 2. Users count : 5500 3. Using feature : Ex

  • Back up from iPhone 4 to iPhone 5 not working

    Hi Guys, I have been using an iPhone 4, doing regular backups. My son bought me a iPhone 5 and I did a restore from iTunes as I need the text messages from the iPhone 4. I have now done a complete restore on the iPhone 5 as every time I restore a bac

  • IPhoto crash

    Hi, I was recently updating my Macbook pro with latest software updates. It showed a red mark (exclamation in a red circle) in the updates section. I continued updating other softwares and unmarked iPhoto for the time being because of the warning. La

  • Maya 2015 cannot see Mac Pro 2013 or GPU

    Cannot understand why Apple would have Autodesk certify the AMD D500 on a Mac Pro 2015 when in preference the make of workstation and the GPU cannot be seen. I am getting nowhere with Autodesk so I hope someone might know here. Do I have to move to t

  • VLC stopped producing sound with PulseAudio

    VLC used to work perfectly with the PulseAudio ALSA plugin. But now I can't seem to get any audio anymore. All volumes are up and PulseAudio manager reports vlc as a client through the alsa plugin. When I shutdown PulseAudio, I get audio again from V