Need help with images of different sizes being loaded from a container of centering

Stop();

mainArea_mc.visible = false;

home_btn.addEventListener (MouseEvent.CLICK, function () {Stop ("model home")});

var totalImages:int = 0;

var imageDirectory: String = "";

var currentImage:int = 1;

var filePrefix: String = "";

var loader1: Loader = new Loader(); 2 Chargers, so we can fade a picture on top of the other

var loader2: Loader = new Loader();

pic_mc. AddChild (loader1);

pic_mc. AddChild (loader2);

loader1. Name = "loader1."

loader2. Name = "loader2";

loader1.contentLoaderInfo.addEventListener (Event.COMPLETE, resizeFadeImage);

loader2.contentLoaderInfo.addEventListener (Event.COMPLETE, resizeFadeImage);

info_mc.title_txt. AutoSize = TextFieldAutoSize.LEFT;

If (presModeSlides) / / slides Viewer vars configuration

{

totalImages = slides [currentSlideNumber] .numSlides

imageDirectory = "Data/slides/"+slides[currentSlideNumber].directory+"/";

filePrefix = "slide";

info_mc.title_txt. Text = .title slides [currentSlideNumber]

info_mc.speaker_txt. Text = .speaker slides [currentSlideNumber]

info_mc.university_txt. Text = .university of slides [currentSlideNumber]

}

else / / Setup Photo viewer vars

{

totalImages = 233;

imageDirectory = "data/images /";

filePrefix = "image";

info_mc.title_txt. Text = "user International BioPlex® 2200 3 meeting;

info_mc.speaker_txt. Text = "Images";

info_mc.university_txt. Text = "";

}

info_mc.speaker_txt.y += info_mc.title_txt.height;  Position sublines so that they are directly under the title

info_mc.university_txt.y += info_mc.title_txt.height;

leftArrow_btn.addEventListener (MouseEvent.CLICK, prevImage);

rightArrow_btn.addEventListener (MouseEvent.CLICK, nextImage);

showImage (currentImage)

function showImage(num:int)

{

If (pic_mc.getChildIndex (loader1) > pic_mc.getChildIndex (loader2)) / / set the jpg file in what container is on top for the moment

{

loader1. Load (new URLRequest (imageDirectory + filePrefix + currentImage + '.jpg'));

}

on the other

{

loader2. Load (new URLRequest (imageDirectory + filePrefix + currentImage + '.jpg'));

}

}

function resizeFadeImage(e:Event)

{

e.currentTarget.loader.alpha = 0;

Tweener.addTween (e.currentTarget.loader, {alpha: 1, time: 0.4, onComplete: removeOtherImage, onCompleteParams:[e.currentTarget.loader]});})

e.currentTarget.loader.scaleX = 0.75;

e.currentTarget.loader.scaleY = 0.75;

var bitMap: Bitmap = Bitmap (e.currentTarget.loader.content);

bitMap.smoothing = true;

}

function removeOtherImage(l:Loader)

{

If (l.name is "loader1")

{

pic_mc. SetChildIndex(loader1,0);

If (loader2.content! = null)

{

If (loader2.content is Bitmap)

{

(loader2.content as Bitmap).bitmapData.dispose ();

}

}

}

on the other

{

pic_mc. SetChildIndex(loader2,0);

If (loader1.content! = null)

{

If (loader1.content is Bitmap)

{

(loader1.content as Bitmap).bitmapData.dispose ();

}

}

}

}

function nextImage(e:Event)

{

If ((!)) Tweener.isTweening (loader1)) & & (!) Tweener.isTweening (loader2)))

{

If (currentImage < totalImages)

{

currentImage ++;

}

on the other

{

currentImage = 1;

}

showImage (currentImage);

}

}

function prevImage(e:Event)

{

If ((!)) Tweener.isTweening (loader1)) & & (!) Tweener.isTweening (loader2)))

{

If (currentImage > 1)

{

-currentImage;

}

on the other

{

currentImage = totalImages;

}

showImage (currentImage);

}

}

:

function resizeFadeImage(e:Event)

{

e.currentTarget.loader.alpha = 0;

Tweener.addTween (e.currentTarget.loader, {alpha: 1, time: 0.4, onComplete: removeOtherImage, onCompleteParams:[e.currentTarget.loader]});})

e.currentTarget.loader.scaleX = 0.75;

e.currentTarget.loader.scaleY = 0.75;

e.currentTarget.loader.x = (stage.stageWidth-e.currentTarget.loader.width)/2;

e.currentTarget.loader.y = (stage.stageHeight-e.currentTarget.loader.height)/2;

var bitMap: Bitmap = Bitmap (e.currentTarget.loader.content);

bitMap.smoothing = true;

}

Tags: Adobe Animate

Similar Questions

  • slideshow with images of different sizes (Adobe Muse CC 2014)

    Hello world

    Firstly it should be noted that I use Adobe Muse CC 2014

    Is it possible to create a repeating slideshow (not full screen or Viewer), with images of different sizes, so that when the image is square or portrait or landscape, the image size will be changed automatically depending on the size of the image inside.

    I know that in some widgets, one solution is to select each image and manually set the desired size of each image, but it is not easy when you have for example 50 images.

    Thank you

    You would need to manually go to this, unfortunately we cannot do this without manual work.

    Thank you

    Sanjit

  • working capital with images of different sizes in the table

    Hello, I have a table with images of different size.  I want to use a bearing on each Panel, but my image is not the same size.  When I roll over the image the first image disappears.  Any suggestions?  I use CS5.5 Show map to the bottom.of page.

    Kappa Delta Pi

    Thank you

    Also I have never been able to use the "Preview in browser" globe icon  I don't seem to be, any suggestions on how to add this?

    A very simple solution is to make a second image that contains the image superimposed on the map. You must have 4 total images for this (all images have the same size):

    1. the plan with no photos

    2 - 4. The card with a unique image on the desired region (i.e., 3 additional images).

    In your access points, you exchange the entire map with the map of the desired region.

  • Disjoint working capital with images of different size?

    Each tutorial explains the disjoint rollover images MUST be the same size, etc..  But for the type of photos that I work with, it is impossible to make them the same height.  This site is exactly what I'll do with images of different sizes used: http://www.warmbloods-for-sale.com/HorseDetail.asp?HorseID=21333 & UserID = 1775.  No idea how they achieve this?  Or any ideas on how I can manage the same effect with different sizes in Dreamweaver CS4?

    Do a Google search for Lightbox, litebox, floatbox, or look at the Image Gallery Magic of the seven project.

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    www.Alt-Web.com/blogspot.com

  • Need help with image fusion

    Hello

    Before I get to my question, I want to give you a glimpse of the project I'm working on and the aspects that I need help. For a school project, a customer, 94Fifty asked us to create an advertisement that depicts their basketball and could be used in advertising online and in magazines. The 94Fifty of basketball is the world's first "smart ball." It can count how many times you dribbling, the arc of your shot, release time it takes for you shoot, etc. To use the ball, you need an Apple product that can download the application 94Fifty on the App Store, so that this project is done as a collaboration with the company 94Fifty and Apple.

    For my ad, to really capture the idea of being the first smart ball, 94Fifty ball I wanted to mix an image of the texture of the ball of 94Fifty, with the shape and details of a brain, with the slogan being, "A ball that is as smart as you." I have my design buried on, but I'm not sure how to combine the image of the brain with ball should I use layers? How can I remove the pink color of the brain and replace it with the ball while keeping the shape of the brain and the lines creased the brain? Any help and technical that you can give would be greatly appreciated.

    Here are two pictures that I'm trying to mix.

    8376271918_cf0b1b5c4f_o.jpg94fifty ball.png

    I would also try and keep the logo of 94Fifty which is on the ball in the mixed picture.

    Please do not confuse this for to ask me someone to do it for me, it's the exact opposite of what I want, I just need help with what to do.

    Here is a fairly simple method:

    First of all, level of basketball for the type to be horizontal. (Also correct the values of white light - burn at the top left and bottom top right.)

    Mask on white background of the brain and turn the image to 0% of saturation.

    Put the brain on basketball on its own layer. Make the overlay blend mode.

    Using free transform, reshape the brain is greater (rounder), like the basketball, with a visible margin around the edge of the ball.

    -Now, you have a brain in a basketball, but the brain is a bit too subtle.

    Duplicate the layer of brain as many times as you need to get the good contrast (I've duped the layer of brain three times, for a total of four layers of brain).

    You will probably find that you need to use the levels adjustment layers or curves on each layer of the brain, for finer value adjustments. Make sure that each adjustment layer affects only the layer directly below.

  • Need help with Image Processor

    Hello

    I have a lot of pictures, that I need to resize to a Web site. These images are all different sizes, 250 x 400 (h) to 200 x 800 (h). I need it to fit in a Web of 246 x 327, in their original proportions, regardless of white space.

    Does anyone know if this is possible? So far all my results have failed and image processor seems to just resize proportionally up to a maximum of 246 x 327, so nothing is that the EXACT size, but all the images will be adapted now integrate 246 x 327. I don't know what to do now.

    Any help is greatly appreciated.

    -Tim

    You can do this with a script.

    Save the code in the settings presets/scripts as filename.jsx, then you can include the script in action. Use "Insert Menu Item' in the menu drop-down action palette and select file - Scripts - select the script.

    function main(){
    if(!documents.length) return;
    var doc = activeDocument;
    var White = new SolidColor();
    White.rgb.hexValue = 'ffffff';
    // target size =  246x327
    FitImage(240, 321 ); //width - height change to suit
    app.backgroundColor = White;
    doc.resizeCanvas(new UnitValue(246,"px"), new UnitValue(327,"px"), AnchorPosition.MIDDLECENTER);
    }
    main();
    function FitImage( inWidth, inHeight ) {
     var desc = new ActionDescriptor();
     var unitPixels = charIDToTypeID( '#Pxl' );
     desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
     desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
     var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
     executeAction( runtimeEventID, desc, DialogModes.NO );
    };
    

    Edit: -.

    You need not even the script! as the size is not dependent on the direction, so after the Image ride you can use Image - size canvas in your action.

  • Need help with HP8050 custom made size

    I would like to print photos of 8 x 12 inch on my Photosmart Hp8050.  Pls tell how to set up the printer for this custom setting. I'm on Mac OS10.6.8.

    Thank you.

    With your help, I now understand the "custom" option and provided a custom option 8x12in. "."

    Ive tried to test this custom functionality by inserting a sheet of A4 (different size than 8 x 12)... and get the following error message:

    Paper size error: the custom paper size specified is not supported in the selected tray.

     
  • Need help with Image map

    Hey everyone I hope that someone can help me here. What I'm trying to do is create a card flipping immage, if possible. Essentially, I have a card with different routes Charter on it, and I would like to be able to move the mouse on a single track, highlight it in red and then be able to click it and a link to another page. How is this achieved? There are several roads, and they are not distributed between sectors that I could crop and use as individual images. If it doesn't, maybe if someone could explain to me how having a side buttons together to highlight the road and allow me to click and a link to another page. I understand how to work the images hover and such, but multiple transfers on a single image is confusing to me. If someone could answer this, I would be EXTREMELY grateful. Thanks in advance and ask if you need any clarification with my problem to help solve it.

    Genii

    Sorry... He answered myself

  • Need help with image slideshow quality full-screen

    I'm looking to display pictures with slide show full-screen. The images I add are very large, more than 5000 wide. When I write the site images maintain their quality while others lose it look like shit. Why would this be and how can I solve this problem. I tried to resize the 2560 x 1707 muse done and then add them. This does not change the final result of poor quality.

    Go to the components Panel and locate the image you want to use in the original format. Right-click on the image and chose 'largest import size. "

    See if that helps to maintain the quality of this image, as Muse does not resize/interpolate this image for you.

    See you soon,.

    Vikas

  • Need help with Images associated with berries

    `

    I'm not sure if this is possible, as I am not a common programmer, but I have a question.

    I have a table that generates a random word in a text box, then a second table that generates another word at random in a different text box. What I want is for when a certain word off number one table is generated, a certain image is displayed with it. Here is the code:

    var FirstChoice:Array = ['this', 'Do'];

    var SecondOption:Array = ["during this operation', 'while doing this'];

    generate_btn.addEventListener (MouseEvent.CLICK, getTask);

    function getTask(event:MouseEvent):void {}

    var randomChoice:Number = Math.floor (Math.random () * firstChoice.length);

    var randomTask:Number = Math.floor (Math.random () * secondOption.length);

    First_Thing.text = exerciseChoice [randomChoice];

    Second_Thing.text = homeTask [randomTask];

    }

    For example, when I click the button and the first table generates "Do this", I want a chart specific to appear with him. Similarly, if 'this' generates, I want a different graphic to appear specifically associated with this variable.


    I hope that this is possible :/ I'm puzzled! I asked for help on StackOverflow; However, their advice did not work. Of course, I only got a response, so I hope that people here can help me out!

    var FirstChoice:Array = ['this', 'Do'];

    var SecondOption:Array = ["during this operation', 'while doing this'];

    var imageA:Array = (mc1, mc2);

    var currentImage:MovieClip

    function getTask(event:MouseEvent):void {}

    var randomChoice:Number = Math.floor (Math.random () * firstChoice.length);

    var randomTask:Number = Math.floor (Math.random () * secondOption.length);

    First_Thing.text = exerciseChoice [randomChoice];

    Second_Thing.text = homeTask [randomTask];

    {if (currentImage)}

    currentImage.visible = false;

    }

    currentImage = UIImage [randomChoice];

    currentImage.visible = true;

    }

  • Need help with styles of different links on the same page

    Hello

    I use Dreamweaver CS4 on a PC.

    I searched through a large number of posts during the last two days, I tried the tutorial projectseven.com, google would, etc., but still may not know...

    All I want to do is apply a different link color to some links at the bottom of my page. Elsewhere on the site, I put the color blue (for the link) and orange (for the hover)-for footer links, I want the link to be white and the hover to stay orange color.

    The problem with the projectseven tutorial is that it seems not to apply to the CS4 and I kept getting error messages when you try to apply a new CSS rule - there is no class. Tag | Advanced according to the instructions...

    I copied the code to my page for this. The links I want to apply a different style to are contained in the DIV called "Footer-Navigation-Bar.

    Could someone please give me some instructions or point me in the right direction please?

    Thank you very much

    Vickie

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    <!-saved from url = (0014) subject: internet->
    "< html xmlns ="http://www.w3.org/1999/xhtml">".
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    <!-TemplateBeginEditable name = "doctitle"-->
    the < title > Australia subscribe to the family - it's free! < /title >
    <! - TemplateEndEditable - >
    "" < link href = "... / family - subscribe.css" rel = "stylesheet" type = "text/css" / >
    "" < script src = "... / SpryAssets/SpryMenuBar.js" type = "text/javascript" > < / script >
    "" < link href = "... / SpryAssets/SpryMenuBarHorizontal.css" rel = "stylesheet" type = "text/css" / >
    <!-TemplateBeginEditable name = "head"->
    <! - TemplateEndEditable - >
    < style type = "text/css" >
    <!--
    a: link {}
    color: # 30;
    text-decoration: none;
    }
    a: hover {}
    color: #F30;
    text-decoration: none;
    }
    a: visited {}
    text-decoration: none;
    }
    a: active {}
    text-decoration: none;
    }
    ->
    < / style > < / head >

    < body >
    < div id = "container" >
    < div id = "banner" >
    < ul id = "family-subscribe-menu" class = "MenuBarHorizontal" >
    "< li > < a href ="... / index.html "> home < /a > < /li >"
    "< li > < a href ="... / subscribe.html "> Subscribe < /a > < /li >"
    "" < li > < a href = "... / family - advertise.html" > announced < /a > < /li >
    "" < li > < a href = "... / family - articles.html" > items < /a > < /li >
    "" < li > < a href = "... / family-sign - in .html" > questions < /a > < /li >
    "" < li > < a href = "... / family - contribute.html" > Contribute < /a > < /li >
    "" < li > < a href = "... / family - contact.html" > Contact < /a > < /li >
    < /ul >
    < / div >
    "" "" < div id = "sidebar" > < a href = "... / family-sign - in .html" > < img src = "... /images/Launch-issue.jpg" alt = "number of launch" width = "220" height = "380" hspace = "4" / > < / has >
    < div id = "sidebar-image2" >
    "" < p > < img src = "... / pictures/sleeping bag for Web.jpg" width = "220" height = "151" alt = "sleeping bag" / > < / p >
    < p > Kozy Koala™ Sleeper pillow is ideal for summer nights when children want to sleep or when go you camping. The camper all-in-one pillow is composed of... [MORE] < /p >
    < / div >
    < div id = "sidebar-image3" >
    "" < p > < img src = "... / pictures/solrx for Web.jpg" width = "220" height = "164" alt = "sunscreen" / > < / p >
    SolRX® solar filters are very sweaty and resistant to the water-ideal for anyone who leads a life active outdoor... whether you are in the water or not! [MORE] < / div >
    < / div >
    <!-TemplateBeginEditable name = "content-area"->
    < div id = "main content" > main content < / div >
    <! - TemplateEndEditable - >
    < div id = "footer" >
    "" < div id = "page-navigation-bar foot" > < a href = "... / family - about.html ' > on < /a > | "" < a href = "... / family - advertise.html" > announced < /a > | "" < a href = "... / family - contribute.html" > help < /a > | "" < a href = "... / family - contact.html" > contact < /a > | "" < a href = "... / family - unsubscribe.html" > unsubscribe < /a > < / div >
    < div id = "foot of page-text" > Family Australia | ABN 33150685385 | "For all advertising inquiries, please contact < a href ="mailto:[email protected] "> [email protected] < /a > < br / >"

    Copyright © 2010 family Australia. All rights reserved.
    < / div >
    < / div >
    < / div >
    < / div >
    < script type = "text/javascript" >
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar ("family-subscribe-menu", {imgDown: "SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});})
    ->
    < /script >
    < / body >
    < / html >

    The links I want to apply a different style to are contained in the DIV called "Footer-Navigation-Bar.
    ......
    ......
    a: link {}

    color: # 30;
    text-decoration: none;
    }
    a: hover {}
    color: #F30;
    text-decoration: none;
    }
    a: visited {}
    text-decoration: none;
    }
    a: active {}
    text-decoration: none;
    }

    Hello

    You can see the CSS that applies to your links above.  If you have links you want to style in a different way, just write the rule as follows:

    #Footer - Navigation - Bar has: link {}

    color: Red;

    text-decoration: none;

    }

    Or whatever.  There are other ways, but this will make you as you already have these links you want to style differently in a div with its own code.  The new rule comes after other rules in your CSS I think that to make sure of the cascade, well thinking about, there is something called specificity in the CSS, which means that the rule I suggest will win anyway.  Everything you do in my suggestion is to select one: a link that is a descendant of an element with particular ID.

    I hope this helps.  I am a novice and might have gotten a little fuzzy with the waterfall/specficity but good, I think you get where you want to go...

    Martin.

  • need help with image download and preview screen

    Hi guys,.

    I am trying to download image and then view Preview, but when the download form submits to the placeholder image page itself is not updated his source and shows the same image as before.

    4.jpg image already exists.

    I download with nameConflict = "overwrite".

    Download form on the same page, so the page charging points

    In IE image placeholder does not appear the new image, but shows the old one until I have updated the page with F5 and return information, however if checked, image in the file is already different.

    In Firefox, sometimes it works and the image refreshes, sometimes not.

    any help would be greatly appreciated!

    see you soon,

    Simon

    Hi Simon,.

    In this case, you can follow this tutorial

    http://www.communitymx.com/content/article.cfm?cid=71EDA

    HTH

  • Need help with image resizing

    Hi all

    I downloaded an image from a URL and I want to display on my BB screen.  I want to get the image resized before displaying on the screen. I wrote the code, but it is cropped horizontally and vertically.  How can I get the image resized by preserving its quality? I want the new width of my image also as (screen width - 20) / 3 and height as something like original image height / 3  I post my code here

    public static Bitmap resizeImage(Bitmap originalImage, int newWidth, int newHeight) {
            Bitmap newImage = new Bitmap(newWidth, newHeight);
            originalImage.scaleInto(newImage, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);
            return newImage;
        }
    

    Thank you and best regards.

    Replace Bitmap.SCALE_TO_FILL by Bitmap.SCALE_STRETCH solved the problem.

    Thank you.

  • Newbie needs help with leader and mixed size/font style in the paragraph

    I'm very new to using InDesign. I am formatting my book for children in a style similar to books, Geronimo Stilton:

    Geronimo Stilton #51: The Pearl of enormouse affect Heist: Anticipazioni - Geronimo Stilton [p. 2]

    Can someone direct me to how to keep my consistent attack despite a change in the size of police and style in a paragraph?

    Thank you!

    Susan

    to set up your line spacing in your paragraph style value (do not let auto leading value to your paragraph style).

    Also implemented a vertical justification above and do not align to baseline grid

    an example:

  • Newbie needs help with Images

    Hi, I'm a newbie to flex and I have a question very quick and basic images. I try to have a simple image and when clicked on it, it turns into to another image, and if you click it again it goes back to the original.  To my knowledge, the first part of the MXML code works as:

    < mx:Image id = source = "Old.jpg"MyImage"" click = "myImage.source ='New.jpg" "/ >"

    So the first part works, but how can I do so that when I click on the new image the source goes back to the original image?  Thanks in advance.

    Use a function and a global var like this in a script block:

    private var bSwap:Boolean;
    
    private function imgClick():void{
         if (bSwap){
              myImage.source="Old.jpg";
              bSwap=false;
    }else
    {
         myImage.source="New.jpg"
         bSwap=true;
    
    }
    
    }
    

Maybe you are looking for