Adding objects to an Image, and then save and load on the re-opening and closing

Hey everyone, as some of you may or do not know, I am currently taking an Android and iOS game, using Flash and AS3. In the menu, you can customize what looks like your character by adjusting with a color slider and adding machines to the character by selecting the desired speed. When you click on a certain piece of equipment to add to your character, it puts 3 pieces of gear on your character: head, right foot and left foot, respectively. I do this using the code below:

var head: Loader = new Loader();

var RightLeg:Loader = new Loader();

var LeftLeg:Loader = new Loader();

Add.addEventListener (MouseEvent.CLICK, loadPic1);

Remove.addEventListener (MouseEvent.CLICK, removePic1);

function loadPic1 (MouseEvent): void {}

var headRequest:URLRequest = new URLRequest ("TestHead.png");

Head.Load (headRequest);

Head.y = - 150;

Sliders.Dino.Head.addChild (Head);

var rightRequest:URLRequest = new URLRequest ("TestRightLeg.png");

RightLeg.load (rightRequest);

Sliders.Dino.RightLeg.addChild (RightLeg);

var leftRequest:URLRequest = new URLRequest ("TestLeftLeg.png");

LeftLeg.load (leftRequest);

Sliders.Dino.LeftLeg.addChild (LeftLeg);

}

function removePic1 (MouseEvent): void {}

Head.Unload ();

RightLeg.unload ();

LeftLeg.unload ();

}

This set works very well for test purposes. Is anyway to add the train directly to the image, save it in its current state, then when opened (or loaded into the game), it loads the image you previously saved with the machine on it?

Thanks in advance!

:

var head: Loader = new Loader();

var RightLeg:Loader = new Loader();

var LeftLeg:Loader = new Loader();

var so:SharedObject = SharedObject.getLocal ("myStuff", "/");

the way your code is setup, if you add a part of the body, you added all three parts

{if (SO. Data.Head)}

loadPic1 (null);

}

Add.addEventListener (MouseEvent.CLICK, loadPic1);

Remove.addEventListener (MouseEvent.CLICK, removePic1);

function loadPic1 (MouseEvent): void {}

var headRequest:URLRequest = new URLRequest ("TestHead.png");

Head.Load (headRequest);

Head.y = - 150;

Sliders.Dino.Head.addChild (Head);

var rightRequest:URLRequest = new URLRequest ("TestRightLeg.png");

RightLeg.load (rightRequest);

Sliders.Dino.RightLeg.addChild (RightLeg);

var leftRequest:URLRequest = new URLRequest ("TestLeftLeg.png");

LeftLeg.load (leftRequest);

Sliders.Dino.LeftLeg.addChild (LeftLeg);

so. Data .head = true;

so. Flush();

}

function removePic1 (MouseEvent): void {}

Head.Unload ();

RightLeg.unload ();

LeftLeg.unload ();

so. Data .head = false;

so. Flush();

}

Tags: Adobe Animate

Similar Questions

  • I open a powerpoint file to edit it, then save it again in the same folder. Then I close the application. Now the Explorer window will not respond.

    Original title:

    I have a folder on my desktop and added 5 PPTX files.  I open the folder so I can see all the files, double-click on one to change, and then save it again in the same folder.  Then I close the Powerpoint application.  Now the Explorer window of window (which I opened before) will not respond.  It clicks when I click it.  I can't close or access any of the files inside.  Any ideas?  My computer still respond as usual.

    64 bit OS

    Hello

    You did changes to the computer, before the show?

    Method 1:

    Step 1: Safe Mode

    Start your computer in safe mode and check the number.

    Start your computer in safe mode

    Step 2: Clean boot

    If you are not facing the problem in safe mode, and then put your computer in a clean boot and search for the question.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Note: Once you are done with the boot, follow step 7 of article to reset your computer to normal startup.

    Method 2:

    Refer to this link.

    Error: Windows Explorer has stopped working

    Note: Please skip the step that offers to perform a upgrade in Place, for now.

    Method 3:

    Change the location of the folder and check.

  • Save a copy of the emails opened on the Server POP3 format

    I have POP3 format on windows email. I want to save a copy of the emails opened on the server, so I can access it later from a distance (with my phone). How can I do this?   Thanks in advance.

    I have POP3 format on windows email. I want to save a copy of the emails opened on the server, so I can access it later from a distance (with my phone). How can I do this?   Thanks in advance.

    Open Windows mail > tools > accounts > click your account > properties > Advanced tab > under delivery, check ' leave a copy of messages on the server ' > OK for the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Save as window on the screen even after closing the program

    Original title: desktop problem
    How can I get rid of a file command such as save as that rest on my screen, if I still use when I get out the program that is on the desk

    Hello

    1 how long have you been faced with this problem?
    2 do you have you can all changes on the computer before this problem?
    3. This is come up with a particular program?

    Check if the problem persists in the clean boot state.
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

  • How to paste images and make them look like they belong

    I've been messing around with photoshop for a few weeks. I'm trying to find a way to copy and paste a person (or object) in another image and do seems like it belongs. Is not like you just copy - paste! Any help?

    image.jpeg

    Hey Kevin,

    Please check the tutorial below.

    How to merge photos with realism in tutorial Photoshop CS6 - YouTube

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • Is it possible to save PDF files, so when the user opens the file it opens a pre determined size?

    Is it possible to save PDF, so when the user opens the file it opens a pre determined size – say 100%?

    I cannot for the life of me figure it out - or is - that it is dependent on parameters end users?

    Thanks a lot for your help!

    It depends on.

    If you have the drive, then it only recognizes your user preferences.

    If you have Acrobat, you can go to file > properties > Page display > view original and set it to anything you want.

  • "Cannot save (file name) because the file is already in use or left open."

    Hello
    When I tried to save as a file, I get an error msg:
    "Cannot save (file name) because the file is already in use or left open."

    The file is unwilling to accept any Photoshop.

    Mac Pro, OSX 10.5.6
    Photoshop CS4.

    I searched the Forum but did not find anything even though I'm sure someone has already asked it.

    would love to get a solution for this.
    Thank you
    Shlomit

    If Photoshop says that the file is opened - then some external process left the file open. It has nothing to do with it being open in Photoshop, or even in the bridge. This sometimes happens when Spotlight had bugs (who came more than once and been corrected in versions of dot operating system).

    The external process could be another application or service to OS like Spotlight.

  • I would like to know the command line options that are available to mspaint. I in bulk of images, I want to open in paint and then save it in jpg format in the paint.

    Hello

    I would like to know the command line options that are available to mspaint.
    I in bulk of images, I want to open in paint and then save it in jpg format in the paint.
    I want a script batch for the above procedure. Can anyone suggest me the script to do the same.

    Thank you
    Bodin

    original title: ms paint command line options

    Neither Windows XP nor paint offers all these capabilities.

    "BinduS" wrote in the new message: * e-mail address is removed from the privacy * _xp...

    Hello

    I would like to know the command line options that are avaulable to mspaint.
    I in bulk of images, I want to open in paint and then save it in jpg format in the paint.
    I want a script batch for the above procedure. Can anyone suggest me the script to do the same.

    Thank you
    Bodin
    - http://answers.microsoft.com/message/04b8dfae-1fa5-42db-81c2-b042652ecfc8
    Meta tags: images; windows_xp

    Tuesday April 10, 2012 08:23:14 + 0000: CreateMessage BinduS

  • I need to PRINT from the internet, images and documents sources sites into one (multi-page pdf document) > > save this PDF document > > then an email to customers.

    I wonder if anyone can help with Acrobat Pro X 1 question.  We must be able to print from multiple sources in a single PDF from multiple page.

    Not create multiple documents and then combine them, but have the multi THAT generated when printing PDF page.  I don't see any instructions on that.

    Please notify.  Thank you.

    There is no way to do the way you want to do, so you will need to do the way you want.

  • Adding several images and videos to DVD Maker

    When you create a DVD Maker project, I am able to add several images, and then I added successfully a video at the end of the photos. In order to catch up with my story, I would now like to add another group of images after the video. In other words, my goal is to have three scenes, IE 1 scene will be the first batch of images. Scene2 will be video and scene 3 to be the second batch of photos
    However, I find that whenever I try to add the second batch of photos they're all in the first group of photos automatically. I find myself with a larger size Scene1 and the Scene2 video.
    How can we separate the two groups of photos, when I open the DVD maker I see only a folder with pictures and the folder with the video. Can I change the order of these two, but I can't create the third folder of photos.
    All my photos are in .jpg format and the video is in .wmv format
    Thanks for any help and advice

    When you create a DVD Maker project, I am able to add several images, and then I added successfully a video at the end of the photos. In order to catch up with my story, I would now like to add another group of images after the video. In other words, my goal is to have three scenes, IE 1 scene will be the first batch of images. Scene2 will be video and scene 3 to be the second batch of photos
    However, I find that whenever I try to add the second batch of photos they're all in the first group of photos automatically. I find myself with a larger size Scene1 and the Scene2 video.
    How can we separate the two groups of photos, when I open the DVD maker I see only a folder with pictures and the folder with the video. Can I change the order of these two, but I can't create the third folder of photos.
    All my photos are in .jpg format and the video is in .wmv format
    Thanks for any help and advice

    =====================================
    If you need three specific scenes on your DVD... your best bet
    would be to create three projects Live Movie Maker and
    Save each in the. WMV Movie format. Then, when you
    import the three. WMV video clips DVD Maker intp... each
    one is a scene (chapter).

  • Can't seem to crop, and then save the cultures - and - undo levels

    Hello.  I used Corel Photo-Paint for many years, but now jump to PSCC.  It's much better in many ways, but I'm still trying to find my way around it.  A simple thing that I can't seem to know is how to crop an image and keep it cropped.  I want to say is, I have an image open, then with the crop tool I crop to get a smaller size.  But when I try to select the (smaller) image to be dragged onto another open image, it then selects the original image everything.  I checked the box for 'remove the trimming pixels'.  The same thing happens if I save the cropped image, then open it again... the complete original image size is still there, although it only shows the cropped section.  What do I need to do differently?  It seems to me that what I get is the effect if I unchecked "Delete cropped pixels ', but I certainly have that checked.

    Also, is there a way to increase the number of undo levels?  I get only one.

    Thank you!

    Hmm wait, if I click on the part square info from the layer, it is said "vignette of the smart object", so I guess it's a dynamic object.  Don't know why it would give me the opportunity to "convert to smart object" but anyway...  Well, that solves it.

  • How can you save only the image and not the whole page?

    We decided to use a tool to manage all media (mediastore), including Adobe illustrator files. Our mediastore display objects as thumbnails (small images) and is able to export in different formats, such as jpg images.

    The problem we have is we see the page through this mediastore, not only the image that we have learned with Amnesty International. So on the tile sometimes we see nothing because the image is small on the page (we see a small black spot on an empty table) and when we send the image (export), receivers had to crop the image to get only the photo...

    Y at - it HAVE any option to save in a format, but with photo only?

    We want to keep th HAVE format, because we want to be able to edit it with AI if we need to change.

    Example of tile:Example_AI_vignette.png

    Is this too much problems to scale the work plan to adapt to the work? When you're in "Modify the work plan" double-click on a group given image automatically dimensionnera the current work plan to adapt to the work.

  • Pinned object goes behind the images and the text when scrolling

    Hey guys,.

    Im having a problem with my pinned Center the menu at the top of my page. Whenever I scroll to the top, the menu goes behind the images and the texts that are underneath. I tried to fixed by sending the menu at the top layer (arrange > send up), but nothing helped.

    How I fixed it?

    Thank you!

    Hello

    You have the Menu added to the master page? If yes then in order to resolve this problem you must add the Menu separately to all pages.

    Master page items may be brought forward on the pages. You can use cut and paste in place function paste the Menu on all pages separately.

    I hope this helps.

    Kind regards

    Sachin

  • Firefox won't download - long, press menu get, 'save image' and nothing happens. FF 34.0.1 Android 5.0.2

    As indicated in the question - Firefox for Android version 34.0.1, Android version 5.0.2 (Tablet Google Nexus 7 2013).
    This problem just showed today - I found an image on the web (not Facebook) that I wanted to save, so I did the press long habit, the menu popped up and I typed "save image". It has been highlighted and the menu has disappeared, but nothing happened, no small oval bar saying "Download began", and there is nothing in the Photos or download the app on the tablet. I have not changed any settings Firefox or Android (other than to change my PIN code), so it's a bit frustrating. Any help would be appreciated. Thank you.

    I had this problem too and finally found the problem is that my download folder was missing from my storage device. So I just manually created a /download/ folder and I was able to save pictures again.

  • Why when I try to print a web page only offers save the page and then save it not?

    Up to two web days ago pages printed fine for me, now, I only gave the option to save as a print job. XPS file - and then save it. If I cancel, it tells me that there is an unknown printer failure but testing printer just fine.

    Hi sofg777, when you're on a page you want to print try to press ctrl + P, and then select a different printer than the Microsoft XPS Document Writer, who seems to be set as the default printer in firefox at the moment.

Maybe you are looking for