Determining width of loaded clip

Hi all,
Is there a way I can get and set the width and height of a
loaded movie clip? I have created an empty movie, and then loaded a
small swf file into the empty movie with loadClip. I now want to
determine the width and height of this loaded clip, and scale it to
the size of my movie dimensions. Can this be done? Although the
movie loads fine, and I can position its x and y coordinates, the
width and height show as zero.
Can anyone help me with this one? I'm using Flash
Professional 8.
Thanks,
brayne

you must wait until loading is complete to access the loaded
swf's _width and _height. and then you'll see the _width and
_height of the on-stage objects in the first frame if you access
those properties as soon as the swf is initialized.

Similar Messages

  • Positining loader clip

    Hello (again),
    I am building a gallery for a photographer.
    The setup: one large mc loader on mainstage (myLoader_mc).
    Several movie clip thumbnails contained in one large movie clip.
    You click on the thumbnail, large image loads into myLoader_mc. I
    am using a purchased component from extend studios for my
    transitions.
    The problem: my jpgs are of different height and width. I
    want to keep using the same movie clip to load the images
    (myLoader_mc) but position the loader with different x and y
    coordinates for each loaded image so that it is centered on the
    stage. I am using the following script but the loader clip is stuck
    in the position defined by the first thumbnail. the script is in
    layer 1, frame 1 of the movie clip containing all of the thumbnail
    movie clips.
    th1_mc.onRelease = function(){
    _parent.myLoader_mc.loadMovie("/assets/family/1b.jpg");
    myLoader_mc._x = 162;
    myLoader_mc._y = 5;
    th2_mc.onRelease = function(){
    _parent.myLoader_mc.loadMovie("/assets/family/2b.jpg");
    myLoader_mc._x = 282;
    myLoader_mc._y = 5;
    The image loaded by thumbnail 2 is stuck in position on
    thumbnail 1. Need to change this dynamically no matter which thumb
    is clicked.
    I had also tried creating different empty movie clips to
    accomodate each different sized jpg, but I could not get the
    previous loader clip to unload when another thumbnail was clicked.
    The previos clip would just stay on the stage. I was using this AS:
    th1_mc.onRelease = function(){
    _parent.myLoader_mc.unload;
    _parent.myLoader_mc.loadMovie("/assets/family/1b.jpg");
    Any help is appreciated and I hope I have explained this
    clearly enough. If you help me solve this, i will toast my next
    drink to you.

    Well, I guess we could put some closure to this thing, I
    don't like loose ends. Not that i will ever remember any of it but
    here's my code:
    stop();
    var mcl:MovieClipLoader = new MovieClipLoader(); // create a
    new MovieClipLoader object
    _root.loader2_mc._visible = false; // make the container MC
    invisible
    var lis = new Object(); // create an event listener object
    lis.onLoadInit = function() {
    mc._x += (Stage.width - mc._width) /2;
    mc._y += (Stage.height - mc._height) /2;
    _root.loader2_mc.visible = true; // make the loaded content
    visible
    _root.loaderfx.initEffect(); // initialize the effect
    _root.loaderfx.startEffect(); // start the effect
    mcl.addListener(lis); // add the listener object to the
    MovieClipLoader
    mcl.loadClip(img, mc); // load the image
    th1_mc.onPress = function() {
    loadImage('/assets/family/2b.jpg');
    th2_mc.onPress = function() {
    loadImage('/assets/family/4b.jpg');
    Much to my amazement (ha, ha) nothing happens. this is just
    from a generic test file as i deleted the original. i have a
    component attached to it and what i have done is blended the code
    the knuckleheads at extend studio gave me and what you have given
    me, which has turned into Actionstein.
    does it matter if you use "lst" or "lis"? Was wondering about
    that.
    Anyway, all i was asking was to load images of different
    sizes into the same movie clip and have them all centered.

  • How to check width of loaded image

    Hi my script loads an image like this:
            image = new Sprite();
            imageLoader = new Loader;
            imageLoader.load(new URLRequest(imageList.image[1].imgURL));
            image.addChildAt(imageLoader, 0);
    how can i check the width of loaded image? trace(image.width) gives 0...

    You need to wait until the image is loaded before you can try to ffind its width.  To do that you need to use the contentLoaderInfo property of the Loader class
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, manageImage);
    The manageImage event handler function is where you can check things since it is triggered after the object is loaded.

  • Loss of quality in loaded clips

    Problem:
    http://img706.imageshack.us/img706/3715/probka.png
    It's sample of video I have. It's quality isn't already gratifying, but when I load it to Premiere CS4, sample looks this way:
    http://img697.imageshack.us/img697/7840/probka2.png
    Second picture shows apparent distortion and pixelize, general loss of quality.
    How can I fix it? Any settings which I could change to improve quality of loaded clips?
    thanks for help and sorry for my poor english

    Did you drop your footage in a PAL widescreen sequence with the fields set default to lower or did you set up a sequence with the fields set to upper
    because that is what the mpeg files are: TFF
    Sequence should match the footage.

  • Determine if InteractiveObject is clipped/hidden

    Hi,
    I have an algorithm for triggering MouseEvent.CLICK from any random visible and enabled sprites on my stage to cheaply simulate user interactions with my application.
    I'm interested in determining if an InteractiveObject is clipped by its parent sprite or if it is "covered" by another sprite in the display list. For example, I have a set of buttons on the screen but cover them with a splash screen.
    I'm lazy and the buttons are still enabled and visible when they're covered. I can't actually interact with them though because the splash screen doesn't let events through. Is there an easy way (ie. single function call) to find out that the buttons are not actually usable? Or is there a way (doesn't have to be  easy) to figure out that the buttons are clipped/hidden by the splash screen?
    Thanks in advance,
    darren

    First off, I want to thank you for your time. It's very appreciated.
    I've attached a simple diagram of two potential states in my application. The first state is the base state. The blue area is my application. The green area is a 3rd party application, which is a separate SWF as you've correctly deduced, with its own interactive elements. The green area is contained in the blue area... ie. I've loaded it and added it as a child of my application. As an example, I have a help button in my application. The second state represents when the help button has been pressed and the purple "splash screen" comes up on top of the 3rd party application. The help screen may or may not have additional interactive elements.
    So, to get back to my original problem, I have an in-house test tool that simulates user interactions by searching through the display list for enabled interactive objects. I have no control over whether or not this 3rd party application enables or disables their buttons when I press the help button, but I know that my help screen effectively prevents touches from getting to those 3rd party interactive objects. When my test tool is running, I'd like to be able to determine if a particular sprite (one of the green interactive objects in my example) is covered/clipped so that I know if I can safely ignore it during my test tool's search. Is there such a function in any of the Flex/Flash libraries?
    Thanks!

  • How to determine tempo of a clip?

    First, when I loop a clip to determine it's BPM tempo, it's always slightly off, I know this because I previously had it looped in a sampler and the tempo was different and the loop is perfectly cropped, unless it's the sampler which is off... is there any other way to determine the tempo in Audition with markers or any other way that you know of?  How do you yourself determine the tempo of various files?
    Another instance I'm wondering about is If I'm trying to match up vocals for a remix and I know the tempo of my loops but not of the vocals, is there any way I can determine the BPM tempo of the vocals?... or atleast a rough estimate?  probably not here.
    What about for a passage that's over a minute long...?...Other then counting 1+2+3+4 for an entire minute.
    4/4 signature of course.
    thanks for any suggestions!

    Select Bars and Beats as your current timescale on the Display Time Format menu. Then in the same menu you can use the Edit Tempo page to calculate your Tempo (see the Help file for use of all the options).

  • Importing my video from my event library into my project library, it shows the full width of the clip, but on the viewing section, it's zoomed in and cut the sides of the video off.  How do I stop this from happening?

    When importing my video from the event library to the project library, it's zooming in and
    narrowing the width of my footage.  How do I stop this from happening?

    In the project, double-click on the clip to open the Clip Inspector. In the Clip tab you will see an item about two thirds down labelled "Stabilization". If checked, uncheck the box "Smooth clip motion".
    Stabilizing clips causes a zoomed in effect, with the extent of the zoom dependent upon how shaky the footage is. There is a slider beneath the check-box labelled "Maximum Zoom" - this can be draggged back and forth to adjust the zoom effect if desired, once the clip has been stabilized.
    You may have chosen to analyze clips for stabilization when importing to iMovie (that's a choice provided by iMovie upon import). If so, it's best to turn off an option in iMovie's preferences. Go to this from the iMovie menu item iMovie>Preferences. Click on the Browser tab and deselect (uncheck) the box labelled "Automatically stabilize clips that have been analyzed".
    I prefer to import clips without analyzing, as this speeds up the import process. Afterwards, in the Event you can check for any overly shaky clips, then analyze them in the Inspector. If necessary, once dropped into a Project, you can stabilize them as desired. You can also stabilize clips directly in the Project without having to first analyze them in the Event.
    John
    Message was edited by: John Cogdell

  • The panel's state - how to determine it on load?

    Hi!
    Is there a way to determine the panel's state when it's being loaded ? Iconed, docked, etc.?
    (I want to workaround this CS SDK bug: http://forums.adobe.com/message/3174731#3174731 in Illustrator, when, if the panel was in the iconed state, it won't keep it on the next launch of  Illustrator)
    Thank you!

    Look in the "install.log" file in /var/log on one of you backups, it should have a line that contains the information you require.
    This is from my MacBookPro running Mavericks but I don't think the file will be much different for other versions of OS X.
    Hardware: MacBookPro7,1 @ 2.40 GHz (x 2), 4096 MB RAM
    Unless you have changed the memory since the install.

  • Width of loaded picture

    Can I trace the width of a loaded picture?
    I thought it would work something like this, but it won't
    work..

    Replacing currentPic.width with Holder.width should work.
    Also you have to update the
    Holder.addEventListener(Event.COMPLETE, onLoadComplete);
    to
    Holder.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onLoadComplete); as 'dzedward' said.

  • Use start date and end date to determine width of bars in oracle apex chart

    Hi,
    I would like to create a flash chart (vertical bar graph) where the width of the bars is determined by the start and stop dates that are stored in the record. Is there a way of doing this easily? The stop_date of one record is not necessarily the same as the start_date of the next record.
    For example,
    value....start_date....end_date
    250 1-jan-2010 10-jan-2010
    500 1-feb-2010 10-feb-2010
    400 1-mar-2010 15-mar-2010
    350 1-apr-2010 15-arp-2010
    Thanks,
    Peter

    Hello,
    I closed this because I got a note from SAP.
    thanks for reading.

  • Bug? firefox doesn't load clips!

    Hi everybody...
    I have this terrible problem...
    I'm developing a site entirely made with flash (customer's
    request...), and I rely on flash's ability to loadClips (movies)...
    It already works on Internet Explorer, Opera, and other
    browsers, but with firefox... it is like it doesn't even send the
    request to the server to load the clip, since I put some listeners,
    and the onLoadStart() isn't called...
    I'm using the MovieClipLoader object to make the loadings...
    so... does anyone have any idea on what's going on? any solution?
    the site i'm making is:
    http://colegiosalesiano.org.mx
    , perhaps it's a problem of my ISP, i don't know... and you all
    must agree that I MUST enable the functionality of the flash on
    firefox
    Hoping for an answer... wish you all a happy new year

    it's a lot of code.... I have this Moviecliploader object,
    and a function loads the clip... like that...
    listeners=new Object();
    listeners.onLoadStart=function(){
    //things that I should recognize it this is called
    listeners.onLoadProgress=function(){
    //the progress report
    listeners.onLoadComplete=function(){
    //completed
    mcl=new MovieClipLoader();
    mcl.addListener(listeners);
    addSection=function(swf){
    mcl.loadClip(swf,mccontainer);
    So many buttons call the "addSection()", like...
    button.onRelease=function(){
    _root.addSection("dir/sample.swf");
    Now, the code I pasted is not the used on the flash, but it
    works like that... on the Flash it doesn't
    presents any syntax error, so, it's not like that the posible
    error, but a logical planning, I guess... or
    simply the plugin for firefox doesn't works properly, or I'm
    missing something... dont know.

  • IMovie Hang after loading clip made by FCEHD

    I am trying to load movie clip which was made by Final Cut Express HD. The length is about 11.7 GB (56 min).
    But iMovie was hang up when the process was almost done.
    Any idea? Thanks,
    Kenny

    Kenny,
    in FC choose only one sequence as a test and then go on file export to QT and save the .dv file. Within iMovie, choose import from the menu and locate the .dv file and open it. It should open as a clip into your clip pane. Hope that helps. iMovie should not hang itself in this scenario. What you cannot do is to import the sequence directly from FC into iMovie.
    Hisham

  • ODI: How determine if auto load is complete and all data has gone through

    Hi All,
    I am currently executing the below scenario and following http://docs.oracle.com/cd/E26070_11/otn/pdf/integration/E26075_01.pdf for the same.
    SRC: AGILE
    TRG: OBIEE
    As per the above i get out of the box packages which are used and executed , since this is something which comes out of the box how to determine whether my data load is complete and data has gone through from SRC->ODM->TRG?
    My Operator and sessesion show success and secondly i don see any errors in logs as well .
    Any help ? Anybody already experienced above scenario please help .
    Cheers,
    Mak

    So who do I believe?
    Blog:  http://www.jamoroki.com
    James King
    about.me/jamoroki
      <http://about.me/jamoroki>

  • PP 6.02 loading clips painfully slow

    Hello.
    I am trying to edit a 10 hour mini-series on Premiere Pro 6.
    I have about 20,000 clips in the project.
    Up until the recent update it would load everything in about 5 - 10 minutes.
    As of now I've been waiting an hour and it's only 30% done.
    This started with the recent 6.02 update.
    I'm using OS 10.7.4 32gbs of RAM dual Xeon processors with 10 TBs of drive space.
    Any suggestions as to how to get this back to normal?
    Thanks in advance.
    Best,
    Dare

    lasvideo, thanks but that's not the same problem I am having. Appreciate you chiming in though!
    Stephen, thanks for writing. It's a pretty massive project and because clips often criss-cross between segments I have been working everything inside the same edit. I also wanted to see just how hard I could push Premiere (I've been using Premiere for 7 years now). Mind you once everything loads it still does just fine. Edits like a champ. Just was a bit frustrating with the load time.
    On #1, I don't have time machine set-up anymore as I ate up all my space.
    On #2 this is an interesting suggestion. I'm letting project manager analyze my project right now. I've never used project manager to break off individual edits so this should be interesting. Yes, just me on one machine. I'm shooting and editing at the same time and also doing graphics so I reckon by December. I have two full backups of all footage and edit files and save to a new edit file every couple of days (plus I have auto-save rolling).
    And for whatever reason, today when I opened a different project and then went back to the large project, suddenly the problem dissappeared. Weird but there it is. All 20,000 clips now load again under 4 minutes.
    Thanks for the assistance.
    Best, Dare

  • Loading clips into loadmovienum.. trying to make load in background

    I swear that this was working earlier but i must have changed something because now it isnt. I have a few clips that im trying to have load in the background without actually being visible upon initial load. To accomplish this i was going with something like this on the first frame of the main clip:
    loadMovieNum("dl_illustration.swf",4);
    _level4._visible = false;
    I SWEAR this same code was working just fine about 30 mins ago and now ive been playing with some other stuff and its not working anymore- the illustration clip just loads right over top of the main clip, basically ignoring my call for it to be invisible. Does anyone have ANY clue what is going on here?

    you have to preload _level4, not _root:
    on frame 1:
    fill._xscale=0;
    loadMovieNum("dl_illustration.swf",4);
    this.onEnterFrame=function(){
    var lb:Number=_level4.getBytesLoaded();
    var tb:Number=_level4.getBytesTotal();
    if(bl>0){
    var loaded:Number = 100*bl/bt
    fill._xscale = loaded;  // assuming there's something on-stage with instance name fill
    prcnt_done.text=loaded+"% Loaded"; // assuming there's a textfield with instance name prcnt_done on-stage
    if(bl>=bt){
    delete this.onEnterFrame
    // loading is complete.  do whatever
    p.s.  the _visible property is reset in load-targets so it's not usable to hide loading swfs/images.  you can use the _alpha property because that's not reset in load-targets.  but, again, the target has to exist before you can reference it.  your best solution, if you want to use _level4, is to place an empty keyframe in your external swf in frame 1 and attach a stop() to that frame.  after loading is complete, apply a play() method to _level4 when you want it to play.

Maybe you are looking for

  • AUC settlement through KO88

    Hi all, While doing KO88 i am getting the following error Account 5000021 in company code P001 cannot be directly posted to Message no. F5354 Diagnosis Account "5000021" in company code "P001" is marked as a reconciliation account for account type "A

  • IDOC transfer from ECC to XI

    Hi Im trying to trigger an IDOC transfer automatically when a material is created to XI system. I activated matmas change pointers and I'm able to create IDOC but its not getting transferred to XI system. IDOC status is 03 - sent to port OK. What are

  • New owner of used Mac Pro

    Just bought a Mac Pro from a co worker...any tips onhow to clean up and make it mine?

  • Malformed Guid String

    I have been getting the message "Malformed Guid String" in my event window - little red circle cross thing bottom right of timeline. It doent seem terminal.

  • Is there a way to delete an old Backup

    I have gotten the message that my iCloud storage is almost full on my PC and was wondering if there is a way to delete an older backup to make room. PC Windows 8.1 iPhone 5s iOS 8.1 iPad mini with Retina iOS 8.1