ActionScript 3.0 :: Efficiently Scrolling Over Large Dynamically Generated Terrain?

Aug 13, 2009

I've created a game engine using bitmaps and box2D, the floors for the game engine is made out of a number of lines which then has a bitmap fill applied to it, then it adds a little bit of grass on top of these floors....Here's a quick video to show you what I'm talking about:http:[url].....

This all works fine on my main computer, but when I move over to my netbook, I struggle to get 10fps... Because of this I am now looking for as many ways as possible to improve the efficiency of my code. So far what I've done that appears to of had some positive effect is:

- Use bitmapCaching on layers where it's appropriate to do so.

- Use scrollRect to scroll on only the necessary part of each of the layers.

However I'm still having big problems when it comes to scrolling the terrain on my netbook - are there any ideas that anyone might have which might be able to speed up the game slightly?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Make Scrolling Terrain - Scroll Down The Screen In Random Positions

Nov 12, 2011

i need to make scrolling terrain but dont have how to do it for the code? What i want to do is 5 objects lets call them A,B,C,D,E scroll down the screen in random positions

View 15 Replies

ActionScript 2.0 :: Large User-Generated Map Lags ?

Dec 28, 2010

I've been working on a top-down shooter.I have it set up so that a map can be generated using an array which is loaded from an external .txt file. This works perfectly fine... Until the map generated reaches a certain size.A map size 1850 pixels by 1000 pixels works perfectly fine. But if you double the size, it becomes nearly unplayable. The map is generated from a determined number of 50 pixel by 50 pixel movieclips (they are plain black), each one is created (using attachMovieClip) where ever the array contains the corresponding value.

I thought at first it was the fact that I was moving the entire _root when the player moved (there has to be a better way, suggestions?), but that was dumb considering that the lag exists before the player even starts moving (bullets lag).

View 3 Replies

Scrolling Large Amount Of Text Through Banner

Nov 14, 2011

I have this banner that needs to have a several rows worth of paragraph text animate horizontally through it. Ideally, the text should also be possible to update from outside of flash. As for the scrolling text, working with that much text as one long row of letters doesn't seem feasible, so I'm wondering is there a standard way in Flash CS5 of working with large amounts of animated text? Not the user editable kind like text fields and such, but presentational text.

Obviously it's not efficient to have one long string of text that extends several screens beyond the display, as is the case now. Editing just one letter can take several seconds of scrolling as the string is currently over 3000 px wide, and it's not even all the text that's going to be in the final animation. It'd be great if it was possible to type that text through some web based cms, and have it automatically transferred to the Flash banner,

View 7 Replies

ActionScript 3.0 :: Very Large Scrolling List Of Thumbnails?

Oct 10, 2008

I have a photo browser that I am building, and so far itlooks good. It loads in however many images are listed in an XMLdocument to thumbnails, and then opens a larger window when youclick on them. The program basically stacks the thumbnails on topof one another in a movieClip, and you scroll through with a scrollbar or by dragging the thumbnails up and down directly. My issueis, once that movieClip gets to a certain size, Flash doesn't dealwith it well. Let's say I have 100 images I want to scroll through.If I stack them all up, and they are 150 pixels high with 25 pixelspadding each side, that's a 20,000 pixels high movieClip, and thatdoesn't fly. I thought about using a list component, but I need itto scroll smoothly, and not only a cell at a time.

Do folks have any ideas on how to do this? It's really keythat it scrolls smoothly, and that it can scroll by dragging photosdirectly up and down in the viewer. It's easy now because I canhave the dragging behavior attached to the thumbnail scroll, andnot each individual image, and I can move that one movieClip,rather than tracking the position of all the images

View 6 Replies

ActionScript 3.0 :: Scrolling - List Is Too Large For Stage

Mar 12, 2010

There is a list in some frame in my file. The list is too large for this stage. How can I make this list scrolling?

View 5 Replies

Actionscript 3.0 :: Smooth Scrolling With Large Images?

Jul 25, 2009

[URL]

Here is an example online, I am trying something similar but am not happy with what I am seeing, perhaps it is just on my side. The scrolling seems choppy/jagged. I have this same issue doing a similar scroll with lots of big images. Is there any way to get a nice smooth scroll at a decent speed with flash?

Ive ported my as2 code into as3 but am seeing the same results. I have used tweener and tweenlite, nothing Ive tried is helping. how to achieve a smooth scroll?

View 1 Replies

Actionscript 3 :: Automatically Activate The Browser's Vertical Scrolling When A Popup Is Too Large For The Screen?

Oct 27, 2011

I have a flash application that utilizes a lot of popup title windows that do not have parent containers. I'm having a problem when users with smaller resolutions try to use my application because the popup utility windows will often be too large. Note that I do not want to re-size the window as that would eliminate a lot of it's clarity and separation of menu bars and tool icons. I just want my application to detect if the window has a height or width property greater than that of the browser's view frame and then activate the respective scroll bar should it be needed.

View 2 Replies

3d Carousel - Dynamically Generated Flash

Jul 1, 2009

I wish to have a 3d carousel much like a flash one in the below link : [URL] however, i wish the images to be dynamically generated and at the same time txt 'beneath' (to be added) the picture to be dynamically updated also...through a database. I wish to get it connected to a back end and probably use a content management system.

View 1 Replies

ActionScript 2.0 :: Loading Dynamically Generated XML?

Nov 1, 2006

ok, here's the deal. We are creating an ecard that will be customized by the sender, and sent to soldiers in Iraq. There are about 5 different things that the sender can customize, as well as write a message. The goal is to have their choices sent to a database and then inserting those variables when the receiver watches the movie.Now, instead of creating possibly thousands of XML files (one for each sender), we decided it would be better to just generate the XML on the fly from the info in the db. But my question is, how do I handle loading that XML? Since this won't just be a static page on the server, I'm not sure how to go about it. I'm wondering if you can use variables when loading XML, for example:

Code:my_xml.load("senderData.xml?user=LyndaSmith");Basically, how can i create an XML file on the fly with the values from the DB, that can then be loaded into Flash?I have virtually no experience with db's, so this is the method I came up with because I do have some experience with XML. I have a developer who will actually insert the values into the database with ColdFusion, and he can also generate the XML, I just need to be able to load the dynamic XML in flash when the receiver watches the card.

View 2 Replies

ActionScript 2.0 :: Removing Dynamically Generated MCs?

Oct 4, 2008

way to remove the clips generated by the following function.

Code:
function loadClips() {
for (i = 0; i < Urls.length; i++) {
var mov:MovieClip = attachMovie("numClip", "numClip"+i,

[Code].....

View 2 Replies

ActionScript 3.0 :: Cant Read Xml Dynamically Generated With PHP

Feb 26, 2009

I've been trying to write AS3 that can read xml which is dynamically generated by php.i've generated the xml in several ways all of which seem to work but i keep getting the error,Error #1088: The markup in the document following the root element must be well-formed,when i try to load the xml into flash. however the xml (as viewed when you go to "view source" in your browser) is indeed well formed.i have 4 versions of the php.the first just uses echo. the second uses echo but i wrap it in {start_ob(),ob_end_flush()}; then i use simpleXML and finally i use domdocument.[code]

View 6 Replies

X And Y Coordinates Do Not Match For Dynamically Generated Movieclip

Aug 6, 2011

I have a movieclip that I am adding to the stage dynamically. The movieclip has to be placed at specific coordinates to match the current text field.The coordinates that show on the INFO tab are x=264 and y= 365. However, in order to get the movieClip to match those I have to set x to 398 and y to 200.If I set the coordinates to those in the INFO tab then the movieclip does not show; it appears off stage.

View 2 Replies

Data Integration :: Dynamically Generated Forms?

Oct 26, 2006

My company has a database-driven system of web forms, each ofwhich consists of many questions in various layouts (2-columnradio, 1 column checkbox, etc). The forms are never hard-coded.Each HTTP request causes Java code to perform DB queries todynamically generate the various questions and answers.Thosequestions are then rendered through JSP and Struts tiles into HTML.The HTML also contains JavaScript functions to hide/showconditional questions on the web page based on answers to earlierquestions. Now we're trying to figure out the best way to adapt thissystem to use a Flash front-end instead of HTML/JavaScript.My preliminary research suggests at least two possibleapproaches:

1. A pre-compiled SWF could send a request with certainparameters, and the server could respond with an XML description ofthe form to build. Then the SWF could parse that XML andynamically generate the form using attachMovie for each formelement (with a lot of math to determine relative positions ofelements with variable sizes, like text labels). 2. Flex might reduce the code for placing elements, by usingMXML to describe the form structure as well as visual arrangement.I haven't used this yet, and I'm wary of Flex 2 simply because itrequires Flash Player 9 which is only at 50% browser penetration

View 1 Replies

ActionScript 3.0 :: Dynamically Generated Movieclip Properties

Dec 3, 2008

I'm currently reading in data from an XML file. Each attribute of a child is assigned as a property of a movieclip as shown in the code attached. However, what i'd like to do is not have the property names already decided as i don't necessarily know how many attributes a child in the xml file will have. Is it possible to dynamically name the properties depending on what number attribute they are...?

View 2 Replies

ActionScript 3.0 :: Dynamically Generated MovieClips In Array

Mar 3, 2011

I've tried to generate movieclips dynamically the method I have used does the following:
Uses a loop runs depending on how many movieclips I want to generate e
Each time the loop cycles it creating a new movieclip instance
Adds the new movieclip to an array
Uses method addChild to put moveclip on the stage then draws a rectangle
begins fill
ends fill
Adds it to that movieclip

I then use a conditional statement checking if the movieclip is the first item in the array if so it sets the current MovieClips x and y position to a chosen value. the first movieclip is used for a starting point to align the rest of the generated movieclips to. If not the movieclips x and y position are set to the previous array items x and y position + current movieclips width or height + the gap I would like them to have. Then the cycle repeats. I've coded this using timeline code and it works fine the shapes appear on the stage no errors. I tried to move this code off the timeline to an as file and the code has no errors but when run I just don't see the objects even if I trace there x and y positions I don't see them on the stage.

Timeline Code
var mcArray:Array = new Array();// DEFINE ARRAY FIRST
var randomNo:Number;
var colorStr:String;
var currentColor;
var movieClip:MovieClip;// TEMPORARY VARIABLE
[Code] .....

View 5 Replies

Flex :: Getting Handles To Dynamically Generated Components

Nov 10, 2009

I have a Flex application which references a separate MXML file as a template for a custom component. I create instances of the component dynamically several times in my program, but I need to get a handle that will allow me to modify that instance of the component as desired. I pass specific information to this component on instantiation using bindable public variables in the component's MXML file. I add it to my main program using addChild().

I want to update the component's progressbar as necessary and I want to remove it from the box to which I addChild'd it. What's the easiest/best way to get a variable that will give me predictable access to each component so I can easily manipulate the components as necessary? Some research suggests creationComplete, but I decided it was faster to just ask than to go through lots of different experiments and come up blank.

View 1 Replies

Flash :: Xml - AS3 - Load Dynamically Generated XML Files

Feb 26, 2010

I'm not quite sure how to describe the problem I'm having but I'll do my best. I have an image gallery built in AS3 that loads content via an XML file. Nothing mind blowing here... When testing locally on a static XML file, the gallery works as intended. The purpose of this gallery is to function within a CMS and load dynamically generated XML files to display the appropriate images/info for each particular gallery. All this functions fine, to an extent...

[Code]...

View 2 Replies

ActionScript 2.0 :: Targeting A MC Inside A MC With A Dynamically Generated Name?

Nov 26, 2009

I'm trying to target a movieclip inside another movie clip which I have dynamically generated the name.

ActionScript Code:
firstText = "text" + randomNum;
_root[firstText].gotoAndStop(9);

[Code]....

The first part works, I can "firstText" and I can make it go to frame 9 and stop but I can't manipulate the movie clip "title_txt" which is inside "firstText"

View 2 Replies

ActionScript 3.0 :: Bezier Curve That Is Generated Dynamically?

Dec 30, 2009

i have a bezier curve that is generated dynamically now i want to mask an image with it to produce a cut of face functionality just like in elfyourself.com or in jibjab.

View 0 Replies

ActionScript 2.0 :: Dynamically Generated MC's Have Duplicate Content?

Apr 24, 2011

I am dynamically generating MC using this code:

Code:
var _root=MovieClip(_root);
xPosition = 0;
yPosition = 0;
for (i = 0; i < 5; i++)

[Code]...

View 1 Replies

Actionscript 3.0 :: Calling A Dynamically Generated, Nested Mc

Jul 19, 2009

So basically my file is a photo gallery. There are two ways to click through the photos - the previous/next buttons or the camera icons on the floor plan diagram. The cameras are dynamically generated from XML, into a cameraHolder mc.

I have the controls working independently, but I need to have them working together (ie: if you click the previous/next buttons, the camera icons would change state) I don't have all the over/selected/visited states working yet, but I don't really need help with that.

What I really need to be able to do is figure out how to call the camera icon clips. See line 138 for where I tried to trace one: trace(cameraHolder.camera0); It returns as undefined.?

Also is is possible to call a mc where part of the name is a variable? For example, you'd call something like "camera" + whoIsOn instead of camera0?

FYI: this file is definitely a work in progress. I kind of slapped together two examples to get what I currently have...

View 2 Replies

ActionScript 2.0 :: Looping Through Dynamically Generated Clips?

Mar 27, 2008

As part of a preloader, I've placed a blank movie clip on the stage and attached the following code:

Code:
onClipEvent (load) {
for (i=0; i<50; i++) {
ranx = Math.round(Math.random()*1000)+1;

[Code]....

The bats generate fine, but I can't get them to move about.

View 8 Replies

ActionScript 2.0 :: Targeting Dynamically Generated Clips?

Jul 27, 2008

I'm trying to make a flash widget that loads thumbnails from an xml document and have each thumbnail link to a different web page. So far everything works fine but I don't like using _root incase the widget gets loaded into another swf. In my expereice _lockroot dosen't always work.the line highlieted in red will only work if targeted through root as opposed to all my othere reference to ["placeHolder"+i] which use this.["placeHolder"+i]. I've tried _parent, this._parent and adding lots of other _parents. Nothing will work this is the file structure _root.placeHolder'N'.tn_mc. how I can substitute _root for a relative path.

widget_xml = new XML();
widget_xml.ignoreWhite = true;
widget_xml.load('flashWidget.xml');//path to document

[code].....

View 1 Replies

ActionScript 3.0 :: Duplicating Dynamically Generated MovieClip?

Jun 22, 2010

I am loading several images from XML to dynamically generated movieclips (mc_1, mc_2, mc_3...etc.). Then adding all of them into a parent MovieClip - imageContainerMc. So now, imageContainerMc holds mc_1, mc_2... etc. What I want to do next, is to Duplicate the imageContainerMc, and add both the instances on Stage-- addChild(imageContainerMc), addChild(imageContainerMc_duplicate).how can I duplicate a dynamically generated MovieClip?

View 1 Replies

ActionScript 3.0 :: Masking + Dynamically Generated Content?

Jan 16, 2011

I've got an object in the library that's a basic rectangle with an outline. A for loop creates a grid dynamically. I want to create a mask that goes over this grid. I'm using "my_object.mask = my_mask", but to no avail

View 1 Replies

ActionScript 2.0 :: Position And Size Dynamically Generated MCs?

Oct 6, 2003

I'm trying to create a dynamically generated navigation submenus. Basically I'm creating instances of a MC using attachMovie, I'm populating it's text field sizing it's background image's width (subGlow_mc) based on the width of it's text field(link_txt). I get the movies on the stage but hey dont position how I would like them and the backgound images are not resizing consistantly. I have pasted the AS that loops through the flash remoting call to generate the movies below.

[URL]

function createSubMenus() {
////Setting the intial X and Y coordinates.
var initX = 800;

[Code]....

View 3 Replies

ActionScript 3.0 :: Add A Keyline/border To Dynamically Generated Sprites?

Feb 27, 2009

how to add a keyline/border to dynamically generated sprites?

i have some script that creates a video wall effect - but i am wanting to add a white/defined col border to each of the sprites.

i've tried a couple of snippets that i have found around the net - but nothing seems to do it - either errors or does nothing. here is the script that creates the thumbnails

Code:
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;

[Code]....

View 4 Replies

ActionScript 3.0 :: Dynamically Generated Movie Clip Names?

Sep 4, 2010

In AS2 I would do this:

for(i=0;i<10;i++){
this.attachMovie("clipLinkageName", "instanceName" + i ,this.getNextHighestDepth());
}

But now in AS3, I'm learning to use:

var instanceName1:clipClassName = new clipClassName();
addChild(instanceName1);

But I don't know how I can put that in a for loop like I did above..this["instanceName" +i]:clipClassName = new ClipClassName(); does not work.

View 9 Replies

ActionScript 3.0 :: Loading Series Of Dynamically Generated SWFs

Oct 6, 2008

I'm working on a project where I need to load a series of dynamically generated swfs. The catch is that the composition of each swf depends on the result of loading the previous swfs. For example, if I generate a swf (just writing bytes to a ByteArray), call it A, then load that swf...

loadBytes(A)
//wait for COMPLETE event
//generateBytes for B
loadBytes(B)
//wait for COMPLETE event
//generateBytes for C
loadBytes(C)
etc...

It turns out that this is very slow. It doesn't matter how simple the swfs are -- 40 or 50 of these can take several seconds. This is just too slow for my needs. How I might speed this process up? Is there some way to make the loadBytes calls finish more quickly? Or maybe an alternative, faster way to dynamically load actionscript bytecodes?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved