Proportionate the image in flash
Hello all,
i had a xml wich is dynamically genrate the values, and i use those value to show as a image in flash as2.
now the values are n numbers, if it is beyound the screen i want to resize the whole image in to best fit on my screen.
I have attached the source file, advance thanks for the help
In the code below I show red code which places the pieces inside another movieclip and then resizes it to half its width. I know you want it to size to fit in the stage, but I don't know to what dimensions, so hopefully you can determine that math for yourself and adjust the width and height accordingly. It would essentially involve first determining the height/width ratio after the assembly is complete, then changing the width to the desired width, and then using the height/width ratio to set the revised height for the revised width. And you could keep the holder_mc invisible until all of this is complete if you prefer.
unit_mc._visible = false;
_root.createEmptyMovieClip("holder_mc", this.getNextHighestDepth()); // create the holding mc
//////////////////////loading xml///////////////////////
var myXml:XML=new XML();
myXml.ignoreWhite = true;
myXml.load("sampleInput.XML");
myXml.onLoad = function(success)
if (success)
var poc=myXml.firstChild;
//trace(poc.attributes.id);
var tower=myXml.firstChild.childNodes;
//trace(tower.length);
var noOfTower=tower.length;
for(i=0;i<noOfTower;i++)
var group=myXml.firstChild.firstChild.childNodes;
var noOfGroup=group.length;
//trace (group);
//trace(noOfGroup);
//trace(towerId);
for(j=0;j<noOfGroup;j++)
var groupId = group[j].attributes.id;
//trace (groupId);
Setting();
holder_mc._width = 0.5*holder_mc._width; // resize the holding movieclip
///////////////////end of loading xml//////////////////
Setting=function()
var curritem1;
var depth=i+(j*100);
curritem1 = holder_mc.attachMovie("menuitem","_mc",depth); // add the xml pieces
curritem1._x=10+(i*160);
towerheight=curritem1._height;
curritem1._y=560-((j*(towerheight-20)));
Similar Messages
-
The Image viewer flash element could not be found
The image viewer flash element could not be found. What
should I do? Any plug in exists or is it mistake in program? Help
me, please. Thx JoeHi,
The issue here is the mapping of the interface to the service in question, and usually points to a possible mistype or rename of something within your service architecture.
You need to make sure your namespace and service name here match your service name itself.
For detailed information, you could refer to:
https://haddicus.wordpress.com/2011/06/06/service-attribute-value-not-found-wcf-services/
http://stackoverflow.com/questions/9557221/the-type-restservice-weddingservice-provided-as-the-service-attribute-value-i
Regards -
Can any one tell me how to stream the images in flash.
Hello Friends,
i have created a dynamic page flip book with xml, i want to
zoom the images in swf loaded, with streaming, so that user can
preview the image while a good quality image is loading. I wanna
know that how to load a part of large image or swf.
Image effect like :-
http://www.zoomify.com/
Can any one tell me how to stream the images in flash.On Thu, 17 Apr 2008 05:53:27 +0000 (UTC), "FlashDavil"
<[email protected]> wrote:
>I wanna know that how to load a
>part of large image or swf.
You show a preview and use loadMovie() to load a big file.
You can
create a preloader (progress bar) showing how much part is
loaded,
while user sees the small image. When you achieve 100% tou
show that
big image. What's more?
> Can any one tell me how to stream the images in flash.
What are you talking about is not a "streaming", but
"progressive
download". Images "streaming" is impossible. -
Photoshop: How do I stop the image from flashing black?
How do I stop the image from flashing black when i am working on it
This is a problem with Win8. Update your video card driver from makers site. If that does not help in preferences set GPU to basic.
-
Import and export the image in flash
HI! Guys!
I am Quite New to to flash in this enviroment so please i
need help can any one help me out in this problem.
the issue is I need to upload the image from my desktop to
certain flash animation by draging and generate the image from that
final Flash animation and save it in my computer.
Dijupif you're using flash 8, you can use flash to upload a file
(using the filereference class) to a server that hosts the swf. and
if that file is a jpg or gif, you can load it into flash. however,
you can't drag and drop a file into flash. -
I'm currently porting a game from flash to the DS and having
difficulties exporting the images and was hoping someone out there
might be able to help. The images in flash are all vector based and
I need to export them and place them on a background (colour
255,0,255). The reason for the background colour is it is removed
programmically within the game (blue screening if you will).
Problem is, if I export them as png's and then add the background
in photoshop, or do a screenshot in flash with the image over the
background then it leaves a halo around the character.
Anyone know how to get around this?
Take care,
S.Can you upload an example of the png or a visual of the halo
you are seeing? -
How to remove links to adobe from the image viewer
On my site I need to display lots of pictures. I used the
image viewer flash element from the `insert`-`media` tabs.
Everything works great, but the first few pics in the
slideshow are clickable, and link to the adobe home page. How could
I remove the links and make the pics not clickable. I already went
into the flash element properties window and made the `image links`
and `image link targets` blank. I don`t know what else to try.
Please help!
thank you: TiborIt's only necessary to post once. No answer usually means
that nobody knows
the answer....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"serestibi" <[email protected]> wrote in
message
news:frm8qo$26v$[email protected]..
> On my site I need to display lots of pictures. I used
the image viewer
> flash
> element from the `insert`-`media` tabs.
> Everything works great, but the first few pics in the
slideshow are
> clickable,
> and link to the adobe home page. How could I remove the
links and make the
> pics
> not clickable. I already went into the flash element
properties window and
> made
> the `image links` and `image link targets` blank. I
don`t know what else
> to
> try. Please help!
> thank you: Tibor
>
> -
Hi all,
Posted a question the other day and still no answer to solve my problem and it is driving me mad
I am trying to use an image created in Fireworks that has gradients in it (please see attached pic).
For some reason Flash makes the image look real bad. I have tried importing into Flash as a PNG and as a JPEG, it still looks dreadful.
I am now wondering if I can create a Flash document using 'transparency' as a background then import over the image on the website however from what I can see I cannot create a transparent stage that is transparent in Flash, it has to be a colour. Is this the case or am I missing something????
Please can someone give me some idea on how to overcome this.
I cant believe I can make an image in Fireworks that Flash can then not maintain the quality. Seems soooooooo simple but yet doesn't work.
HelppppppppppppppppppppppppppppppppppppHi Ned,
Thank you for sorting my other post out, good of you.
Not sure how to post a screen of what I see on here, will have a go.
I will also try your option imports however I am sure I have played and imported every way I can and it still isn't keeping the image clear.
If your able to import my image and it looks fine then I guess I 'must' be doing something wrong!
All I can say is it is like the resolution in Flash is not right. In Fireworks I can increase the resolution to make images better in quality, it seems in Flash I can't so the result, to me anyway, is that the imported image isn't clear.
When I import the image to Flash the beveled highlighted line is not clear, as it should be, it looks slightly out of focus. -
if you have the checkbox for use imported jpeg data selected
within the info for an image, does this mean that there will be
ZERO compression applied to the image from Flash when it is
exported?
Thanks.This from the Flash help file:
The JPEG format lets you save an image as a highly
compressed, 24-bit
bitmap. Generally, GIF format is better for exporting line
art, and JPEG
format is better for images with continuous tones, such as
photographs,
gradients, or embedded bitmaps.
Flash exports the first frame in the SWF file as a JPEG,
unless you mark a
different keyframe for export by entering the #Static frame
label.
1.. Select File > Publish Settings, click Formats, and
select JPEG Image.
2.. For the JPEG filename, either use the default filename,
or enter a new
filename with the .jpg extension.
3.. Click JPEG. Dimensions Enter values for width and height
in pixels for
the exported bitmap image, or select Match Movie to make the
JPEG image the
same size as the Stage and maintain the aspect ratio of your
original image.
Quality Drag the slider or enter a value to control the
amount of
JPEG file compression. The lower the image quality, the
smaller the file
size, and the reverse. To determine the best compromise
between size and
quality, try different settings.
Note: To change the object's compression setting, use the
Bitmap
Properties dialog box to set the bitmap export quality per
object. The
default compression option in the Bitmap Properties dialog
box applies the
Publish Settings JPEG Quality option.
Progressive Show Progressive JPEG images incrementally in a
web
browser, which makes images appear faster when loading with a
slow network
connection. Similar to interlacing in GIF and PNG images.
4.. Click OK.
http://livedocs.adobe.com/flash/9.0/UsingFlash/WSd60f23110762d6b883b18f10cb1fe1af6-7bc7.ht ml
Dan Smith > adobe community expert
http://www.dsmith.tv
"StanWelks" <[email protected]> wrote in
message
news:[email protected]...
> if you have the checkbox for use imported jpeg data
selected within the
> info
> for an image, does this mean that there will be ZERO
compression applied
> to the
> image from Flash when it is exported?
>
> Thanks.
> -
I am trying to create a button in flash that will allow the user to click on the button and 4 separate images show up at the same time. I can get the images to appear when I click the button but they will not stay on the screen. I need to know what code I use to make the images stay once the button is clicked, then I need to know exactly where I place that code. It does not appear to be possible to add the action code to the buttons layer since each time I add a new layer I just get another "up" "over" "down" and "hit" line.
Thank you in advance
APIt is not clear how you are trying to realize this from your description. If you are trying to create this within a button symbol it will not work. Explain your approach and if there is code involved, show what you have so far.
-
I have been working on animating a scene in flash for a few weeks and recently I have encountered a problem with importing my images on to the stage where the images I import do not turn up, however the key frame that I attempted to import the image onto shows that it is occupied by an image and every frame previous to the key frame that just imported an image that does not show turns up as a red square that fills the original perimeters of the image, there is no solution to this problem any where on the forum and the adobe technical support staff will not help me find a solution to this problem what can I do to get Flash running normally again and fix this problem?????
Also after the first time i publish a preview after i begin using flash, flash renders the publishing and scene testing features as useless and claims that there is no HTML template found, or if the images if i import any images onto the stage that come up blank and render every image previous to that image as a red square and then try and publish a preview flash renders the publishing and scene testing features as useless and claims that there is no HTML template found. What can I do to fix this problem??? there is no solution on the web anywhere to this problem either.I don't know if Flash has a memory limit of its own. The memory for your Flash file is based on the available memory on your computer.
There is a limit on the number of frames that you can have in any given timeline. I think that it's about 15000 frames, but that's a guess. Flash does all of its work at runtime, this means that no part of your animation is pre-compiled like it is in a video file. So the more objects that you have on the stage, the more work Flash has to do. It follows that the more objects that there are to animate, the more work your processor and the video card have to do.
Here's a list of articles on memory management that might be useful:
Garbage collection internals for Flash Player and Adobe AIR | AdobeDeveloper Connection
actionscript 3 - What are good memory management techniques in Flash/as3 - Stack Overflow
AS3 Memory Management Tips -
In transferring a video from iPhone 4s to a flash drive then to a Axer FHD-45 pocket projector the image is upside down. It is right side up in the computor and the flash drive. Any help?
Have you tried transferringing the videos via usb (sinc you're having trouble transferring them with PhotoSync) as described here: http://support.apple.com/kb/HT4083 and just transferring the photos with PhotoSync?
-
Has Apple blocked Flash Player again, listing it in the block list. I am able to download the image from Adobe, and begin the install process. Once I get to the option to select update Flash automatically or not, I cannot select an option or click on NEXT to finish the installation. Thoughts?
Adobe's Flash Player Install Manager was updated about a week ago.
I suggest trying the download from Adobe's site here:
http://get.adobe.com/flashplayer/?promoid=JZEFT -
When running FB game apps, the image loaded is too large for the FB space. The program looks for a "zoom" setting and does not find it. This was from the error screen. I have not been able to locate where the image zoom is located (found the font adjustment). I am new to FireFox and would like to sort this out please.
Your installed plug in assume Shockwave Flash 10.3, but I thought it was Adobe Flash 10.3. Are they one and the same?
Below is the warning message from the Error ConsoleI'm not sure the CSS warning is relevant to Flash. Maybe adjust your overall zoom level on Facebook manually from the View menu?
View > Zoom
If you have the orange Firefox button, tap the Alt key to display the classic menu bar. -
Can anyone explain me how to scale the image in canvas in flash builder 4.6
Can anyone explain me how to scale the image in canvas in flash builder 4.6, Scaling of image in component , can i get some examples .. it should set almost all size screen
Maybe you are looking for
-
Windows XP, Firefox 3.6.13 version, I am thinking it would be better to back up to a previous version of Firefox that did work! What was the latest version as of October 2010?
-
Indesign CS6 - PDF = Fuzzy, Redish Text
Hello folks, I am looking for some assistance with printing a PDF I've created from InDesign. I've scoured these and other fourms, but to no avail. Here's a copy of the PDF for anyone to analyze: http://www.nhceh.org/GL%20Sponsorship%20Packet.pdf H
-
Hi i am using lsmw to upload my pouting I am using batch input methode to upload my header data. and direct input methode to upload my operation and material assignment data. is this the correct way of doing lsmw. can we upload header data and the o
-
Datasocket 4.0 Network Client stops if Data are with Attirutes
OS: W2000pro, VB50pro, DSServer40(370) Dear friends, I have some misterious problem with DS40. Configuration : I have one writer with DSServer 40 on one computer and several clients on the same and other computers. Problem: The Clients Data on remote
-
Why does my Mac quit out of InDesign while it's trying to open a file?
My Mac has decided to keep quitting out of InDesign while it's trying to open InDesign files. The problem started today so I updated InDesign CC to the latest version. But no good. It looks like the file is trying to open up there is an issue with th