AS3 - can't interact with swf file after loaded in - actionscript-3

So I have this interactive swf file that I loaded externally as a background, everything's fine, but it's just not interactive anymore, I can't click on it. I googled this problem for a really long time and couldn't find an answer, I've tried the normal Flash way, and also using this library CASAlib, still couldnt find a solution. Does anyone know how to make this work? Thanks.
Cheers,
Christine

May be the objects on the foreground are preventing the background SWF from getting any mouse actions. It's hard to say anything without seeing the code.

What is the ActionScript version of loader and loaded content? If it's 2 and 3 it will hapen as you say. If all is set to as3 it will work. Remeber about sandbox restrictions.

Related

How to Make dynamic text in Adobe After Effects like in Adobe Flash Professional

In adobe Flash proffesional we can make dynamic texts and give instance name and export in swf and we can use in Flex Builder swf loader and can dynamically get that instancce name and can change the Text. But Animations in Adobe After Effects are really cool. So is there any way i can do the same?
I mean can we make such animations in After Effects and Get the text objects from exported swf or some other thing???
I might not be able to explain my question well, But i really need some help.
Pls, I am a beginner so please go light on me iv asked before on Stack Overflow but people seem to turn me down by saying thats a stupid Question.

Is it possible to compile a FLA using mxmlc?

Let me give you a little explanation of what I'm trying to do first. I'm working on a new AS3 based architecture and I'm trying to fix some issues I had in the past with AS2. Each screen has its own FLA, and multiple screens reference certain components; a Button for example. The problem occurs when something in Button changes. Every single screen that uses Button has to be republished or else it has a chance that it won't pick up the change due to how Flash class definitions work: The first Button definition that loads at runtime is the one that everything uses. So if a screen using the old Button loads first then everything will be using the old definition and things will break. It can take an hour or more to figure out which FLA needs to be exported to fix it since there are so many and the connection between them isn't always obvious. So as you can see, this is a major time sink that needs to be fixed.
I've learned that in AS2 you can use an exclude.xml file to exclude class definitions from the SWF when the FLA is published. In this way, I figured out an architecture I can set up where there is a Shell SWF that is the only place where the Button class is defined. Shell then loads in all of the other screens that all have Button excluded so that they only pick up the Shell version. This makes sure that if anything in Button changes, the only thing that needs to be republished is the Shell and then everything else picks up the change at runtime.
This is all well and good, except that when using AS3 the exclude.xml file no longer works. Because of this I've turned to MXMLC, which can mimic the exclude.xml functionality by using the -link-report compiler option to build the exclude.xml when compiling the Shell SWF, and then pass that XML to -load-externs on every other screen to exclude everything that is built by the Shell. The only way I've found to do this is by publishing everything as a SWC from Flash and then using -include-libraries to build the SWF from the SWC along with the -load-externs to exclude everything I don't want to be there. This does the trick just fine, except that publishing as a SWC does not include anything defined on the timeline or, more specifically, the stage. A lot of design work is done on the timeline in Flash by layering on the different parts and dropping in named MovieClips all over the place that are then referenced in ActionScript, but the SWC doesn't pick up any of this information as far as I can tell.
So now we come to my question. Is there some way to compile all of the information in a FLA using MXMLC so that I can exclude everything while still being able to design out everything on the timeline/stage?
I sent an email to Grant Skinner and he basically said the only way he knew of to do excludes with AS3 was with RSL or SWC. He wasn't entirely sure which method worked since it had been a long time, so I don't have a definitive answer. I spent a while trying to figure it out using SWCs, but I didn't really get any decent results from it so I'm giving up for now.
The important part to note is that it is indeed impossible to run MXMLC to build a FLA. Or at least if it is possible, it requires very complex knowledge that not many people know.

Cause of flv corruption in AIR output?

I have a fairly complex AIR project which is compiling a lot of movieclips together using timelinemax and finally outputting the whole thing as an .flv using https://github.com/zeropointnine/leelib/tree/master/src/leelib/util/flvEncoder
I am getting corruption of the flv when certain videos are added to the timeline (all videos are embedded in movieclips in an external .swc). Here's what the corruption looks like:
It looks as if the second video I add is being somehow combined with the first and going all crazy. But the two movieclips containing these videos are never on the stage at the same time, they are added one by one when their part of the main timeline is reached, and removed afterwards. This works in all other cases, and the corruption does not happen with certain videos. I am creating all the flvs for embedding myself, in After Effects, and exporting them all with identical settings.
Can anyone shed any light on what might be causing this? Sorry not to post any code, but there is just so much, I wouldn't know where to start, and I feel like this probably isn't a code problem?
Thanks!
Well, the answer seems to be: don't load in video files from an external .swc. I moved all the movieclips containing video into my main .flv and the corruption is gone. I don't understand it, but I'll take it.

How to create a new swf on the server from a moviclip in current swf

I have a movieClip on the stage with a loaded swf playing animation and sound. I want to export the movieclip to swf. I thought I would be able to do something similar to the jpeg export?.
The main swf and the one being loaded in to be copied are on the same server.
I've searched about but I have not come across anything that outlines what needs to be done.
Any chance of a bit more in-depth explanation as to how to accomplish this?
I did have one post on here already about where someone had a similar question but the moders felt a need to delete it :(
There's a library called Ming which might suit your needs.
Also, as serverside swf generation is not trivial, do you really need it? If you need a dynamic swf, you could also create a template and create the content using flashvars in combination with a serverside language like PHP.

AS3 loaded PNG gradient transparency appearing as black

I'm experiencing a strange PNG issue in my as3 flash project. I am loading a bunch of PNG's into flash which have gradient transparencies.
In early slides, these are displaying correctly, later on in the project, the gradient transparency is showing as a solid black background.
Is this a memory issue? I've been pretty hot about memory clean up. All the images are loaded in using exactly the same scripts, and I can swap the images around with the identical results. It just seems like after a while flash stops showing the transparency right.
Images of my problem can been seen below.
Working:
http://s331209305.websitehome.co.uk/board/working.jpg
and then after the first level has played:
broken:
broken.jpg (same url as above with broken.jpg at the end (apparently as I am a new user here I can't have more than one url in a post))
I've been search Google for literally hours but can't find anyone experiencing a similar issue.
Any advice very much appreciated.
T
Ok, I know this is an old post but I too searched for a long time on google and only found this reference to the problem I was having as well.
Anyways, long story short, I fixed my issue.
The problem was I had set the alpha way to high. I set it to 5 and it did something similar to yours. I had to make sure the alpha was always clamped between 0 and 1.
Hope that was your issue as well.
I'm curious if you are loading them on top of each other, and you start seeing buildup.
it's hard to tell what exactly is going on without seeing any code, but here are some ideas
make sure that the BitmapData has
alpha enabled (this is usually done
through the constructor)
if this is a
memory issue (though this doesn't
seem like it is) try using object
pools. the HYPE framework has one,
but there are others too.
Check how they are loaded. I use the casa lib for loading, which makes the handling of the images easier, I load pngs through it and haven't had any issues like this.
post a simplified version of the problem. I've solved a problem countless times where I tried to post the problem, but would simplify it to the bare essentials and end up seeing the cause.