Copy link to clipboard
Copied
I am using Adobe Animate CC, and exporting a modified flash file to html5 canvas. The problem I have is some of the frames are only being partially exported. Certain assets are not being converted to javascript objects (although they are clearly on the timeline).
As an example some of my dynamic text is exported as this.a1 (having the instance name a1 in the file), which is what I need. But then a frame further on in the file is only partially exported, the same type of dynamic text with the instance name b1 is not being exported and is not found in the html5 js doc as this.b1.
Any ideas as to why some of my symbols are exported and some are not?
More info if needed:
I had a file made entirely in flash some years ago. I cut and pasted the frames into a html canvas 5 document, ensuring all appropriate symbols were included. The html5 document exports well (apart from the above mentioned assets, which appear on the time line but not in html5 js file).
I understand how to code in Javascript, and realise that some of the objects converted from flash are missing from the js file. Is there a file size limit that could be culling frames in the latter part of the file?
Note the html5 object runs fine, and I have coded half of it in Javascript, as I got towards the end of the file I realised items were missing.
Hi,
Can you please try splitting the objects into different layers and see if that helps? CreateJS doesn't re-instantiate objects if they are on the same layer and in contiguous frame spans for output optimization in some cases.
Thanks!
Mohan
Copy link to clipboard
Copied
try copying and pasting needed assets.
Copy link to clipboard
Copied
I tried the copy paste method. In my case it did not work. I found that if I pasted them into a new layer, they did show up. But as I mentioned in another post that seems like an awful amount of work to paste all my symbols into new layers.
Copy link to clipboard
Copied
Hi,
Can you please try splitting the objects into different layers and see if that helps? CreateJS doesn't re-instantiate objects if they are on the same layer and in contiguous frame spans for output optimization in some cases.
Thanks!
Mohan
Copy link to clipboard
Copied
Hi,
Putting the instance on a fresh layer did cause the object to be exported to the js file. So this could solve my problem. However this flash file is rather large, and I don't like the idea of having to create so many layers. Knowing that the instance is recognised on another layer, do you have any other thoughts of a way to make them visible.
Just so you have a little more info, let's say I have in one Layer with four text a1, b1, c1, d1 each of these are in their own keyframe, but on the same layer.
Currently only a1 is being exported. So I cut and paste b1, c1, d1 into a single layer. Then only b1 is exported not c1, and d1. So as it stands I have to create 4 layers, one for each text. This seems like an awful waste of time.
Just wondering if there is some setting which will force export even unused symbols so it might pick up these one.
Copy link to clipboard
Copied
Hi,
I also found that if I use the "Duplicate" feature, the duplicated item shows up in the JavaScript, but not the original. Is there a way to make an existing symbol, or shape a duplicate without actually creating a duplicate. For if you have to create a duplicated you need to duplicate then delete one copy.
Copy link to clipboard
Copied
Hi,
This should not happen if you simply have a dynamic text object with a different instance name even they are on same layer. Can you please share a simplified fla for us to take a look? Thanks!
Copy link to clipboard
Copied
Could you message me your email address so I can email the file to you as the content that I am working on is private and confidential, and can not be shared with every one. Thanks.
Copy link to clipboard
Copied
Hi - Sent you a message with the required details. Please check out your forum's message box. Thanks!
Copy link to clipboard
Copied
Hi - just wondering if you have been able to find the problem with the file I sent?
Copy link to clipboard
Copied
Hi,
Thanks for sharing the file. We looked into it and the issue is due to the same reason explained in my earlier reply i.e., CreateJS lifetime management doesn't re-instantiate the object instead it uses the one already instantiated if they belongs to same layer. We are checking with CreateJS team on this. Thanks!
Copy link to clipboard
Copied
In regard to the issue of Animate not initializing instances that are already initiaised, there is still a problem. The instances that follows should still be accessable in code, they are named in the flash file, and often have different properties to the parent. This is a big big problem. As I can't manipulate the instances that follow. The need to be named, even as this.instance, this.instance_1 etc, but they are not.
In the file I have here frames one's text boxes are manipulated completely differently to frame two etc. They must be separate instances or they can not be manipulated in code.
I also have an issue here of some objects that don't show at all even though they are completely different colours, and different properties.
My issue is this in code, I have a1 in one frame and b1 in another frame. In code there is:
this.a1 = new cjs.Text("", "40px 'Century Gothic'");
but this.b1 another instance of cjs.Text does not exist.
My problem is this, a1 is manipulated differently to b1. At the same time a1 may have text "4", where as b1 may have the text "6".
But the problem with the code is we only have this.a1 every time I modify this.a1 we loose the state it was previously set to. Say it was 4, when we move to the next frame, it becomes 6, we loose the state 4.
Flash was stateful to a degree, it retained the states of a1, and b1 as seperate instances.
I am going to try to use the single instance, but it seems like a lot of messing around.
Copy link to clipboard
Copied
I had a play around with the file, and it was the case that the instance this.a1 was being used for other named instances. I could use a1 in place of b1, and it would do what it was supposed to. i.e. a1 would show up in the place of b1. This was ok, it just made coding the interface a little harder.
I would prefer that Animate had individual instances of named assets, so that b1 was a separate instance to a1, but based on the same object. But any way at least I have it working now.