MovieClip depth problem

LOC1-loc12 is movieclips on the stage, and they seem to be always on top. Even after this.setChildIndex (MovieClip (e.currentTarget), (this.numChildren - 1)) I do not understand why...

public void mousedown(e:MouseEvent)

{

If (loc is false)

{

targetArray.push (loc1 loc2, loc3, loc4, loc5, loc6, loc7, loc8, loc9, loc10, l oc11, loc12);

Loc = true;

}

e.currentTarget.startDrag ();

this.setChildIndex (MovieClip (e.currentTarget), (this.numChildren - 1))

}

Index/depths are managed from the lowest to the highest, where the higher index object appears on other items to lower indices.  The line of code you call into question is to bring the object to the index of hioghest... this.numChildren - 1.

Tags: Adobe Animate

Similar Questions

  • How do I set the movieclip depth

    Hi, I m new to as3

    I'm looking for similat MovieClip.swapDepths method (depth)

    What is the method in as3, I movieclips I wanne be updated these deths

    Thanks for help

    Amit Shakya

    You can use setChildIndex to move a clip to the top of the display list.

    container.setChildIndex (yourClipRef, container.numChildren - 1);

    If you have two clips that overlap a and b on the stage, you could pretend to allow them to get to the top when you click on:

    a.addEventListener (MouseEvent.CLICK, moveToTop);
    b.addEventListener (MouseEvent.CLICK, moveToTop);

    function moveToTop(e:MouseEvent):void
    {
    setChildIndex (MovieClip (e.currentTarget), numChildren - 1);
    }

  • MovieClip onRollOver problem

    Dear all,

    I add the following codes in the frame1 in the main time line, but it did not work when the mouse on the picture 1. jpg


    this.createEmptyMovieClip("mc",1);
    {with (MC)}
    _alpha = 0;
    loadMovie ("1.jpg");
    }
    {mc.onRollOver = function ()}
    This ._alpha = 100;
    }


    Kind regards

    Wing

    First off when writing code, make sure you try to stay away from the statement 'by' if possible and do not name your login URLs starting with numbers which could cause errors.

    But you can find the full explanation to your problem on the loadMovie function in the help files in flash. Which means that you should make sure to nest a movieclip in a movieclip using the loadMovie function and if you load SWFs make sure you use _lockroot = true.

  • attachMovie depth

    I'm sure that I did it before without any problem, but maybe something has changed?

    I have a movieclip add to a depth of 100 using attachMovie(). I removed this clip using unloadMovie() and attached a new movieclip depth of 100. The new movieclip instance is created, but not displayed unless I attach to another layer.

    I know that when I have done it before, adding a new instance at a depth where another instance already existed would replace the original instance.

    A few questions...

    The first movieclip instance properties are always accessible, even if the element has been deleted using unloadMovie(). Is there a way that I need to discharge it completely?

    What should I do to use reuse a depth?

    Use removeMovieClip() to remove an instance of movieclip and all its properties and methods. unloadMovie() deletes the instance but not its properties and methods (including its depth).

  • Have a specific return on the main timline movieclip finished image

    Hello!

    IM doin a project on the main timeline is only mounts. on the first fram ive coded for a button that directs the user to the next section. frame 2 there is an empty movieclip that is suppused to load random movieclips. the problem is when the movieclip it ends a few loops and doesent load a random.

    I have an eventlistener when the movieclip ends and then heads back to the chassis tuned for. but its framework of djemel go one so the user must press the first button again, or he comes in loop the

    I tried googleing the problem and I spent hours hours at least n change the code on n. I can also say that starting iam in actionscript.

    Here is my code:

    maintimline part 1

    Stop()

    addEventListener ("finished", child);

    function Child(e:Event):void

    {

    gotoAndPlay (e.target.frameVar);

    }

    var movieArray:Array = new Array();


    movieArray = ['bananlrdator', 'hundlrkatt', 'fisklrhand'];
    If ((movieArray [Math.floor (Math.random () * 3)]) == 'bananlrdator') {}

    myMovieClip = new bananlrdator();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'hundlrkatt') {}

    myMovieClip = new hundlrkatt();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'fisklrhand') {}

    myMovieClip = new fisklrhand();

    } else {}
    myMovieClip = new fisklrhand();

    }

    var myMovieClip:MovieClip;
    spelastart.addEventListener (MouseEvent.CLICK, scen2);
    function scen2(event:MouseEvent):void {}
    gotoAndPlay (2);
    Stop()

    emptyMC_mc.addChild ("myMovieClip");

    }

    This is my code in the movieclip endframe:

    var frameVar:int = 2;

    dispatchEvent (new Event ("finished", true));

    MovieClip (parent) .gotoAndPlay (2);

    Thanks in advance!

    Here's a working version of the code.  I changed it slightly to add the event listener 'finished' for the clips.  Everything at the bottom is a link to a sample file that corresponds to the code.

    Stop();

    spelastart.addEventListener (MouseEvent.CLICK, scen2);

    function scen2(event:MouseEvent):void {}
    Child();  to start things
    }

    var myMovieClip: *;

    var movieArray:Array is ['bananlrdator', 'hundlrkatt', 'fisklrhand'];.

    Shuffle (movieArray); using a function of brewing

    var indexCounter:uint = 0;

    function Child(e:Event=null):void / / null value allows to call the function without event argument
    {
    If (myMovieClip! = null) removeChild (myMovieClip); remove the current if there is a

    var ClassRef: Class = Class (getDefinitionByName (movieArray [indexCounter]));
    myMovieClip = new ClassRef();
    If (! myMovieClip.hasEventListener ("finished")) {/ / add this condition}
    myMovieClip.addEventListener ("finished", child);
    }
    addChild (myMovieClip);
    indexCounter += 1;
    if(indexCounter == movieArray.Length) indexCounter = 0; Reset the counter when all played.
    }

    function shuffle(a:Array) {}
    var p:int;
    var t: *;
    var ivar:int;

    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
    p = Math.Floor ((Ivar+1) * Math.Random ());
    t = a [ivar];
    a [ivar] = a [p];
    a [p] = t;
    }
    }

    At the last frame of each movieclip inside, I have...

    Stop();

    dispatchEvent (new Event ("finished", true));

    Here is a link to a sample file that shows it works.

    http://www.nedwebs.com/Flash/AS3_cycle_random_clips.fla

  • unload the movieclip to display rollover buttons...

    Hello :)

    I have a question for you >

    Here's the implementation.

    I have a scene where there are 10 names of artist. Each artist name is a button with a rollover image. The first name of the artist

    has a command uploadMovie in the timeline panel to show an image immediately when the user opens the page.

    _root.attachMovie ("anne_01", "screen", 1);
    _root. Screen._x = 417,9;
    _root. Screen._y = 135,7;

    My question is > how to unload the movieclip when the user scrolls on the nine remaining buttons?

    I know it's a command to unload, but I don't know what the code should be or where I should put it.

    I tried to put a command to unload the other buttons, but I had no luck ~

    Any ideas?

    Thank you in advance!

    Virginia

    to remove this joint use of movieclip:

    _root. Screen.removeMovieClip ();

    (or you could just attach an another movieclip depth 1 to _root)

  • Field Variable problem

    Hello

    Overview: I'm having a confusing time to know what is happening with the scope of a project I'm trying. I mocked a version of what I am looking for and have attached all of the code (as follows). I want to access/modify a var that resides on the timeline of a movieclip.

    Problem: a movieclip (called test) lies in the first frame of the main timeline. To the inside of the test on it is the first image it says a var called test. The main scenario I ask what is the value of the tests , and it returns the value undefined.

    Attempt to resolve: I programmed in Java, and it has what they call accessors and mutators methods. I tried to create accessor/mutator functions in the movieclip, but this does not change the error message. I also thought it might be a problem with the worm AS I use. I have MX 2004 (v7.0) and I checked the livedocs to look on to see if I was on the right track. I can say that I am.

    Thank you for the help,

    Here is the code:

    you encounter a timing problem. the code on the first frame of your main timeline runs before the code in the first frame of movieclips attached to the first frame of the main timeline.

    so, if you want to access the variables in the first frame of the movieclip you must wait until these variables are set by expect an advance timeline or launch a loop that checks to see if the variables are defined.

  • Put a layer on the Web - design Tile map

    I want to make sure a layer will be above the card when its drawn.

    I want a layer on it, cause im making a menu for the game, but the game is above the layer.


    var tiles: Object = new Object ({width: 52, size: 26}); The size of the tile "tired." Tiles can be of different sizes, to give the "3-d".
    var offset: Object = new Object ({x: 130, y:100});}) This object allows to center the "hero" of the scene.
    hero of the var: Object = new Object ({x: 1, y:5});}) The starting position of the "hero".
    var canvas: Object = new Object ({mc:_root.createEmptyMovieClip ("canvas", _root.getNextHighestDepth ())}); Contains the information of clip and the map of the main movie.

    Canvas.map = new Array (/ / dictates the topography of the environment)
    The reason why I decided to use 200 for walls and 100 for ground must leave
    Open the option add more tiles, such as 86 for another type of tile that is
    within walking distance. Given that the collision detection code checks if the slab is
    less than 200 then (less is within walking distance, 200 or above is not), there is no need to change
    the tiles again toenable code, simply their name a number between 0 and 200.
    new Array (200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,193,196,196,196,196,189,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,187,182,182,179,190,100,200),
    new Array (200,100,100,199,199,199,199,199,199,199,199,199,199,186,183,183,180,190,100,200),
    new Array (201,199,199,199,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,185,181,181,178,190,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,192,195,195,195,195,188,100,200),
    new Array (200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
    new Array (200,100,100,100,100,100,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
    new Array (200,200,200,200,200,200,200)
    );

    _root. OnLoad = function (): Void
    {
    InitMap (Canvas.Map); Draw the card
    initplayer(); Attract the player

    return;

    };

    _root.onEnterFrame = function (): Void
    {
    Input(); The keyboard move handle

    return;

    };

    input function (): Void / / modifies the object of 'Hero', manages the collision detection ('Hero' and the wall)
    {
    No matter what tile under 200 and is within walking distance, all the foregoing is not.
    No need to change this code manages more tiles, just name the tiles a number.
    (not the best way to do this but simple, quick and easy to do)
    If (Key.isDown (Key.Left) & & canvas.map [hero.y - 1] [hero.x] < 200) hero.y -;
    another if (Key.isDown (Key.RIGHT) & & canvas.map [hero.y + 1] [hero.x] < 200) hero.y ++;
    another if (Key.isDown (Key.UP) & & canvas.map [hero.y] [hero.x - 1] < 200) hero.x -;
    another if (Key.isDown (Key.DOWN) & & canvas.map [hero.y] [hero.x + 1] < 200) hero.x ++;

    Move();

    return;

    };

    function move (): Void / / move the bottom and the hero
    {
    These three lines manage exchanging the depths of the tile to give the "3D" effect
    var d: Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
    hero.mc.swapDepths (d);
    Canvas.MC ["tile_" hero.y + '_' + hero.x "] .swapDepths (d - 1);

    Move the hero in the opposite direction, as the environment moves
    Hero.MC._x = (tiles.width / 2) * (hero.y - hero.x) + offset.x;
    Hero.MC._y = (tiles.height / 2) * (hero.y + hero.x) + offset.y;

    Move the environment
    Canvas.MC._x = (tiles.width / 2) * (- hero.y - hero.x) + offset.x;
    Canvas.MC._y = (tiles.height / 2) * (- hero.y + - hero.x) + offset.y;

    return;

    };

    function initplayer (): Void / / Self-expalanatory
    {
    var d: Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;

    Hero.MC = canvas.mc.attachMovie ("hero", "hero_mc", d + 1, {_x:hero.x * tiles.width, _y:hero.y * tiles.height});

    Move();

    return;

    };

    function initmap(map:Array):Void / / map rendering
    {
    var map_height:Number = map.length; Determine the height of the map
    var map_width:Number = card [0] .length; Determine the width of the map

    for (var y = 0; y < map_height; y ++)
    {
    for (var x = 0; x < map_width; x ++)
    {
    MovieClip depth is all that when you make an isometric game
    var depth: Number = (y * tiles.height) + (x * tiles.width) + y;

    Attach the tile to the "Web".
    var tile: MovieClip = canvas.mc.attachMovie ("tile" + map [y] [x], "tile_" + y + "_" + x, depth);

    Tile._x = (tiles.width / 2) * (y - x) + offset.x;
    Tile._y = (tiles.height / 2) * (y + x) + offset.y;

    };

    };

    return;

    };

    When your fla is published (or tested), there is no layers.  all displayobjects receive depths based on the code used to assign depths and code of the compiler which attributes from the depths to the objects that put you on the stage in the authoring environment.

    all objects placed on the stage in the authoring environment are placed at depths of negative from about of-16, 380.   That's why your menu (which is probably added to a layer in the authoring environment is below the movieclip you place to nextHighestDepth() (which adds to no less than zero depth))

    to change a movieclip depth use the method swapDepths() of movieclips.

  • Component of the window of loading with button!

    Hello! I found two tutorials that contain two pieces of what I'm looking for, but I can't seem to understand and get exactly what I want. Here's the first:
    leader = 00004289.html & http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveD ocs_Parts

    In the first, the general idea is what I'm looking for. Except that I want to load a movieclip and not an image. My problem in this case is the button component that is used. I have no idea how the skin or customize the button, and I can't find a good tutorial to help me so I thought that perhaps it would be easier to just change the actionscript for this code. I want to be able to create my own key (instance) and use so that when people release this button, the clip is displayed!

    Now in this second tutorial I found:
    http://www.getw3help.com/2008/07/window-component.html

    Its pretty much exactly what I want and it loads a movieclip. Problem is when I add the code of a button, it does not work!

    Can someone help me? I hope I'm clear in my explanation!

    Thank you!

    I rarely use components, so I couldn't tell without research on this one, but a quick look at the help documentation says that he has nothing to control the content.  If your content is attached to the window of viewing area, you may be able to realign this content compared to the registration of trademarks.  The record is probably not in the upper left corner of the content.

  • Multiple instances of component loader

    Hi everyone, I'm having some problems with the loading component... I am trying to create multiple instances of dynamic loader, but only the last instance shows. I can not understand how to solve this... I already tried to use duplicateMovieClip and he also didin't work.
    This is the code I use, thanks in advance!


    Thank you to all the world, I found the problem.

    old code:
    createClassObject (mx.controls.Loader, "tempLoader" + i, 1, {contentPath: images [i], scaleContent: true, width: 80 height: 60, _x: ((Stage.width-10)-80), FLF: (I * 70)});

    new code:
    createClassObject (mx.controls.Loader, "tempLoader" + I, I, {contentPath: images [i], scaleContent: true, width: 80 height: 60, _x: ((Stage.width-10)-80), FLF: (I * 70)});

    It was o depth problem

  • Problems with depth

    I'm trying to create a palyer mp3, who are responsible for the songs via an XML file, but I'm having problems creating movieclips and textfields when running. If I trace the depths I can is that they are all created in depth 0.

    Create the status text
    This.createTextField("hello_txt",0,10,10,100,20) ("musicStatus_txt", this.getNextHighestDepth (), 185, 41, 10, 10);
    Create the text of the name of the song
    this.createEmptyMovieClip ("songContainer", this.getNextHighestDepth ());

    Make sure that you play the film with a Flash 7 Player or higher according to the
    getNextHighestDepth is not supported until this version of the player.

    This code can be used for the study of the depths of movieclips dynamically generated
    and objects

    for (var I in this)
    {
    If (typeof (this ) == "movieclip") {}
    trace ("video clip" "+ this
    ._name +"' is in depth)
    "(+ this. getDepth()) ;
    }
    If (typeof (this
    ) ==' object ' ') {}
    trace (this ._name + "" ' in depth ' + this. getDepth() ");
    }
    }

    --
    LON Hosford
    www.lonhosford.com
    Examples of Flash, Actionscript, and Flash Media Server files:
    http://flashexamples.hosfordusa.com
    Number of happy bits exempts your way!
    "strife.dk" wrote in message
    News:e5rq60$JFP$1@forums. Macromedia.com...
    I'm trying to create a mp3 palyer who are responsible for the songs via an XML file, but I'm
    problems creating movieclips and textfields when running. If I trace
    the
    depths, I can be that they are all created in depth 0.

    Create the status text
    This.createTextField("hello_txt",0,10,10,100,20) ("musicStatus_txt", this.getNextHighestDepth (), 185,)
    41,
    (10, 10);
    Create the text of the name of the song
    this.createEmptyMovieClip ("songContainer", this.getNextHighestDepth ());

  • Satellite Pro P100-327 screen color depth/quality problem

    Hi guys, my first post! Had my Tosh for 3 years now. I now have a problem with the display. It seems that the color depth is really down or something... as I stumble on the 8-bit color depth. Everything seems strongly Posterization in the graphical sense.

    I uninstalled the video drivers and reinstalled a new, former, a version of toshiba, a version of the nvidia driver and all have no effect on the problem. No joy!

    I went through and checked all the settings of resolution and color depth, and trawled through the many pages of settings nvidia and played with all the reasonable parameters to find the problem. No change. All reset to how I found it.

    I've been reading through the forums and not really found something specific. If I missed it, then I would a link here slapped on my face to show how incompetent I am! ;)

    I will however try to disconnect the battery and the power for an hour and turn it on again later as this seems to be the standard solution or must try for everything. What do this exactly? Reset of the BIOS/CMOS etc?

    Thanks in advance!

    You have the same problem if you connect the external monitor to your laptop?
    Have you tried to test already?

  • Problems with the Speedgrade color depth

    Hello everyone!

    As said in the title I have problems with the number of colors in Adobe Speedgrade.

    I would like to color - correct images my drone DJI using LUTs and, of course, build-in Speedgrade tools.

    Unfortunately, the use of the LUTs makes video appearance as there are not enough color-depth because you can see the bands in gradients (especially in the sky).

    I hope you can see the problem in the following screenshot.

    Scratches appear in Speedgrade preview, as well as in video rendering.

    So what can I do to avoid this scratches?

    Thank you in advance!

    Greetings

    Raphael

    Screenshot.jpg

    I have not bought any of the first LUT game I bought... 4 years back, now. Wow, how time flies...

    Why?

    Because I had problems with excerpts from tapes and rarely found one I liked "such what ', so I got to work the clip after you apply the LUT as much as if I started from scratch. So why pay for the dang thing?

    I found it a good common sense many people in publishing & work of colorist, there is a certain tech LUT can really be able to use, but those who are mainly for the spendy 'pro' movie, Reds, Arris and other cameras. For a film DSLR & drone, making its own tends to work MUCH better.

    And it is easy within the Sg.

    Take this clip... watch your litters, first. Move the slider Temp for the position that balances the red & blue tops, cursor Magenta to balance the red & green tops... then left offset slider far a channel can be a little below '0', 0 to sentence above and one a little higher... then with keyboard and mouse or a simple trackball, move the color slider controls rather than wheels "unlock" the trio Offset, match the bottom just above 0, reset the summits if necessary and then return to wheels.

    Move the controls in Gamma Luma needed to feel 'brightness', and you have a a neutralized clip. Shouldn't take more than 20 seconds to do the above, if that.

    Now using color wheels, started working for a 'vision' and of course use secondary as necessary to adjust certain colors/colours/brightness and maybe go to controls Shadow & Highlight to get finer control of two Luma and chroma on the edges... in general, it is best to bring the ends of the scale to neutral even with a look hot or cold for most of the signal.

    Get something you like and can be used for a large number of your clips, save it as an eye. You can just quickly apply to any other work.

    You want to use in PrPro? Easy... with the right button on the Look to the Sg, choose 'Export', and you get to the options... except that say a Cube of however many points you want to and tell him where to save it. I found that with my GH3, sometimes with work in the open air with a sky bright-ish with the Sun around but just outside of an edge banding is quite possible... and 'hand-kitchen' these clips or using a Cube 64 - point is necessary.

    Neil

  • Problems with mouse over / mouse on movieclip animations

    Hi, I'm a very inexperienced student working on Flash Professional CC for a school project. I'm supposed to be what actually feeling as interactive as possible, so I'll try to adapt to entertainment as much as possible. However, I sometimes take off trying to animate mouseover / mouse interactions using movieclips, they continue buggy. Could someone work for me what is the problem?

    Is it possible to attach my file flash on this discussion, so that users can see what I'm talking about?

    use:

    Stop()

    myInterviewButton.addEventListener (MouseEvent.MOUSE_OVER, MouseOverQuiz);

    function MouseOverQuiz(event:MouseEvent):void

    {

    interviewoveranim.gotoAndPlay (1)

    }

    myInterviewButton.addEventListener (MouseEvent.MOUSE_OUT, MouseLeavesQuiz);

    function MouseLeavesQuiz(event:MouseEvent):void

    {

    interviewoveranim.gotoAndPlay (31);

    }

  • Transform problems of effect when used with the depth of the 3D layer

    Here is my set upwards.

    I have PreComp with graphics any illustrator with active continuously rasterized layer.

    This graph has a reflection in it. I was thinking by applying the effect processing, offset setting to-100 and by setting the anchor point.

    Regarding the graphics move from left to right (X, Y) there is no problem and anchor point is in its place.

    As soon as I do the 3D layer and start changing the values of depth thinking begins to jump around.

    My guess is - it happens that point because of anchorage is a constant value and because the thinking is based on its value it does not follow the base of the graphics. Purhasps it is a snippet of code to be used to bind the value of the anchor Point to the Zoom value? Adjustment of the values of anchor with keyframes turned out to be too difficult.

    In other words, I like to keep thinking at a constant distance from the base of the graphic part and once the relocation of graphics on or in the reflection does not follow.

    I précomposé this graphics and it imported into the new Compostion and applied movement XY and Z using the camera and Null layers. It was the same effect and reflection did not stick to the base of the graphic.

    I need to keep the collapse processing enabled on all consecutive Comps/PreComps to ensure that the vector art makes to high quality.

    What would be a good way to make a reflection of a 3D/preComp layer in the model where the movement controlled with layers of continuously active camera and Null, with the Transformations of rasterized/reduce?

    I'm with Mylenium on it. Your concept is inappropriate and you do it is much too difficult. Just put the anchor at the bottom of your reflection, then resize it to 100 in y [100, -100] can do the two 3D layers and implemented a matte degraded on the reflection layer.

Maybe you are looking for

  • Mail is not research (OSX 10.11.4)

    Hello guys, this is pretty boring, but the search function on the Mail does not work. Some people don't believe this could happen, but it is true. I recorded a video to show you how amazing this situation is: https://www.dropbox.com/s/q8dn0qc24irwlbp

  • store pictures of Originals iCloud

    How can I delete the photos on my iPad or iPhone without him deleting the originals on my iCloud?

  • Pavilion 27bw monitor power button is unresponsive

    This has happened once before and I forgot how I fixed. No message power button lock or anything. I tried to unplug for a few minutes, she held down for a minute, nothing. I get static when I touch it sometimes but managed to solve this last time. Su

  • Laptops DV 6 series drivers Windows 7?

    Just did the upgrade to W7 and it went well, but the only driver W7 posted for my dv6915nr is for WiFi.  My Ethernet hardware does not work - must clear an update of the driver.  What are the drivers for this machine which is only one year to come? 

  • Connection Officejet 6100 to Wifi with the Mavericks

    I have Mac OS 10.9.2 (Mavericks) and have installed all available updates.  I just bought a HP Officejet 6100.  The configuration software supplied with the printer does not work on the Mavericks.  I can use the printer via USB, but have no idea how