ActionScript 3.0 :: Display Programing Approach?
Aug 31, 2010
I come from game programing using c++ and glut (which is an external library to display sprites and stuff). in glut you do everything in the code there is no drag and drop, this is nice since all the control is at the code itself, this is also annoying because when you want to display something you need to guess the right coordinations, this requires a few tests until you get the right coordinations.
Now in flash you do have the drag and drop feature which is great but it doesn't go well with the OOP concepts, at least for me.my dilemma is: do you create your frames (symbol creation and placement) by code only (but miss the drag and drop freature of flash) or do you create pre-made frames by drag and dropping symbols from the library?
View 3 Replies
Similar Posts:
Oct 29, 2010
I'm new to ActionScript 3.0, some time ago I was developing some websites using ActionScript 2.0 - mainly timeline scripting. As I want to come back to developing websites, but I don't want to go back to AS2 I'm learning AS3. On that occasion I want to learn class based programming and to learn it I'm trying to build the image portfolio website. Before, my projects build was based on main.swf file which was loading external swf files for every 'module' of the website and now I'm not entirely sure how to organize my project using AS3. So for the example let's say the website I'm building will have:- Main stage- Menu- Links content displayer- Footer Links would look like the below:- Main image gallery- Another image gallery- Contact form- About me- News module Now the question is, what is the best practice for building this kind of project?Should I create Main swf file that will load all external content as swf files (image galleries engine, contact form, about me, news module) and place it on the stage? Or should I create separate class for each of the part of the website?
My concern is, that with separate swf files, I could update just one part of the website and upload it on the server and that part was loaded when needed. With project build based on classes, after updating one link's class I'll have to compile whole project - of course it's not a big problem, but then the website will be in one file, which can grow every time I'll update the links. The swf file will contain data that may never be used so this could be easily separate swf file loaded only on request.
View 1 Replies
Feb 22, 2004
In actionscript you can create objects wich are somewhat like classes in C++. I've been trying to recreate the Windows class in AS... the problem is that to my knowledge an object cant be reused so to say- create as many windows as i like, all with different attributes(some based on user input). am i wrong?
View 1 Replies
Feb 2, 2006
i wanted to make a flash document , that when i try to click my mouse 1 as fast as i can on a button, it will measure how many mouse1 cliks per second,and display the mouseclicks/second in the corner , i was wondering how to do this , i am the noobiest noob at flash programming ever.
View 6 Replies
Jun 18, 2005
How to stop Actionscript flow for few seconds like sleep function in other programing languages?[code]...
View 7 Replies
Jun 1, 2010
In an effort to learn the technology and languages I'd like to try to develop my own Flash Video player (for the web).The main goal would be to brand the interface and be able to stream/play flv video files over the web on websites.I have no idea where to even start looking for information or what to look for on this topic
View 3 Replies
Sep 11, 2009
The intent is to implement a zoom effect for my photo gallery where photos are displayed at a default size when looking through them but if clicked they will zoom/scale up to a larger size for a more detailed view of them.I've attempted to do this by loading the jpg at it's full size when zoomed, having a Bitmap draw it, then immediately scale down the Sprite container that holds it. I call this scaled down version the default size. When the user clicks on the Sprite shown at it's default size, it is scaled back up to it's original size using a tween to give it that growing larger zoom effect. I call this larger unscaled version the zoom size.
The problem is with the default size (scaled to .66). It is not very sharp and has a noticeable lack of detail. I've compared the quality of it to a smaller jpg (equal display size) of the same image and the smaller unscaled version looked way sharper. I have set smoothing = true; so the tween responsible for the scaling will appear smoother. The tween looks perfect and so does the zoom version. The default version of the image when it is not being tweened is what looks bad
View 8 Replies
Jun 2, 2008
I am not very code oriented, but I found this code that I altered for my needs, and it works, as you move your cursor towards the bottom of the screen the movie clip fades in. However, in addition I need one that does the inverse where another mc fades in as you approach the top. Does anyone know how I would acomplish this task?
[Code]...
View 4 Replies
Sep 10, 2011
What is your approach to writing documentation explaining the options and use of XML files for a project ?Do you write commented instructions directly in the XML file ?Do you create a different text file in which you write instructions ?Do you explain the use of blocks of XML or do you detail each element and it's function ?I am looking for some guidelines on how to write the documentation for large XML files that control the settings and content of projects.
View 1 Replies
Mar 9, 2012
Our game is a bird-eye view game, with a dark atmosphere. The player carries a flashlight which can be used to brighten up the environment.So far, we've tried using masks, and although it works, it's not very effective. Every object needs a seperate mask, it tends to use a lot of CPU and is generally a mess to work with.I've considered using a system of black tiles at 90% alpha all over the room, which change their transparancy when the player moves near - but I was unsure.
View 5 Replies
Oct 26, 2009
But I do not want to Drag and Drop the original movieclip (A). But a copy of the clicked movieclip (A1).To do this I make a copy of the clicked movieclip and put in on the same place as the original one. And set function A1.startDrag();The problems which i have now is the handling of the mouse events. Because Flash was bussy with movieclip A, and is now interrupted by movieclip
.onPress {
make moviclip 1
set location A1 under the mouse cursor
[code].....
View 1 Replies
Aug 22, 2011
i have found a website before with a good parsing of swish's math.approach to flash but i cant find it now.does anyone know how to emulate swish's math.approach in flash, or any website with an explanation?
View 0 Replies
Dec 20, 2006
I've got a question about the efficiency of two functions I wrote that do the same thing. I'm trying to figure out which one to use. The functions draw lines between a series of points, and continually redraw them as the points move. The first function uses the drawing functions in flash.The second function creates an empty movieclip and draws a short line in it, then uses trig to scale / rotate the movieClip to make it fit between the dots.Both work, but as my program gets larger I'm wondering which function would calculate faster.
View 5 Replies
Mar 1, 2007
it looks like with the createEmptyMovieClip, u need to pass to it an instance name of an already existing movie which has been created manually and put in the library.I dont want to create an instance of a movie clip in the library. i want to create a movie clip in actionscript that does not already exist in the library.
View 2 Replies
Dec 2, 2009
I will redesign a product page that contains products like Vase, Ceramic Plates and more, Customers can customize the colors of the product. Now I need some advice what approach would best fit, I am planning to use Flash/Flex/Actionscript in implementing this; That way I can minimize loading to many jpegs for the product and at the same time making the page more interactive.
View 1 Replies
Mar 23, 2010
I am having trouble figuring out how to build a console for my application so i can send msgs to it from any class in the package.
i tried to send a generic Event, but I cannot find a way send a msg together with the event, or at least a reference to the object which is dispatching the event.
View 3 Replies
Apr 4, 2011
For my application I need a component (or combination of components) that shows a number of different types of events along a timeline, displays them in different ways as specified and allows you to click/hover along the timeline to add/modify/get details on events.
Basically I want a timeline across the top, always showing a 24hour period, but starting at variable points. I need to have different rows of variable height to display different types of data in different ways. for instance: row 1 will display the 'value' attribute as a circle whose diameter reflects value amount and change color based on a 'typecode' attribute. row 2 will display a line graph and plot chart based on different numbers (like one chart but with the datapoints as larger dots), and will also chart out trend of following or previous data if it exists. behind row 2 will display the same thing but for 5 previous days progressively more transparent
[Code]...
View 1 Replies
Jun 16, 2011
I wish to create a multiplayer game facebook app. A game will have 1 to 4 people in it playing from their own systems. I wish to target, lets say, 10K simultaneous online users. I am planning to write the client side game in Flash. I wanted to know how these clients communicate with each other. Can these clients communicate directly with each other or I should go with "server as middleman" approach? I want the game to work even in "restricted" networks. If server, how do I have things working from google app engine cloud service? I came across channel API, should I use that? Would it work with a flash client?
View 3 Replies
Dec 16, 2011
I'm looking for the javascript way to an associative map/array/hash that's using objects as keys. A replacement to what you can do in ActionScript 3 with the flash.utils.Dictionary. I'm sure java and C# have something like it too.It'd work same as a normal generic Object based assoc[key] but instead of string-based properties you use whole objects as keys (it will match not on toString() like Object does but on unique instance). Very handy to decorate objects you don't own (by using the object as keys and your decorations as value).[code]Main point of issue is I need to match on object only (it's being used by some other process you're not to interfere with but we still need association). So no magic .__hash props or toString() overloading (if possible).
View 2 Replies
Nov 5, 2009
Working on my first real project in as 3.0, trying to decide how to best work in a preloader. What I have is a single swf containing some assets, and a target to a main doc class. After loading those assets onto the stage, it runs through a routine to load several other swfs, and then 'does stuff' with them... anyway. got all that working nicely. How, now to best track the loading of the main swf? If I understand it correctly the Loader class is purely for loading external assets. well - what about internal assets?
Got this:
ActionScript Code:
//A large SWF file can monitor its download by calling
this.root.loaderInfo.addEventListener(Event.COMPLETE, func)
I think it would be called AFTER the whole main.swf has loaded. In AS2.0 i could target _level0 to get information back about the currently loading swf...
ActionScript Code:
initPercent = (_level0.getBytesLoaded()/_level0.getBytesTotal());
But, again, these are internal assets, not even living in memory yet. As far as I can tell - I need to use a preliminary (separate) swf to load the main.swf. (Like i used to do with AS2) - But if there was a method of targeting internal assets - a 'self loader' that would be cleaner...
View 5 Replies
Sep 7, 2009
it's an animated website header / banner
my stage is a long, thin rectanlge, with an asphalt background on a distinct locked layer
on the stage i also have a movieclip of white crosswalk 'stripes' motion-tweened from left-to-right over the asphalt
i am trying to have these stripes fade away as they approach the right side of the banner
'fade' being the operative word here, i'm trying to create a mask layer in the 'stripes' movieclip that has a transparency gradient
basically, a recatangle moves left-to-right over the stage, and a mask layer above (aligned left), has a left alpha value of 0, so the rectangle disappears behind it. i've seen references to 'soft mask' and also animated AS solutions, masks are always far too complicated.
View 5 Replies
Apr 12, 2010
im trying to establish a standardised approach handling event management.ive been using a similar structure to this on all my projects and havent had any problems.url...weve had a new guy start in the office who uses this method, and i can see why its an easy solution to use too, but not sure if we'll run into problems.url...was wondering if anyone had any thoughts on the correct way to handle this, and what potential problems we may come across.
View 1 Replies
Jan 12, 2010
Has anyone got any alternatives to what Colin Moock has coded to GET VISIBLE WIDTH/HEIGHT OF A DISPLAY OBJECT in ActionScript 3? That esp. in perspective of DisplayObjects that have 3D transforms applied and visible dimensions of which you need to consider for a calculation.
View 2 Replies
Nov 27, 2010
Looking for a programming book that is in tutorial approach. Example this chapter teaches you how to do a login form. In the second chapter it teaches you how to integrate the login for to another app.Basically I'm looking for a book that teaches you real working application rather than abstract ideas. Programming language I have in mind is Adobe Air/Flex, Visual Basic. Functions I have in mind should at least cover Drag and Drops, Integration to a web form (form entry) and customizable interfaces.The languages i had in mind isn't fix. If you know a programming platform that has little code or easy to learn but still be able to develop a cool application.
View 3 Replies
Jul 2, 2010
For one of my projects I need users to be able to communicate with each other in an audio mode. The thing I'm concerned about is the scalability of the project if it even gets big in terms of bandwidth consumption.
What are the alternatives to passing the audio through my server to the users?Is it possible to create a link between two users so they can exchange their stream of data (audio in this case) so that it doesn't pass through me, while still being able to control the time they've been connected to each other and some other information?
As for now it's just an idea I have in mind but I don't really know what to look into. I think it will probably need to be some plugin dependant solution so that's why I tagged the question like that.
I'm not looking for a concrete solution, just a little push in the right direction from someone who has been through something similar.
View 1 Replies
Jan 17, 2011
I am planning on using Flash Builder 4/Flex to write an AIR application which is primarily based around recording, storing and analyzing data.I'll be creating charts etc that need to update in almost real time.It's essential to me that the application be able to function without an internet connection so I need a local database of some variety,but I would also eventually like to build in online synchronization of the data where either database can be update each other based on newer information. Moreover, some type of encryption would definitely be welcome, and speed is a large concern
Synchronization: Primarily updates/additions/deletions will be done on the offline database, but ideally I want to have a web interface that will allow the same updates/additions/deletions and will be synced (beyond that I'm not sure exactly how to do it as I can model that based on what is most achievable).I'm wondering if there's any prebuilt engine that could handle the synchronization of 2 databases. I may end up having the web interface only be for additions, which would be significantly easier to sync.. and I may start that way, but i want to build with technologies that will best allow me to implement full online crud at some point.
View 1 Replies
Oct 8, 2009
When using Loader class to load display objects (bitmaps, SWFs...) from remote URLs, is there any way for them to be instantiated (referenced as we know, by Loader::content property) as some user specified valid subclass? For example if I had a class that extended a Bitmap, is there any way for the loaded object to be of this class?
View 9 Replies
Oct 21, 2009
I am a complete rookie in ActionScript2.0/Flash.I just started learning regarding a project. My problem is I want to display data from MySQL in a DropDown Menu in Flash. the SendAndRecieve functionality only aids us to receive any responses,right?(Please correct me If I am Wrong.
View 2 Replies
Feb 5, 2011
I have tried to fix this error but I just cant get it to work.
View 2 Replies
Nov 22, 2010
Is there any way to display flash objects which are outside the display area when flash is embeded in HTML
The reason i ask is my current project has a rotating + enlarging effect which is largely dynamic so sometimes an object may clip the edge of the stage areathis looks messy but i dont want to increase the stage area to cover the largest possible area any object could enter because most of the time the objects are at the center and small so i would end up with a lot of white space
View 8 Replies