Flash erase image with mask - gotoandplay next frame - actionscript-3

This post was orginally posted on flashkit.com, but their forum is kinda dead and no one answered this question after 15 months. So I'm giving it a try here. I'm not a hardcore programmer and searched for a good solution on the web, but I can't seem to find any.
There is a piece of code for erasing a mask with mouse in AS3 which works perfectly. However, I need to detect if the whole image above is completely erased (the mask) and if so, an action will take place such as "gotoAndplay(2)"
Any idea how I to achive this?
http://jonathannicol.com/blog/2009/05/24/erase-an-image-using-your-mouse-in-as3/

Related

Is it possible to add animation to Microsoft Access

Is it possible to add animation to Microsoft Access? What I am envisioning is that someone clicks a button on a form and an animation appears and then goes away. Kind of like how when Mario jumps and hits a block, a coin appears and disappears. I know its a very general question, but I couldn't find much online regarding this.
You can move a timer event or similar to adjust the top/left position of a control/picture.
But you wouldn't, as Access (VBA) is single-threaded meaning that while such animation goes on, nothing else will happen, effectively freezing your application. That is really annoying for the user, and that is one of the reasons you meet very little code in this area.
Yes, this is possible. You would basically be drawing and redrawing sprites at specific screen coordinates. It's horrendous in Access, it looks clunky and will kill your app. The reason you can't find much about it online is because it's a very bad idea to try to incorporate it into a database.
Even if you took a shortcut and had multiple GIFs made up (think of an old-school flip book animation), you still have to draw and redraw a bunch of controls. I suppose if you really wanted it you could add it, but I still think it'll drag and look clunky.

Remove Child? AS3

So I'm incredibly new to AS3, and barely know my way around.
I built a simple colouring book game, essentially changing some of the graphics of a tutorial, and replacing numbers and sizes to fit what I wanted to achieve. I then built a menu screen in a seperate scene and linked the two with code snippets and buttons to go back and forth.
The colour pickers are generated when the game is ran, however an issue I seem to be facing is that when I go back to my main menu, they are still there.
Can someone point me in the right direction as to how I can fix this? I'm sure it's a rather simple fix. I can provide the code from the tutorial if needed
I think you're right you need removechild this color to remove one color from stage... Maybe you need removechildren to remove all color, whin are on stage... Try this two way

AS3 Events Not Behaving In FireFox and Safari

I apologise for a slightly fuzzy question but there are no other developers in my office and I need some help from somewhere. If you can even suggest a vague topic for me to look into it would be great as I have been banging my head against this all day with zero progress.
So, I have built a little image display widget (Flash CS6, FlashPlayer 10.3, AS3).
It is simply a container clip into which I load a a stack of images (wrapped in a custom class), one on top of the other but offset a little so that the side of each is visible to be clicked.
Each of the images listens for MouseEvent.ROLL_OVER and becomes the active image when this happens, I also have a listener attached to the stage of their container clip that listens for Event.MOUSE_LEAVE and updates the display when the user is not actively engaging with the Flash area.
Everything works fine when I run within Flash and also when I test in Chrome but in FF and Safari when I mouse out of the Flash area, as well as the expected MOUSE_LEAVE, a ROLL_OVER is also registered by the very bottom image in the stack. This means that whenever you mouse out in the affected browsers the bottom image always becomes active rather than the last one you actually rolled over.
Any thoughts, even vague possibilities, would be great because I am stumped. This is either some really tiny detail of Flash event propagation that I'm not getting or some stupid mistake that I've over thought into a mountain :)
Right now I will take what-ifs, maybes, legends, riddles, anything!
Sorry again for the rather rambling explanation.
Thank you in advance for any advice.

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.

Making the points always visible in a flex line chart

I'm trying to do something very similar to this example (source code enabled):
http://www.sunild.com/proto/line_chart_example.html
When you hover over each data point, a circle appears indicating that this is a point. How do I keep those circles visible at all times?
Edit: this example isn't mine, but you can view the source enabled here:
http://www.sunild.com/proto/line_chart_example_src/index.html
Umm, the case you show is a working example giving no details about the code itself. There are enormous ways the code could be.
For Eg - The code could be keeping an event listener over & out a mouse event...So removing it pretty much keeps the circles there.
But still I suggest show at least what you are doing, if not that code to get some clue.