How to make a .swf to behave as an image file?

Hello. I am currently working on an application that allow the user to interact in an object. When the object is clicked, it will move you in response. Here is my sample code

private var Ball:Image=new Image();

public function myApp()
        {Ball.addEventListener(MouseEvent.CLICK,flyBall);
                 Ball.setImage("ball.png");
                 Ball.setPosition(0,0);
                 addChild(Ball);
        }

private function flyBall(e:MouseEvent):void
        {
                  Ball.removeEventListener(MouseEvent.CLICK,flyBall);
                   Ball.addEventListener(Event.ENTER_FRAME,moveBall);
        }

        private function moveBall(e:Event):void
        {
            Ball.x+=1;
        }

The code works for the files from an image. However, I wanted to replace ball.png with a .swf file and so far I've tried the charger, but charger does not allow me to define its position. Is there a way to load a .swf inside an object image file? Or y at - it another way to load .swf that allow me to move as in the code?

Hello Torres,

Can clarify you your statement "charger doesn't let me define its position." As the Loader class is inherited from the parent DisplayObject, you can set its position through x and y values.

http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/display/loader.html

Forward to your response.

Tags: BlackBerry Developers

Similar Questions

  • How can I disable the function that copies the image files when you drag the mouse?

    When I go to my image files and I hold down the Ctlr key and highlight a series of photos to remove, I sometimes inadvertently made my mouse to other photos and cause a series of copies to reach. He is a frequent source of frustration. How can disable this feature of "copy"?

    When I go to my image files and I hold down the Ctlr key and highlight a series of photos to remove, I sometimes inadvertently made my mouse to other photos and cause a series of copies to reach. He is a frequent source of frustration. How can disable this feature of "copy"?

    =============================================
    If you are comfortable editing the registry, the
    more info can be your solution.

    I do not have an article with the specific steps
    Windows 7, but the following link should provide
    enough information to help you improve the issue.

    (FWIW... it's always a good idea to create a system)
    Restore point before editing the registry)

    Trouble fixing: stop Windows copy
    Files accidentally when Ctrl-click selecting
    http://www.howtogeek.com/HOWTO/Windows-Vista/fixing-annoyances-stop-Windows-from-copying-files-accidentally-when-CTRL-click-selecting/

    Changing the default value in the following keys
    from 4 to 20 is supposed to improve the problem.

    HKEY_CURRENT_USER\Control Panel\Desktop\DragHeight
    HKEY_CURRENT_USER\Control Panel\Desktop\DragWidth

  • How to make the .swf movie Center on the web page?

    Hello

    I have a question, I created my site and I have the settings of publication to the file swf and html-files and when I open the HTML for my site is on the left. But I want my website to be at the center of the screen, what can someone tell my how to the center of the flash file?

    Thank you.

    Centering is done in html/CSS code to the page.  See if the li k below helps, otherwise just Google 'Flashing Centre in page' and you should find something to help.

    http://www.YouTube.com/watch?v=koRzpSizoFo

  • How to make the address bar behaving like search bar? I mean SMART search, as it implemented in Chrome (very comfortable for users).

    For example when I type a word in the search bar, it begins to give search engine suggestions, so don't HAVE TO TYPE THE ENTIRE SEARCH PHRASE!
    The same behavior is in the address bar of Google Chrome. So in Chrome address bar and search bar are combined into one that is very comfortable for users.
    In Firefox, you have here two different bars, which makes no sense. I used Chrome before and usually by type of force of habit in the address bar to search for something and have to type the whole expression there to begin the search. It is very stupid and using the address bar to the fruitless search.
    Screenshots attached.
    So, do we not have any add-on or option to merge or combine the bars or to implement smart search in the address bar?
    Thank you.

    You can look at extensions such as these:

  • How to make the swf not resizing of the browser window?

    Hello

    Im trying to run my swf by going directly to my serer for example (www.example.com/mySWF.swf), later I fit using HTML or PHP, but Im wondering why he maintains have resized to the size of the window, I want to keep it the size of the swf file. In the publishing settings, I updated the game film dimension, and I put in scale n scale in the publication settings HTML tab, I'm doing something wrong or can you not stay its original size without emedding in html?

    Thank you

    Open your fla in flash.  publish a html and swf.  Open the html code in your browser.  any problem?

  • How to make the mouths to move on the image sets?

    Hey guys, I was just wondering how you'd the mouth of an image look as they move? Like this video - https://www.facebook.com/LovehelloU/videos/1488253307906789/

    Thank you!

    approach:

    make a good selection in photoshop

    on the mouth.

    Use the layer by cutting

    Save the file as psd.

    Import it in the form of layers in AfterEffects and start the animation.

  • How to make the false colors on gray-scale image? Are there examples of the imaqSetWindowPalette function?

    Hi ~ I'm using LabWindows/CVI & OR vision. I want to apply false colors on my image of gray, but I don't know how to use the imaqSetWindowPalette() function. Are there examples? or a better idea? Thank you very much ~ ~ ~

    It depends on what you're trying to achieve:

    1 imaqSetWindowPalette() change the palette to display only. This affects the display, but still, the underlying image is grayscale.

    a simple use is:

    {

    const int window = 1;

    Image * image;

    / * retrieve and store your image * /.

    ...

    / * change the palette * /.

    imaqSetWindowPalette (window, IMAQ_PALETTE_BINARY, NULL, 0);

    / * display the image * /.

    imaqDisplayImage (image, window, TRUE);

    }

    as specified in the documentation, the third and the fourth parameter of imaqSetWindowPalette() are used only when the pallet type is set to IMAQ_PALETTE_USER, in this case, you specify the colors you want to use for the display.

    {

    / * declare and fill you the palette * /.

    RGBValue palette [256];

    / * fill your palette here * /.

    palette [0]. R = 0;

    palette [0]. G = 0;

    palette [0]. B = 0;

    .alpha palette [0] = 0;

    palette [1]. R = 255;

    palette [1]. G = 0;

    palette [1]. B = 0;

    palette [1] .alpha = 0;

    / * etc * /.

    / * Use the palette * /.

    imaqSetWindowPalette (range of the window, IMAQ_PALETTE_USER, sizeof (palette) / sizeof (* palette));

    }

    fixed palette, you can also set you palette with an initializer:

    RGBValue palette [256] = {{0,0,0,0}, {255,0,0,0}, {0,255,0,0}}; / * you write 256 color values you want your palette consists of * /.

    2. If you want the palette to be final during the recording of the image with the new applied palette, you can specify the palette in the call to imaqWriteFile().

    3. or you can convert your image to RGB (imaqCast()) then... you're on your own: for some unknown reason, the lookup table in a call to imaqCast() converting grayscale 8 bit RGB is not documented as being used. error in documentation? removal of the deliberate feature? Finally, you can test what happens if you specify one.

  • How to make a USB stick into a bootable image

    I did a complete reinstall of windows xp to sp3

    I'm doing a usb key that will start a linux system

    usb in question has been used before on a windows vista and windows 7 and starting machine

    Why can I not make an usb device bootable on windows xp machine work?

    The problem is probably not the key USB but the BIOS that is loaded onto your computer motherboard.  When Windows XP came out, USB was relatively new and had not reached the sophistication to address such opportunities that boot from USB.  Things have changed a bit since then and newer machines have no problem using USB as a bootable media.  Your only chance would probably be to see if there is an updated BIOS available for your machine.  You can check your manufacturer's Web site or the Web site of the manufacturer of your motherboard to see if one is available.  Do your homework and proceed with caution because an installation or an update of the BIOS failed can easily turn your computer into a boat anchor.

    You can consider using a Linux boot CD instead of the USB key for this computer.

    HTH,
    JW

  • How to make Photo synchronized on archos in a single file under the given tag name.

    Original title: Photo sync on archos

    As noted above, the photos are in the media library severed in the relevant dates, they took. That's how they transferred from photoshop. I gave the name of a tag of photos and them synced to the archos. They appeared on the archos as a file photo for each date, I want them to appear in the file of a picture under the tag name given when they have been synchronized. Can you help me please?

    Hello

    As you have used third party software to mark the photo files and also no problem during the synchronization of the Archos to the Windows XP computer, I suggest that get you in touch with support archos for furher to information about the preference of the photo file change during synchronization.

    http://www.ARCHOS.com/support/support_tech/index.html?country=us&lang=en

  • How to make photos of 'player' windows media into another file so I can email them or post them on the Yearbook, etc. ?

    I downloaded photos on the Windows media player and I can't figure out how to get out!  I want to send them to friends and post a few on facebook and they don't work, I have only options to burn or do I have to create playlists, burn it to a CD and then put them on the computer in this way?

    Hello

    I suggest you try the steps from the following link to check where the windows media player's access to photos.

    Find items in the Windows Media Player library (to find where a file is stored on your computer)
    http://Windows.Microsoft.com/en-us/Windows7/find-items-in-the-Windows-Media-Player-library

  • How to make a bound place update if the linked file is updated?

    I build pages of Wedding Album using PS CC in 2015. I am editing the individual files resulting in a layered tif file. If I then place the layers of the tif files in a new PS document I use linked place because it saves hard drive space and I thought that it would update when I change the master made.

    I noticed that if I change the original tif it looks not to the composite master gets this update.

    It seems to work very well to insert an edited LR .nef dynamic object. If I edit the document and update the thumbnail of LR by hitting Ctrl (Cmd) S.

    I can't get my .tif inserted files to update. I can't find anything on Lynda.com on this subject.  You Tube is too miss you.

    Thank you for taking the time to make that video, Mark. From what I see, you're doing everything right and Ps does not work as it should.

    One thing I noticed though, is that there should be an option to embed the connected in the Panel properties of the PSD master... I have a feeling that the lack of this option is connected to why the image is not updated. Unfortunately, I do not know why the option is not there!

    Can you try to save your tif as a psd instead, then re-edit the link to this new file and gone through the motions?

  • How to make a white rectangle bordered in shape image disappears from the design view in Dreamweaver CS6?

    Hello.  In design mode and on the right side of the window, is a box with a white line about 250px wide and 25px high.  As I clidk on the box, the text inside a div that is located on the left side of the window becomes hignlighted.  I don't see the box in one of the divs nor in the style sheet.  I tried to remove the div, then clicked on the inside of the box again.  But this time the text inside another div became also pointed out.  The text in the divs can be deleted by clicking the mouse on the box and pressing the delete key. When I saved the file to examine it in the browser, the box is not visible.  I would like to know what type of box is it? How can I get rid of him?  Or is it beneficial in some way?  Thank you.

    Hello.  Thanks for answering my question.  When I open the file the next day in Dreamweaver once again, the rectangular box was longer there.  I could not then apply the suggestions that were sent to me.  But since then, I have encountered another problem on the style of the side bar and style links.  And I'm going to post this as another issue.

  • How to make a single line with 6-8 images in css?

    I would like to do a header line with 6-8 icons of different sizes and use them as links.  I can't get them to line up horizontally in a container. How can I do this?

    You can do this by making the area the same size icons. that is, all the images are the same size, it's just the icons in the image control that are different sizes.

    If you don't want to do this then probably a good reason to use a table with cells of 6/8 otherwise, you will need to adjust padding/margin on each icon to align individual, doable but somewhat tedious.

  • How to make a lock or the password for a file photo

    I want to add a new photo file I can only acsses

    Hello

    Can I protect files or folders with a password?
    http://Windows.Microsoft.com/en-us/Windows-Vista/can-I-protect-files-or-folders-with-a-password

    Try FreeHideFolders which hides the file and requires a password for access 1 if someone has
    namely that there is and its location and name and then they know the password. TIP - write
    the password and keep it in several places including the House.

    FreeHideFolders - free
    http://www.cleanersoft.com/hidefolder/free_hide_folder.htm

    The other will allow you to encrypt files, folders or disks together.

    Encryption software of free disk for Windows 7/Vista/XP, Mac OS X and Linux
    http://www.TrueCrypt.org/

    FreeOTFE is a free, open source, "on-the-fly" for PC and PDA transparent disk encryption program
    http://www.FreeOTFE.org/

    You could also check the file with WinZip or other compression programs that support passwords.

    http://Techblissonline.com/password-protect-files-folders-and-compressedzip-files-in-Windows-Vista/

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How to make an html application in the config.xml file

    not able to config.xml five for my application

    Take a look at the start for a sample config.xml and guide instructions on creating your own file config.xml https://developer.blackberry.com/html5/documentation/working_with_config_xml_file_1866970_11.html

Maybe you are looking for