• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

I want to write some code that generates this outcome

Participant ,
Oct 29, 2023 Oct 29, 2023

Copy link to clipboard

Copied

ok going to try this last part again(see my other posts as we have solved getting this IN cc and i can even make  video off the tricks this  way. the script was HUGELY helpful in adapting the clothes however and cutting errors in typing.

 

how would i unload the placeholder files from the displaylist and add the art TO the displaylist

as that seems to be how this was done.

 

 

this has no code yet but since visual results seem to get the best results i created this mockup if what

i want to do.....

 

 

 

sketchdemo.png

what i am also noting is this generates this FULLY in memory and and does not make a new swf ,etc

assets are untouched by generating the preview image in the original game.

 

 

 

 

 

TOPICS
ActionScript , Code , Import and export

Views

647

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 5 Correct answers

Community Expert , Oct 31, 2023 Oct 31, 2023

do you have a question about that excerpt?

Votes

Translate

Translate
Community Expert , Oct 31, 2023 Oct 31, 2023

you can use addChild and removeChild to parent/reparent in both as3 and easeljs 

Votes

Translate

Translate
Community Expert , Nov 01, 2023 Nov 01, 2023

after using the loader, what is it you're trying to access?  something on stage, something in the library?

Votes

Translate

Translate
Community Expert , Nov 02, 2023 Nov 02, 2023

here's how to access library items in a loaded swf:

 

var ldr:Loader = new Loader(); 
var url:URLRequest = new URLRequest("loaded_fla.swf"); 
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
 
ldr.load(url, new LoaderContext(false, ApplicationDomain.currentDomain));
 
function loadCompleteF(e:Event):void{
// reference library symbol with linkage id/class = MC_LIB
var C : Class = Class(getDefinitionByName("MC_LIB"));
var obj: Object = new C();
// add to display
addChild(
...

Votes

Translate

Translate
Community Expert , Nov 02, 2023 Nov 02, 2023

i can't help you with flex.  i never used it.

Votes

Translate

Translate
Participant ,
Oct 29, 2023 Oct 29, 2023

Copy link to clipboard

Copied

the big reason for making this is more and more  of the assets of this game kept getting found, but theirs bascially two groups who have figured how to get into the files. when i ran my group for this we got people all the time oh i had this and this and this.....and while i don't want to make the whole game again due to copyright issues, it would be nice to give the people in our groups,etc the ability to at least see this art in a way thats "sane" to most people. i even had a few peoople remake simple objects like shirts and that which was more art skill than i had. this is something i dreamed of giving our fans for ages as it turns the useless pit of files into "oh i could use that for an avatar for "insert social media place of choice" etc. i have static copies of the maps but i don't think im not going to botehr doing that as youtube exists and honestly can do just as good of a job than what my stills would do. but boy do people recall the clothes and that:)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

i found a sectiion that im wondering if anyone has any experience with from teh book "actionscript 3.0 animation making things move"

 

reparenting was teh term used

"to remove an object from the displaylist use removechild but this does not destroy it! it will be in th same state it was before.....this is where im having the probkem it seems.

 

it is against the rules to post the pages?

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

do you have a question about that excerpt?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

yes

its almost waht i need but the wrong direction of what i want to do...figure since visual stuff has proven the most effective on solutions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

you want to add something to the display list?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

 

the part here that stood out to me was "you can attach another movieclip and attach it to another one" which seems to be most of my issue of the separated pieces. for refernence the book is pretty old and literally costs almost  more to ship on ebay than buying it.i tried the thing in a html5 session and ....the poor creature looked like it was

having a siezure under all the clothes in it.

 

20231031_162647[1].jpg20231031_162721[1].jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

you can use addChild and removeChild to parent/reparent in both as3 and easeljs 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

so more or less it looks like all i have to is reparent the avatar art to the placeholder art and it should pretty much do what dragging the art together in cc? the other problem is how to do i access each symbol seprately in the file(s) as when i try loading wireframe. swf and avatar.swf they pretty much show whats on the stage. I know loading a file and displaying it are two steps, im missing something here....i was trying to use the loading tutorial and also noted   using the embed command in flex, as this apparently has a option to load ONE symbol from a file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

anything in. the library can be added to the display. anything on stage that's a symbol (button, movieclip, graphic) can be removed and reattached (or not).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 31, 2023 Oct 31, 2023

Copy link to clipboard

Copied

ok so if i bring in the wireframe.swf and the avatar.swf by loader. i can't seem to use any of the as3 names IN

the files,i can unload the wireframe.swf and or avatar.swf as a unit, but i can't use the pieces inside. is theri something obvious that im missing or different process i should be using. 

 

my code off a site i can't think the name off hand

 

var myLoader:Loader = new Loader(); // create a new instance of the Loader class
var url:URLRequest = new URLRequest("BLUE_Hifflo.swf"); // in this case both SWFs are in the same folder
myLoader.load(url); // load the SWF file
addChild(myLoader); // add that instance to the display list, adding it to the Stage at 0,0

// (optional)
myLoader.x = 10; // move the loaded SWF 10 pixels to the right (from the left edge)
myLoader.y = 175; // move the loaded SWF 175 pixels down from the top
addChild (myLoader);
// (optional) load a second external SWF file
var my2ndLoader:Loader = new Loader
var url2:URLRequest = new URLRequest("wireframelibrary.swf");
my2ndLoader.load(url2);
addChild(my2ndLoader);

 

when i do this i only get whats on the stage of the avatar file. 

 

for instance front_arm_1 is very common and where i'd start as their the most commonly used one.

front_leg_1 is also very common

id be happy to see THOSE appear and then i can get the rest, ive done a lot with the stage of animate cc and not a lot of the coding and i'd like to change that.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 01, 2023 Nov 01, 2023

Copy link to clipboard

Copied

i think i found a very similar post that may be the solution to this....the priblem IS the problem im trying to solve.

https://stackoverflow.com/questions/6188770/as3-load-symbol-from-external-swf-library

going to try it later and see

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2023 Nov 01, 2023

Copy link to clipboard

Copied

after using the loader, what is it you're trying to access?  something on stage, something in the library?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 01, 2023 Nov 01, 2023

Copy link to clipboard

Copied

not sure how to exactly awnser that. once the two files are loaded the as3 names should be in the library correct? im planning to make a shell as3 file with code to grab the swfs, load them, combine their pieces and go from there. the only thing that should be on staage is the idle front trick that sits in that box where the petpet goes.

 

if so what i need to do is put the front_arm_1 from the avatar into the spot it sits on front_arm_1 in the wireframe and that would do the trick. The reason i can't use the trick with the name and as3 drag and drop is theirs already 66 avatar files to the loader will also have a varabile the dropdown "fills in" 🙂 this repeats for the rest of the lists too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2023 Nov 01, 2023

Copy link to clipboard

Copied

nothing in a swfs library is usable unless/until it has a class name/linkage id or is already on stage.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

they have a class/linkage id. copied from the other post.

https://community.adobe.com/t5/image/serverpage/image-id/615972iF49EAFFC6172162E/image-size/original...

 

https://community.adobe.com/t5/image/serverpage/image-id/615973iBE3EC1DAD757F620/image-size/original...

 

so this is what im trying to make happen. new file loader.swf

 

loader code wireframe.swf

(no addchild yet)

loader code avatar/swf

(no addchild yet)

 

next step would put IN  the wireframe.swf container the avatar pieces and not load the ones in the file itself. same exaxt process as dragging we did with dragging and dropping and using resolve library objects. this is why this is so frustrating to me, i can see LITERALLY see and do the result i need in animate cc, itself but not the as3 coding aspect. once those pieces are loaded into the containr for the wireframe, all i need to do is addchild l "IDLE" on the stage from wireframe.swf and the thing wroks. my eventual gual is to put a variable for instance in the avatar.swf spot and the clothing spots.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

here's how to access library items in a loaded swf:

 

var ldr:Loader = new Loader(); 
var url:URLRequest = new URLRequest("loaded_fla.swf"); 
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
 
ldr.load(url, new LoaderContext(false, ApplicationDomain.currentDomain));
 
function loadCompleteF(e:Event):void{
// reference library symbol with linkage id/class = MC_LIB
var C : Class = Class(getDefinitionByName("MC_LIB"));
var obj: Object = new C();
// add to display
addChild(DisplayObject(obj));
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

you have no idea how happy this makes me to see this work. i treid it with an original file literally untouched by

jpexs or animate cc and while it looks like i got some placement work (i need to get teh x and y off a completed assembled file) this is IS working and   this thing has been bugging me a long time .

i do have a quesion however

whats the difference between  a loader and the embed command,  i almost had it going this way but i had to exttract it into say front_arm_1.swf, front_leg.swf etc

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

you were embedding a swf?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

 

id send coffee or a cake but coffee would be cold, and cake...green by natural methods.

originally i tried the embed command due to this

 https://help.adobe.com/archive/en_US/flex/using/flex_4.6_help.pdf

page 1703 ages ago. note it has an option to load one symbol in a swf file . going with your awnser as this doesn't need flex or adobe air to work. now Harmon i recall?

 

 

 

Specifies the symbol in a SWF file to embed, for use with Adobe Flash Player 8 and earlier, and
for Flash Player 9 static assets. Use static assets for simple artwork or skins that do not contain
any ActionScript 3.0 code.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

LATEST

i can't help you with flex.  i never used it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines