How to make game like this by AS3? - actionscript-3

how to make game sort letter or guess pic Contains letters and spaces
can I use switch case or there is another way

can I use switch case
Yes of course. A switch block is just one way to do a conditional statement. If you are actually to the point in your programming skills to begin making a game like this, then you probably shouldn't have to ask such a simple question. This is not intended to put you down. I'm trying to encourage you to find the right questions to ask. Here is a conditional block to help you figure out the right question to ask:
If you already have working buttons
and you already have working text fields
then post the code in your question and someone can look at it and help you.
else if you already have an .as file and a .fla file you are working with
post that code and ask for help making buttons or text fields
else if you don't have a an .fla file or .as file
then welcome to square one. Go find you very first tutorial on the Internet and come back when you get stuck on a specific problem

Related

coordinates in an area tag

So I've started a web design course about 4 months ago, it's going smoothly and I'm really enjoying it. I'm trying to learn more in my own time and found tag while searching for something similair.
I don't fully understand it, but I think I get the grasp of it, so basically I'm asking if what I think the cords do is correct.
coords="x1,y1, x2,y2"
Does that create a box, which I can then use a so when it's pressed linked to another page?
I think you're a bit confused.
This function won't perform any doing. In fact, all that is a 'string'. Meaning, if you refer to cords, you will just find 'x1,y1, x2,y2' as the value.
If you're interested in linking content, use 'a' tags. Also, if you'd like to create a nice box, you're going to need some styling knowledge. Remember, as a web designer you create content for the web developer to put together. If you're looking into making the sites, look for a course in 'Web Development'.

Starting off with Mozilla development/contribution to Fennec

This is the first time I am trying to contribute to Mozilla. I went through several articles and documentation/resources to get a hang of what could be the best first steps to get started. I started off from this page http://whatcanidoformozilla.org1 and chose to start off with Java.
On initial tinkering I was taken to https://wiki.mozilla.org/Mobile/Get_Involved and eventually https://wiki.mozilla.org/Mobile/Fennec/Android/Suggested_workflow resource suggested that the best way to get started with it would be to pick up some simple bug and propose a patch for it.
So then I went to http://www.joshmatthews.net/bugsahoy/?java=1&simple=1 and this specific bug drew my attention. The description of the bug mentioned this :
There are some methods that we share (or can share) across our DB
implementations, like appending PARAM_SHOW_DELETED, PARAM_LIMIT, or
PARAM_PROFILE.
These are currently spread across LocalBrowserDB, TabsAccessor,
URLMetadata, and so on. It'd be nice to clean these up.
Question 1. Now how do I get some more context on what exactly is the bug and what is required to be done ?
As of now there seems to be 2 patches already submitted from what I understood (and please correct if my understanding is wrong here). So to get some context about the bug I went ahead and opened up the first patch submitted here.
It gave me some idea as to at least where exactly is the code itself that needs to be fixed. And I found it here
Question 2. Am I on the right track on how to figure out the code that needs to be fixed ?
Question 3. Even after reaching the DBUtils.java file I could not find any documentation about what the class basically does, or where does it fit into the whole picture. Could someone please help me with this, as to how do I figure out what a class is supposed to be doing etc. or at least some documentation around it?
You're on the right path. Basically, the What Can I Do For Mozilla website is a quick and easy way to let you discover projects you might be interested in, so it's the first gateway to the coding contributions.
That said, you did good in picking a bug to start off. However, as you saw the bug was already being worked on by somebody else (marked as Assigned). Your best bet is to find some new "good first bug" to work on. This might be a complicated task, as Bug's Ahoy shows only a few not owned good first bugs.
You should try to get in touch with the Fennec team, either via email or IRC (the latter for quicker responses).
Now, to answer your questions, in a more general way
Question 1. Now how do I get some more context on what exactly is the
bug and what is required to be done ?
Usually, this should be described in the first comment in the bug, on Bugzilla. If that's not the case, feel free to drop a message there and ask for more directions. You can also flag the reporter or the mentor of the bug using the needinfo functionality, as they are usually better shown.
As you can see, somebody asked for more info in comment 1 and some new directions were given.
In general, you won't find a patch with code on the bug itself, but you might find links to files and more precise directions on what to change and how. If not, again, feel free to ping the reporter and/or mentor.
Question 2. Am I on the right track on how to figure out the code that
needs to be fixed ?
You're on the right path. In general, if there are no links to files or DXR on the bug, but some code is mentioned, you can look it up using DXR, as you did.
Question 3. Even after reaching the DBUtils.java file I could not find
any documentation about what the class basically does, or where does
it fit into the whole picture. Could someone please help me with this,
as to how do I figure out what a class is supposed to be doing etc. or
at least some documentation around it?
What I usually do when navigating the Firefox code and need some more background on a not so well documented class, is browse the change log for that file, clicking on the Log button in the top-right panel on DXR (when displaying the file). It will show you a list of bugs that affected the file. You can even trace back the original file that implemented it, to get more context.
On the other hand, if you're only interested to the history of a single line of code within a file, then the blame tool is your friend. It tells you who last touched the line, the changeset and the related bug number. That is also accessible from where you can find the Log, here.
In the case of DBUtils.java, however, it looks like the class just holds some utility functions for database access.
To see how something is being used within the Firefox codebase, you can still use DXR. Here's a sample search for the DBUtils object.

Create simple gui for changing json variables

i have no real programming experience and while i hope you can help me with very simple tutorials / solutions i am also willing to learn something.
I want to create a gui that helps the user change settings of an JSON file (in this case) without the need to edit it directly. In detail it should do:
edit predefined variables
show, add, remove lines at parts of the file and edit their variables
simple user input (little text / numbers) / choose from a dropdown
if possible little questionmark-icon for each variable that will show explanations as a hover box
save changes + start an exe
would be great if there already is a editable script/solution with this features
i also found that Qt Designer is recommend very often - do you know tutorials can help me with the things i want to do?
thank you
I found a QJsonModel for Qt5 with a little example how to use it. Through this model, a part of the problem has already been solved.
For adding and delete items I suggest you familiarize yourself in Qt Model/View Programming. Here is a Model/View Tutorial.
For saving you should look at QJsonDocument Class.
To start an application QProcess::start() and/or QDesktopServices::openUrl() are your friends.
Good luck

Actionscript 3.0 - Clear function that serves as a button to press then empties the input text when it is filled

Can anyone help me solve my problem in AS3?
(P.S I wanted to have a clear button that will minimize the time spent in using this simple calculator :) )
Welcome to StackOverflow, crazywaltz. Just so you know, you need a lot more detail in your question from now on - platform, goal, current relevant code (what have you tried?). Put info mostly in your question, not in your title.
You also need to do your own research in the future. Google is a great resource! The documentation for AS3 is also available online, so read that. You could have found your answer in just a few minutes that way. People on StackOverflow do not like answering questions like this, and you won't get good answers usually.
That said, I'll help you out this first time. The code to clear a text field is as follows. I'm assuming your clear button is called btnClear, and your text box is called myTextField.
btnClear.addEventListener(MouseEvent.CLICK, clearText);
function clearText(evt:MouseEvent)
{
myTextField.text = "";
}
It is up to you to find out how this code works, and how to add buttons and text fields to your stage.

Flash parser for html

As I was working on this project for a friend of mine who is terrified of changing from HTML to flash, I realized that maybe there could be a bridge between them. So I started working on a flash project that would grab the HTML from his page and parse it to display it in flash. Although I am sure there are resources available for this already, I figured that the experts on SO might be willing to suffer through the logic of one user trying to develop this script.
So basically, I am not asking for an answer, I am asking for some step-by-step direction that could be posted so other people could see the logic behind breaking down this project. I think it would be really useful (not just for me, but for anyone wanting to learn more about objects and oop).
So, much like the thread between primarily Senocular and Rampage, this would be a thread where I would be the student asking the questions in a logical step-by-step manner and someone else (or someones else) could provide guidance.
Let me know if you are interested and I can start by posting what I have already written. We can go from there and I am sure it will prove insightful to anyone who reads it. If no one is interested, or no one has the time or inclination, no problem.
Best wishes,
Jase
Who in their right mind would change from html to flash for displaying a simple website? I don't see the logic behind it, it's more like you are trying too hard. Flash has its function in the web, as well as html does. If it's just for simple displaying, using flash is just the wrong way and won't make your website any better but worse because its loading time will be too long.
Goole Search retrieved these:
HTMLWrapper
Groe.org HTMLParser
There is an article about the 1st on *drawlogic. I think the seconds' home is on sourceforge here.
Thing is, browsers already do a fine job at parsing html code. Having the flash player parse html files not only does away with any accessibility advantage your markup can offer but it also feels like reinventing the wheel. If you need to display html content, leave it to the browser.
Slightly offtopic - Flashpaper can convert most HTML pages into swf format.
Given properly "disciplined" HTML, you can use the XML parser in the player for the basic parsing. Are you really talking about writing an HTML renderer in Flash though? Or just being able to pull information from HTML dynamically?