ActionScript 3.0 :: Saving Transparent PNG - File Dimensions

Apr 27, 2009

I've got a movieclip called img_container that holds a draggable image (img_mc) and a mask over img_mc. I can save my img_container out as a transparent png which works great but the issue I have is that the png dimensions are still the size of the original img_mc. I fairly new to AS3 so I'm at a stand still. What I would like to do is save out the bitmap as only the visible area of the masked img_mc. The mask (called myMask) is also draggable and resizable so I'm not sure how to go about saving that specific area only.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Getting Display Object Dimensions Including Transparent Areas

Dec 20, 2010

I'm having troubles getting the dimensions I'm looking for for a given display object. This display object has some transparent area to the top-left of the opaque content but to the bottom-right of 0,0. As such, the display object's reported width ONLY includes the opaque area, not the transparent area. For example:

Code:
var myChild:Sprite = new Sprite();
myChild.graphics.beginFill(0xff0000);
myChild.graphics.drawRect(100, 100, 100, 100);
myChild.graphics.endFill();
trace(myChild.width);

This reports 100 as the width and height. I need to somehow retrieve 200 as the width and height.

I'm trying to take a bitmapdata snapshot of the display object, but when I do new BitmapData(myChild.width, myChild.height) and then draw into it I don't get the full opaque content of myChild drawn because the dimensions are too small.

View 3 Replies

Saving SWF With Transparent Background?

Oct 12, 2009

I have made a box with a rounded corner and a border in Flash but when I publish the file the outer edge of the corner is still white and I want it transparent so it takes on the color of the website background.

View 5 Replies

ActionScript 3.0 :: Setup The Dimensions Of The File As In Terms Of Height And Width Of The File Without Getting It Cropped

Aug 20, 2009

The template is built under Flash and has .swf, .fla and html files and was setup on an html background. To make things look nice I decided to use an XML web template as a background to his template. The problem starts from there.The XML web template allows us to add our own SWF files, so I decided to add the swf file of my friend's template.

The swf file was set to "noscale" and when I imported it into the web template it didn't fit properly. So I took the "noscale" off from the actionscript and imported it again. Even then the scaling of the swf file was not correct.As soon as you load the file, it scales towards the left and not center.My question is how can I write a code within the fla file so that when the swf file is loaded it automatically centers itself?2nd question is how can I setup the dimensions of the file as in terms of height and width of the file without getting it cropped. I tried to set it up from 840x610 to 650x430 however the swf content got chopped off (even with noscale off).

View 2 Replies

Actionscript 3 :: Finding An Original Rectangle's Dimensions From Rotation And Bounding Box Dimensions?

Jan 25, 2010

In AS3, I have a Sprite that has a Z axis rotation applied.How do I calculate that Sprite's dimensions (it's original size) from Sprite.rotationZ and Sprite.getRect(...)?

View 2 Replies

ActionScript 3.0 :: Fixed Movieclip Not To Change Dimensions If The User Starts Playing With The Dimensions Of His Screen

Jan 31, 2012

What do I have to write to keep the movieclip not to change dimensions if the user starts playing with the dimensions of his screen ? I remember it was a line of as3 written at the beginning.

View 3 Replies

ActionScript 3.0 :: Wait For The User To Save A File (xml / Datagrid / File Saving)

Dec 11, 2009

step1- I got an xml that is locally loaded(works fine)
step2- the content goes into a datagrid that is displayed (works fine)
step3- In AS3 I dynamically add some lines to this xml file(works fine)
step4- I save it locally (works fine)
step5-and want the datagrid to be updated..(works not-so-well)

So, in step 4, the data is saved into the xml file, but in order to finish the save, the user has to click on the "Save as" windows in order to have the file updated of course.. and that's where's my problem, how can i tell flash to wait till the user actually saves the file, before reload the xml file in the datagrid ? here's the code :

[Code]....

View 3 Replies

Professional :: Change The Dimensions Of A .swf/.fla File Once Completed?

Apr 7, 2011

1, Is it possible to change the dimensions of a .swf/.fla file once completed?

View 1 Replies

Flash :: Find Natural Size / Dimensions Of SWF File?

Dec 2, 2009

I've been given a Flash file (.swf extension) to put into a web page. Opening the file in my browser makes it quite blurry, so I'm assuming there is a natural size for the file, same as an image.

It's also rectangular so I need to work out the aspect ratio if I don't have an exact size. How would I find this information out?

View 1 Replies

Actionscript :: Papervision 3D - Force Dimensions On A Collada File?

Feb 25, 2010

I'm working with Collada files and I need them to be a certain size. When instantiating them in pv3d you set the filename, materials, and scale. Scale works like a percentage, and there's no way to get the width, height, or depth of the DAE once in flash. I want to be able to specify the size of DAE in 3D space relative to other pv3d native geometry.

View 1 Replies

ActionScript 2.0 :: Saving An XML File With A Certain Passed File Name To PHP

Sep 18, 2006

i used a kirupa tutorial to save an xml file.

[Code]...

at the end of this... on my server must appear 2 files: ex1.xml and ex2.xml. PS: when I run the first script, a blank IE page with the name of the php file appears... how can I get rid of it?

View 1 Replies

Javascript :: Image Dimensions = Client Side After File Upload Selection

Feb 8, 2011

I have an upload form for an image. The user clicks browse and selects a file. How can I get the image dimensions the moment the user selects the file (before the file is even uploaded to the server). It obviously has to be something client-side with maybe javascript/jquery or flash/flex (prefer js//jquery though), but can either of them do this? This is the code I'm using to tie into zozo's getImgSize() function, but it gives me 0*0 as size.

[Code]...

View 1 Replies

Cs5 :: File Is Not Saving

Mar 25, 2011

After reading previous forums I've realised there is a corrupt picture that was imported into the file. I've deleted this in the library as people have suggested but still no luck saving the file. It just saves as 1K file.

View 1 Replies

CS3 : Saving Flash File As An Avi?

Aug 11, 2009

I have made a cartoon section that needs to go into a video movie, it uses a lot of movie clips etc. It needs to be very high resolution- 1920x1080 When I just export it as an avi, none of the movie clips animate- they just slide around on the first frame of their animations.

When I export is as a .mov the file size is huge and I am not even offered the ability to compress it. It is like 8 gigs. When it was finally done the movie played in slow motion- the clip was about twice as long as it should have been.When I saved the file as an swf, and then tried to convert it to an avi using a converter, all the movie clips moved in doubletime, while the animations in the timeline were fine. How can I get my flash file to play in a standard video format.

View 2 Replies

ActionScript 3.0 :: Saving An Xml File

Nov 30, 2009

I have created an xml driven application with which the client is very happy. They currently use notepad/dw to create the xml files.They now want a "form" of some description to create the xml file to avoid writing tags and so on.I have had a good look around. There is some info about creating the xml itself in as3 (looks pretty easy), but very little about how to save that file to the clients server. I gather that the flash doesn't do this for security reasons?would i be better using php to create the form for my user rather than flash as3. Or is it better to create in as3 and then append a little php to upload the doc? Or am I going abouit this the wrong way!

View 2 Replies

IDE :: Saving To Text File With AS3?

Apr 14, 2009

I want AS3 to write to a text file with PHP.

View 3 Replies

IDE :: Saving To Text File?

May 1, 2009

save and load to and from a text file. However, doing any tutorials found online currently (I've tried at least 10), I cannot seem to get it to work!

Flash Code:

Code:
myData = new LoadVars();
submit.onRelease = function() {
myData.Name = Name.text;

[code]....

View 4 Replies

IDE :: CS4 File Saving - None Of The AS Is Executed

Sep 17, 2009

I have students whose flash file works until it is saved. For instance, they create a untitled.fla file, press ctrl + enter and the swf file plays perfectly. At the end of class they save it, the next day they open it, and none of the AS is executed. The swf file plays as if no AS was ever written.

To make things even more puzzling, the file will play from different drives. For instance, if the .fla file is saved to a thumb drive, everything works. If the file is placed on the desktop everything works. If the same file is placed in a different students directory, everything works. I've contacted Adobe support, they directed me to read their (worthless) forums. I have recontacted their support trying to find some real assistance.

View 9 Replies

ActionScript 3.0 :: Saving Output To Txt File?

Oct 1, 2009

I was wondering if it was possible to save the contents of the output window to a separate txt file like notepad. I'm doing a project that involves testing the execution speed of flash by putting more and more objects on the screen as it plays and I need it to save the result when it freezes up or crashes.

View 6 Replies

Professional :: How Much Lose Saving CS5 File As CS4

Apr 4, 2011

I have a presentation to do using Flash on Wednesday and have been warned by my university that files MUST be in CS4 format. So, having used CS5 to create the whole site/presentation how much will I lose back-saving it to CS4? I'm worried I'm going to have to do a lot of the same work twice.

View 2 Replies

Actionscript 3 :: Saving Data To XML File?

Apr 12, 2012

I have a serious of games swf's loading externally from a main menu swf.What I'm trying to do is take name of the player which they input into textfield and sent it to the XML file. After this at the end of each game I want to send the time it took to complete also to the XML file.The problem I have is I don't know to to create a new user inside the XML file and then replace the default time of 00:00:00 with the time that the player has set.NameTextField is the name of the textfield.Hourtext, Minutetext and Secondtext are the names of the timer. (They are ordered like Hourtext ':' Minutetext ':' Secondtext.

AS3 code inside Flash MainMenu.swf
var XMLLoader:URLLoader = new URLLoader();
var Bytes:ByteArray = new ByteArray();

[code].....

View 1 Replies

Xml :: Saving And Loading File With Flex?

Aug 25, 2009

I want to have a xml file for my configuration and so i have to load it from the same directory the swf file lies in and save it afterwards. I saw articles about filestreams in flex but my compiler didn't allow me to use the filestream. I use the open source flex sdk

View 3 Replies

Attach File Information After Saving It?

Aug 2, 2010

I'm currently working on a Flash application that needs to save files to Drupal. I already saved the file to the Drupal site with the File service, but I can't get to attach the file to the node with the node.save service (Upload module, not CCK file field).[code]...

View 2 Replies

Actionscript 3 :: Saving Local File Under IOS?

Nov 19, 2010

I am opening and testing data using the FileStream class which is supposed to avoid file security issues. It works fine until I try to save to a local file. When I test under adl I get a security error which I though was ok (at least it was attempting to save) until the app was packaged and tested on a device, but the file fails to save.

public class FilesApp extends MovieClip {
var file:File;
var xmldata:XML;

[Code].....

View 3 Replies

Actionscript 3 :: Saving A File Using FileReference?

Jan 16, 2012

I have a game in actionscript 3.0 i have been browsing the internet, I have found something like this

var file:FileReference = new FileReference();
file.addEventListener(Event.SELECT, _onRefSelect);
file.addEventListener(Event.CANCEL, _onRefCancel);

[Code]...

Call to a possibly undefined method save through a reference with static type flash.net:FileReference.

View 1 Replies

ActionScript 3.0 :: Saving Xml Data To A File?

Oct 29, 2009

to save to an xml file that has been imported into an xml variable stored in a loader and modified. What I'm trying to do is import an xml list, add a new node with a key stroke, then save the newly modified xml list back into its file. I've seen quite a few threads about people saying you have to download third party software but is there a way to do it from within as3?

View 0 Replies

ActionScript 2.0 :: Saving To An Excel File?

Apr 7, 2011

How does one save the value of a variable to an Excel/<spreadsheet of any kind> file? Also, is it possible to do this without using CGI, Perl, js, etc non-Flash scripts?If you could assist me in how to save the value of a variable to *any* type of file that'd be good as well...I was utterly confused after reading the documentation.In case you're wondering why I'm asking this, I will be conducting a science experiment involving Flash. Subjects will be shown a series of slides, each slide containing one four leaf clover amidst a field of three leaf clovers. They will be timed to see how long to click on the four leaf clover. The purpose is to see if there exists any correlation between time taken to click and number of slides seen.

View 1 Replies

Actionscript 3.0 :: Building And Saving A XML File?

Nov 30, 2009

I am trying create a tool for office use which builds a XML file on the users computer. I am able to output XML to the trace screen but I want to take it a step further and have that XML code saved to a document on the users computer. Each time the user enters text and hits submit, a new block of XML is saved to that file. From what I understand, I need a "middle man" application such as Adobe AIR. Can someone point me in the right direction? I have been trying to research this for a few days now.

View 1 Replies

Saving File Takes Too Long?

Feb 6, 2012

I have a problem when saving flash files in a mac. The process is much slower than in my other computer with windows, using the same file. I save my flash files very often and having to wait that long is very annoying. The problem can't be the file itself, I have tried saving different files and there is always more delay in mac compared to windows. In my mac I have OS X 10.7.2 (Lion) with Flash 5.5 and in my other pc, Windows XP SP3 with Flash CS 5. Has somebody experienced this before? What could be the origin? It's weird because my mac is new and is supposed to have better features than my windows pc which I bought many years ago I am a relatively new mac user and I have heard some people complaining about Lion OS X. What is your opinion?

View 1 Replies

ActionScript 2.0 :: Saving Out A Txt File From Flash

Feb 2, 2007

is it possible to save out a text file from flash to a specified location on my local comp?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved