Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Resizing Imported Swf Files...



I have a movie clip that I want to import a swf file into, but the swf is larger than the movie clip's area. I tried using a resizing code for importing images that I found, but it makes the swf very small. Is there a way to control the size of the imported swf?Edited: 04/12/2007 at 12:25:31 PM by ApatheticAnonymous



Adobe > ActionScript 1 and 2
Posted on: 04/12/2007 12:25:04 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Resizing MC Of Imported Swf
I'm importing an external SWF to an MC.

Is it possible to set the height and width of the MC to new dimensions on every external movie load?

I tried placing this on the MC.

onClipEvent(load) {
_root.MC._width=123;
_root.MC._height=1234;
}

Didn't work

I tried resizing the MC on the first frame.. didn't work

**The numbers in the width and height above are eroneous, just inserted for example.

[F8] Resizing Imported Swf
Hi

I am importing a swf into a loader component that is on the stage called ecStorage. If I use ecStorage.contentPath="....." I can get the swf to scale

However, the swf is pretty big so I want to add a preloader. This works fine however I find that I can move the swf around using ecStorage._x=100; etc but as soon as I try to resize it using ecStorage._height=100; or ecStorage._xscale=1.2; it just disappears from the stage.

Am I missing something obvious?

Thanks in advance

Here is the code

Code:
stop();

extPreLoader_mc._visible = false;

//-------------Movie Clip Loader---------------\
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListner:Object = new Object();
mcLoader.addListener(myListner);

myListner.onLoadProgress = function(target_mc, bytesL, bytesT) {
extPreLoader_mc._visible = true;
var pctLoaded:Number = Math.round(bytesL/bytesT*100);
extPreLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
if (bytesL>= bytesT){
extPreLoader_mc._visible = false;
}

}
//ecStorage._height=100;
//ecStorage._width=100;

mcLoader.loadClip("externalSwf/ecStorage.swf",ecStorage);

//ecStorage._height=100;
//ecStorage._width=100;

Resizing Imported SWF?
I have imported an SWF into a FLA project library and have dragged it onto a frame in my project. I am trying to resize the SWF to about 1/4 of its original size to make it fit correctly in the new project. I cannot figure out how to resize the SWF. I have tried the properties sheet, but it won't take different width and height parameters. No object boundaries appear (all I have is a dot to select the object) so I cannot use the transform tool to scale it. Any ideas?

Resizing & Positioning An Imported .SWF File
Hey,

I have imported in an external .swf file into my main movie, now all i need to do is resize and position it in a better place.....how do i do this, because it doesnt show up in my main movie...

thanks heaps..

chaps

Resizing Imported Flash Movie
Hi people, I have a problem.

I made a short .exe presentation, that is 800x600 in size, it has music synchronized with the animation throughout the presentation.
The problem is, when I make the presentation window fullscreen, and then I play it, the music isn't synchronized anymore with the graphics (animation becomes laggy). And I think it's because of my graphics card.

Then I thought of an idea of making the animation smaller without sacrificing the option of the presentation being fullscreen (it needs to be fullscreen). By making the animation itself smaller, with a thick black border. In this case, it will be "full screen", at the same time the music will still be synchronized with the animation.

But how can I make the animation itself smaller? When I try to publish the animation as .swf, then try to import it in another presentation with the thick black border, the imported movie file becomes buggy (there's no music; some symbols are missing; unable to resize the imported .sfw file; and others). Is there another way to solve this problem?

Animating And Resizing Imported PNGs
I'm having a problem with animating imported PNG files, especially resizing them. In the .swf file, the edges get pretty screwed up and the image becomes distorted a bit, almost as if it isn't anti-aliasing itself or something. I attached an .fla file (in MX format) with a very rough example of what I'm doing. It looks fine in the .fla, but when you export it to .swf you'll see what I mean about the resizing problem. Is there any way to fix this, OTHER than using the "trace bitmap" function? The images I'm using are pretty detailed, and tracing the bitmap and converting it into a vector while keeping the detail slows the movie down way too much.

In case you're wondering, the main reason I'm doing this is for the dock at www.yanathin.com. Right now I traced teh bitmap for every dock image, giving it the "smooth" resizing animation. However, it really, really slows down when it animates on slower computers. But, when I don't convert the PNGs to highly detailed vectors, the magnifying animation gets very rough. It IS much faster though. If anybody knows how to fix this problem, PLEASE let me know! Thank you!

STRESS Resizing Imported Jpegs
Hi everybody,

I am VERY new to actionscripting and have got myself into a bit of a muddle. I am trying to import a jpeg image into an empty movie clip and then resize the image. I can scale it, and position it but I can't resize it.

Somebody suggested creating a movieclip in Flash first and giving it an instance name. Then use loadMovie to place the jpeg into that movieclip. This did work and allowed me to resize it but only the movieclip would be resized which in turn resized the image proportionally. I still couldn't specify exact dimensions of the image - only the movieclip. I hope this makes sense... I think I've lost myself!!

Any ideas of help would be greatly appreciated.

Many thanks in advance



Brasso

STRESS Resizing Imported Jpegs
Hi everybody,

I am VERY new to actionscripting and have got myself into a bit of a muddle. I am trying to import a jpeg image into an empty movie clip and then resize the image. I can scale it, and position it but I can't resize it.

Somebody suggested creating a movieclip in Flash first and giving it an instance name. Then use loadMovie to place the jpeg into that movieclip. This did work and allowed me to resize it but only the movieclip would be resized which in turn resized the image proportionally. I still couldn't specify exact dimensions of the image - only the movieclip. I hope this makes sense... I think I've lost myself!!

Any ideas of help would be greatly appreciated.

Many thanks in advance



Brasso

Masking / Resizing Dynamically Imported Jpgs
Hello All,

I am making a photo gallery app that I would like to be able to give to different clients and will be customizable. Right now it is all controlled by a txt file that allows the user to put all images in the same folder and and the text file assigns them their names that will be used in the scripting. I can get the images to load using either loadMovie() or loadMovieNum() , but the problems I have is either setting the xScale & yScale to maintain size consistancy. or masking out parts of the image that are beyond what I want to be the viewable area. I am also having issues in assigning the dynamicly loaded jpgs their _x & _y.

any help would be appreciated

Placing Imported SWF Files
I got a project for school do tommorow. Im importing swf files into my project. So far it has two parts a menu system at top, and a main intro.

When i import in the intro it is place onto of the menu system, how do i put it in the location i want? Im sure there is some simple explanation, but i have been having trouble finding it.

thanks,
Jim Miesner

Color Changes On Imported Files...
I've been working on a project where I need to import some graphics as either jpgs gifs or png files. When I import the files the color is really different, a lot lighter than in the photoshop file when I convert it to a gif. Is there a way to not get this color change or is it just the way that Flash works. Is there one type of file that is better to import than another? Any help on the subject would be appreciated....

Thanks a lot!

Controlling Imported .swf Files
Hey guys!

need some advice regarding controlling an imported .swf animation file. i need to control it using actionscript so that it both my imported animations run at the same time for the same length then stop and don't keep re-playing..
any helpful hints??

many thanks!!!

Can I Control Imported SWF Files?
I'm being a pest today. Anyway, I have a primary SWF files with buttons to browse through pages. If I import another SWF into the file, can I use these buttons to control the imported one? Should be a simple enough question.

.wav Files 40percent Faster When Imported
i was trying to import a wav file, [16bit mono 16000hz windows pcm] into my flash prog. the file imported and loaded ok but plays back about 40 percent fast. Is there a definative list of what audio files can be used?
Thanks.

Altering Imported Video Files
I have an ebedded video in my Flash MX 6.0 movie. Unfortunately, it contains extremely loud noise (it's a clip from a NASCAR race), so I only want the video, not the audio. Is there any way to strip such a video of its sound? I was imported from .mpg, if that helps.

I don't care if there's a proper way to do it or simply a quick'n'dirty fix; either way works for me.

Masking Imported Actionscript SWF Files? (Mix-FX)
Alrighty, I use Mix-Fx (or try to) alongside of Macromedia Flash. If you don't know, mix-fx is a background and text animator. (Pretty nifty)

The problem though is that when I attempt to import the SWF it creates into Macromedia FLash, it locks up and comes up with an error.

BUT, it will load with the:

loadMovie("background.swf", 1);

command.


The only problem is that I want it to only show in a shape (an odd shape that mix-fx cannot contour to).

Soooo...to make a long story short. Is there a way to mask SWF files that were loaded in via actionscript? Because as far as I can tell, they only go ON TOP of the entire movie.

Thanks for any help!

Updating Imported Files In The Library
When updating imported files in the library is there any way to specify an relative path to where the item is rather than an absolute path?
I've only been able to do it with a absolute path.

thanks.

or any advice on how to work around this if it is not possible would also be helpful.

One Or More Files Were Not Imported Because There Were Problems Reading Them
I am going crazy to solve this problem. I made a movie clip and I want to import it to another flash file (website), but i cant cause i have this error :"one or more files were not imported because there were problems reading them". When i want to import swf file of this movie clip it's not working as it should it is static it's not moving. Please what's wrong or what am i doing wrong

Video Files Dynamically Imported
Hi,

how do I import a video file dynamically? I want to have a .htm-file
where I press a button to open another window with a .swf file in
it, which imports the filename named in the link like:

<param name=movie value="player.swf?filename=video.avi">

I want to be able to play multiple videofiles, such as .avi, .mpeg
etc..

Any ideas?

Thanx in advance.

Django Murango...

View Actionscript In Imported SWF Files
I've hard a hard drive crash and lost all the original .fla files from a project I'm working on. I have the exported .swf files, but when I import these back into Flash, I lose the Actioscripts, button functionality, etc. Is there a way, or an app. for the Mac, that will let me see the actionscripts associated with these imported swf files?

Any help would be greatly appreciated.

And never assume that just because a hard drive is only two weeks old, it won't die on you.....

8Khz Wav Files Imported As 5Khz
I have voice files recorded at 8Khz, 16 bits. This gives me a 128Kb/s rate.
When I import the file into Flash 8, it is imported at 5khz, 16 bits (80kb/s).

This causes the voice to sound distorted. Is there a way to tell Flash to use 8Khz?

Thanks

Imported Photoshop Files Don't Update
In CS3 I right-click on an imported layer and choose Update from the pop-up menu. It shows the layer and says 1 of 1 items needs to be updated and the item is checked. I click the Update button and it says 0 of 1 items updated.

This is what always happens. I've never been able to get the update feature to work with any PSD file since CS3 first came out.. Has anyone gotten this to work?

David Salahi

HTML Tags In Imported Text Files
Hi, I've been testing out the HTML tags supported in Flash 5 and some only seem to work when Actionscripted from within Flash (i.e. not when used in imported files).

They are:

<
creates the less than sign <

>
creates the more than sign >

&
creates the ampersand &

"
creates speech marks “

&apos;
creates an apostrophe ‘

I must be doing something wrong, right? I'm a bit confused by the whole concept of escape characters (/) so maybe this has something to do with it.

Cheers

Dan

Why Do Picture Files Looks Terrible When They Are Imported To Flash?
Hi Guys I am recently very frustrated because GIF file that is imported into Flash looks jagged and totally unacceptable.I tried changing the properties and stuff but it just suck! By the way it is a logo graphic so it is very important.I must have it in the flash file.

Can anyone tell me how to deal with this problem?
I want my graphic to look like the orignal GIF file when imported to Flash

Please help guys!!!

What Kind Of Video Files Can Be Imported Into Flash?
i was wondering, as i have a site that i'd like to do this with. load a .swf file from within an iframe but i didn't know what format the video in the swf could be....asf,mpg,avi...

any help would be appreciated.

Stop Cacheing Imported Text Files
how do you stop a computer cacheing a imported text file?

im making a content management system. flash loads in 2 variables from a text file. then the user can edit it and save it. however if i refress the page it will load in the origonal variables not the changed one's. i expect its chacheing them isnt it?

Is Imported As-files Stored In The Browser Cache?
Hi

I´m using lmc_tween class and am wondering if the external asfile that you import to your movie, if it is stored in the browser cache?

Antialiasing Text In Imported Html Files And Css
I followed the css/html tutorial and got everything working properly. The problem is, I lost the anti aliasing along the way. Can I get it back?

Or, another solution to my problem would be if I could use multiple formats within a single dynamic text field. Is that possible?

.tif/photoshop/illustrator Files Imported To Flash Movie
hi, i have some cartoons (originally hand-drawn, so no true vector format) that were (digitally) originally .tif files. what's the best way to save/optimize them to import into flash so that:

-the movie clip doesn't get too huge
-the cartoons (charicatures, really), when placed on a dark background, don't show up the white crinkled outlined edges from the photoshop alterations (removing the white background from the cartoon body so i can move a transparent image seamlessly in the website.

and in general, for importing from illustrator to flash (or is importing from photoshop better?) what're the best guidelines for crisp, sharp, hot hot results in my flash movie(as a website)?

also, while we're on the topic, best guidelines for optimizing images in photoshop for flash (but with transparency in the image)?

*note the attached cartoon is a diminished version of the original digital file.

thanks!

Resizing .swf Files
Hi!

I have got a a.swf file wich contain only 1 photo. I want this file to be used into 2 other .swf files (b.swf and c.swf) with different sizes.
How can I do to change the height and the width of the a.swf file's photo from the b.swf and the c.swf file?

Resizing EXE Files
Is it possible to somehow lock the size of a Flash EXE window so that user's can't resize it? I created a movie that contains several bitmap images, and they look really pixelated when the playback window is maximized (understandably so). My client is concerned that their salespeople will try to maximize the playback window during presentations, making the movie look really bad. Goig back in and editing the content to look good at larger sizes is not an option. Any way to restrict the user from resizing the window?

Resizing .swf Files?
sorry, i dont know why my transparency thread posted twice...i guess i hit the button twice.


Anyways so if i export a .swf file and find that it doesent fit well in a webpage should i resize it in html or is there an easy way to shrink my output swf file?

Thanks,

Luke

Resizing Swf Files Please Help
Hello

I am trying to scale down an swf file without destroying the pixels or reshaping it greatly.

One way to do this is using the scaleX and scaleY property. So if you want to scale down an swf file by half you can do this

swf.scaleX = 0.5;
swf.scaleY = 0.5;


Now my problem has come down to mathematics which to be very honest I am really crap at.

I have a container sprite whose dimension are 425 * 300. So if my swf movie is 550 * 400 I can simply subtract these like 550-425 for width and similarl for height, but the problem is I dont know how to represent that value bw 0 and 1 as scaleX and scaleY only takes values bw 0 and 1.

I hope I am making sense here

Thanks in advance.

Resizing Swf Files Please Help
Hello

I am trying to scale down an swf file without destroying the pixels or reshaping it greatly.

One way to do this is using the scaleX and scaleY property. So if you want to scale down an swf file by half you can do this

swf.scaleX = 0.5;
swf.scaleY = 0.5;


Now my problem has come down to mathematics which to be very honest I am really crap at.

I have a container sprite whose dimension are 425 * 300. So if my swf movie is 550 * 400 I can simply subtract these like 550-425 for width and similarl for height, but the problem is I dont know how to represent that value bw 0 and 1 as scaleX and scaleY only takes values bw 0 and 1.

I hope I am making sense here

Thanks in advance.

Resizing Eternal Swf Files
Hi,
I'm just wondering if anyone can help me.

I have a flash movie (mx 2004) and I need to import an external swf file. That part is no problem - the problem is that the client I am working for gave me a swf file that is too big, width and height. I don't have access to the original FLA file to resize.

I guess my question is, how can I import an external file and resize it within my SWF?

Any help would be awesome.

Thanks

Resizing Swf Files Not Working...?
hi all!

i have some swf files (DianeIntro) that get loaded onto an emptyMC from a button (b1) and i want them to resize...but it's not working! i can hear them but can't see them.
where is the emptyMC in relation to the movie? in the emptyMC in the top left corner or the middle?

can someone take a look at the script and see if they see something wrong?

b1.onRollOver = over;
b1.onRollOut = out;
b1.onRelease = diane;

function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(16);
}
function diane() {
emptyMC.loadMovie("DianeIntro.swf");
emptyMC._width = 650;
emptyMC._height = 550;
}

Resizing External Files With MC Tween
Any help would be fab. In the attached file, you'll see five breakpoints where my code is going wrong. I have this file working on my site... www.judgedice.com but for my client, I need to resize the images because they're all way too big.

Upon coding the resize feature, my script goes to crap. Can anyone look at this and solve my dillemma???

| judge

Messed Up Text W/ Imported Text Files
I am using a text file from my server, and Import it into the flash movie. I tried to use quoets, but for some reason it puts boxes instead. can someone help me out?

"one Or More Files Were Not Imported."
Ok i get that error every time i try to import this song for my flash cartoon, its a song. its an a 841 kb song, "winamp media file" What can i do to make it work?

Auto-resizing Flash File When Resizing Windows, HOW?
Hello everyone,

I have been to one web site tonight at my friend's house and I have forgotten whats the web site address. But this thing amazed me and stupid me doesnt know how to do.

you know whenever you build a web site you usually build for certain resolution right (1024x768 or 800x600 etc.. when i visited this web site, whenever i resize the window (make the window bigger smaller etc) the flash movie will follow the window size (extact fit).

I really want to know how to do that...? Anyone please help?

Help would be fully appreciated.

Ella

Resizing Problem Of Swf When Resizing Browser Window
Can any one know the javascript function to auto resize the swf when resizing its pop up window.
I need to auto resize the swf when i resize my popup window in which
the swf is displayed.
Is there any javascript function available to perform this requirement ?

I am just displaying the swf from a location with help of php code

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=7,0,19,0" width="100%" height="100%">
<param name="movie" value="<?=$this->baseUrl?>/public/data/
startintro/<?=$this->start_intro?>?<?=time()?>">
<param name="quality" value="high">
<embed src="<?=$this->baseUrl?>/public/data/startintro/<?=
$this->start_intro?>?<?=time()?>" quality="high" pluginspage="http://
www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
flash" width="100%" height="100%">
</object>

Ignored (imported) CSS Styles On Imported XML?
Edit: I am a moron.

This has been bugging me for a while now, but has anyone else run into a problem where you've imported a CSS file (and you know it's loaded), you've imported some XML (and you know it's loaded), and you've essentially done everything properly, only to have certain styles ignored?

For example, if I have a chunk of XML that looks like this:

<![CDATA[<p><h2>Heading</h2>Hey there</p>]]>

It's rendered as:

HeadingHey there

with whatever attributes I'd assigned to the <p> style.

If I try to change <h2> to, say, <b> or <strong> (in all relevant places), I get the same result. So far the only way I've managed to fake it is by creating a style called "bo" and using that in place of a <bold>, <strong>, or <h2> tag...

I guess it's not a deal-breaker, since I can fake my way through it, but it just seems odd that it'd be behave that way...If anyone's run into this and discovered a solution, I'd love to hear about it!

Resizing Textbox Without Resizing Text - How?
Hi there,

I create a dynamic textbox (it doesn't matter about the dynamic bit actually, I've tried it with the others), type some text in.

I then go to resize and replace the textbox using the properties panel. This way of course you can get quick and pixel perfect placment.

BUT, when I use the properties panel to resize the box, the text gets all squished, stretched and distorted. Why? The box never goes smaller than the text that's in there so there'd be no pressure on the text to resize.

When I click and drag the handles on the text box it resizes with no problems at all, but this isn't quite accurate enough.

How do I resize the text box using the properties panel but without affecting the actual text inside it? Is there a property or a box that I haven't clicked/need to click?

Cheers

Resizing Objects In Transition (resizing)
I came to a little problem when I was trying to make a resizing function. Other people (flash designers) should use it then in fla while designing stuff so the whole thing (all objects) support resizing functionality. When end user start dragging the browser window, the flash site will reflect this and resize itself keeping the proportions.

Of course this is easy stuff to do. But… until you come to the point that designers will want to animate objects on the stage (changing their size). The problem occurs when user resizes the browser when some animation is taking place on the stage. I can’t come up with the solution that will update the resizing animation and reflect resizing of the browser in the same time. In other words, if you resize the stage and object is in transition (resizing itself) it doesn’t reflect stage size change properly.

You can find my as class + fla at this link http://www.flashportal.sk/stageResize.zip

Please let me know if you have any ideas how to solve this or any questions.

Any help is appreciated. Thanks

[F8] Resizing A Movie Without Resizing The Text
I am trying to make a Flash movie with the dimensions of 100%x100% instead of specific pixel dimensions. So no matter what window size the browser is everything will appear.

However, when the window shrinks the text does too. I have seen many other sites that use the same 100%x100% that follow the size of the browser, and shrink everything but the text.

Can someone help me out? Is that a new feature of Flash CS3?

Thank you all so much in advance.

Resizing Objects In Transition (resizing)
I came to a little problem when I was trying to make a resizing function. Other people (flash designers) should use it then in fla while designing stuff so the whole thing (all objects) support resizing functionality. When end user start dragging the browser window, the flash site will reflect this and resize itself keeping the proportions.

Of course this is easy stuff to do. But… until you come to the point that designers will want to animate objects on the stage (changing their size). The problem occurs when user resizes the browser when some animation is taking place on the stage. I can’t come up with the solution that will update the resizing animation and reflect resizing of the browser in the same time. In other words, if you resize the stage and object is in transition (resizing itself) it doesn’t reflect stage size change properly.

You can find my as class + fla at this link http://www.flashportal.sk/stageResize.zip

Please let me know if you have any ideas how to solve this or any questions.

Any help is appreciated. Thanks

Resizing Sprite Without Resizing Its Children
Hi.

I have a class called GalleryItem that extends Sprite. Each GalleryItem has a Loader that loads an image of variable dimensions into it. Now, I want to be able to change the GalleryItem's dimensions without affecting its contents' dimensions. How can I do that?

Thanks in advance.

AS3: Resizing Sprite Without Resizing Its Children
Hi.

I have a class called GalleryItem that extends Sprite. Each GalleryItem has a Loader that loads an image of variable dimensions into it. Now, I want to be able to change the GalleryItem's dimensions without affecting its contents' dimensions. How can I do that?

Thanks in advance.

AS3: Resizing Sprite Without Resizing Its Children
Hi.

I have a class called GalleryItem that extends Sprite. Each GalleryItem has a Loader that loads an image of variable dimensions into it. Now, I want to be able to change the GalleryItem's dimensions without affecting its contents' dimensions. How can I do that?

Thanks in advance. [a href="www.vivoeusebio.com" alt="vivóeusébio - design collective" title="vivóeusébio - design collective"]vivóeusébio - design collective[/a]

Copyright © 2005-08 www.BigResource.com, All rights reserved