Actionscript 3 :: Pushbutton Engine - Repeating/tiling Art Assets Across Sprites?

Apr 9, 2011

So I'm creating a classic side-scroller using the Pushbutton Engine [url] and I want the 'world' bits to be any given size, of course, and the repeat/tile my art assets. I've got the following render setup code as a start:

[Code]...

However, that just takes brick.png and stretches/shrinks it to fill the size of the object. Lame. :) I've spent a bunch of time trying to google how to do this, but I'm perhaps not getting the right terms or some such as I haven't come up with anything. Mostly articles on building tile-based games with PBE. While I'm sure I can hack together something that'll do the trick, I want to make sure I'm doing it the right way such that I get the best performance and what not. where I should be looking to pull of this standard effect?

View 2 Replies


Similar Posts:


Flash :: Does PushButton Game Engine Have The Notion Of A Camera

Apr 10, 2011

I am playing around a bit with the PushButton Engine for game development in Flash and have come across a need for a Camera like the Camera that follows Mario in Mario Games. Flashpunk has a nice implementation of it.

Does PushButton have it out of the Box?(I searched for it and didn't find, hence the question here).

View 2 Replies

Actionscript :: Pushbutton Engine EventSoundTrigger - Sound Object Is Null When The Component Is Created

May 11, 2011

I'm running into some issues using EventSoundTrigger in Pushbutton Engine I am able to make it work using xml like this:

<component type="com.pblabs.components.basic.EventSoundTrigger" name="Sounds">
<startSound filename="/assets/explosion.mp3" />
</component>

But if I try to write actionscript to do the same I throughs errors. I can't find any examples online to explain how to initialize or use EventSoundTrigger directly in ActionScript. The following throws an error that the sound object is null when the component is created. I figured it out here's the answer:

[Code]...

View 1 Replies

Flash :: Self Updating Air Application Assets Without Re-downloading Assets Already Downloaded

Feb 10, 2011

I want an air application to be able to update the assets it uses, but minimizing the download needed, so only downloading files added since it last updated.I'm thinking this would include a server portion which would zip the needed files based on a version number? Has anyone implemented anything similar / got any thoughts on the best approach to building this sort of system?

View 1 Replies

ActionScript 2.0 :: Tiling A Background With 100% SWF?

Sep 1, 2005

I am using this code to create a tiled background on a site I'm working on.

tileBG = function () {
tile_width = 128;
tile_height = 128;[code]....

It works great, but because I'm publishing my SWF with noScale at 100% width and height, the background doesnt fill the whole swf, only the size of the actual stage in the FLA. Is there any way I can change this so It will fit accordingly?

View 4 Replies

ActionScript 2.0 :: Convert MC To Bitmap For BG Tiling?

Jan 25, 2009

I'm building an XML driven video player that will allow users to customize a wide variety of layout/visual features for the player, and one of the important features is letting them switch between a regular background image, and a tiled background. I've been playing around with various methods for tiling using the Bitmap class, and its been working fine, as long as I load the image from the library. However, when I try to load the image dynamically (i.e. through XML), it doesn't jibe.
Here's the code for the tile:

function tile() {
var tile:BitmapData = BitmapData.loadBitmap("linkageIDForBitmap");
this.beginBitmapFill(tile);
this.lineTo(Stage.width, 0);

[code]....

Again, if I write a variable which references the xml node, and use that variable in the loadBitmap function, it doesn't work. I'm assuming this is because the dynamically loaded tile doesn't have a linkage ID attached? Not sure how to do that...
My other thought is to simply load the tile into a movieclip (as I do with all the other content), and then convert the movieclip to a bitmap, then proceed as normal with the code above. I've searched the boards for a method to do this, but have come up empty.

View 1 Replies

Full Browser Flash Non Tiling

Aug 13, 2009

I've seen the Full Browser Flash video which has tiling in the background. Can somebody supply code, and possibly an example of how to have one scalable image as the background without distortion whilst the foreground flash remains the same size. the site below is exactly what i'm after with the menu fixed to the left.

[URL]

Is it also possible to have the menu bar a fixed percentage from the top of the browser?e.

View 2 Replies

ActionScript 2.0 :: Tiling And Scaling Flash

Jul 1, 2005

I've seen a lot of posts on how to tile an image in a Flash movie that is being scaled to fit the browser. I found some code posted a while back to do it in MX 2004. (below) Can someone tell me what parts of this don't work in Flash MX? (I don't have 2004) Can this be adapted to work in Flash MX, or does someone know another way to achieve the desired result in MX?

[Code]...

View 3 Replies

ActionScript 2.0 :: 100% Width And Height Tiling?

Aug 8, 2005

I was trying to work into my 100% width and height backgrounds i have been putting into flash (code at bottom).The question I have is, the duplicate background tutorial only works for the defined space of the flash stage, ie: if the stage is 900x600 - the background will duplicate for that, but anything beyond is just the stage color.How can I make the background duplicate across the entire browser window.

Here is the code being used for my 100% w/h backgrounds (not tiled):

Code:
// Control stage size without content resize.
Stage.scaleMode = "noScale";
_root.bgFull_mc._width = Stage.width;
_root.bgFull_mc._height = Stage.height;

[code]....

View 3 Replies

Flex :: Creating A Parallax On A Tiling Background?

Feb 12, 2010

I am using the blitting technique that jeff from uses for creating tiles. I am trying to paint 2 layers of bitmapdata onto a bitmap. One the first layer is the background ( 1 image). and the second layer is the tiles. In that class below. the updateMap is the method that gets called in the loop to repaint the image.

package com.eapi
{
/**

[code].....

View 2 Replies

Internet Explorer 8 - Flash Canceling Png Tiling?

Nov 16, 2010

I have a weird issue that only seems to show itself on IE 8 so far. I have a semi transparent png tiling accross some divs on my site. All works ok. However as soon as i put any flash content on any div on the page, doesn't matter where, IE stops tiling the png and stretches it instead. It only occurs with flash and on ie8.

View 1 Replies

Actionscript 2.0 :: Tiling Images On A Random Grid?

Dec 7, 2007

So I need to tile a number of images to simulate a wall full of framed pictures. The images will be sized randomly onLoad and need to be spaced evenly. Here's is the effect I'm wanting to achieve:

how to pull this off? They'll load one at a time and probably starting in the center of the stage a building outward.

View 13 Replies

ActionScript 3.0 :: Image Tiling And Cool Effects?

Jul 24, 2006

I am working on an as3 slideshow class and I came across a blog post that gave me the idea to use better transitions than the sliding out and fading I originally intended to use. [URL]The source for that class is available and it is a good starting point but I wanted to check and see if anyone know of similar projects that had more effects. Right now I just have the random explode effect from the above link and before I start working on effects I wanted to see what was out there.

View 1 Replies

ActionScript 2.0 :: Full Screen Tiling Background?

Feb 7, 2007

I took the tutorial on using the bitmapdata to effectively tile a background, but it doesn't tile it across the full screen. Only the size of your flash movie. I want it to cover the entire screen muc like [URL]I'm looking for a way to tile the image across the full background regardless of window size. So if you maximize your browser, the background tiles the the full screen. I've been racking my brain all morning trying to figure it out!

View 6 Replies

ActionScript 3.0 :: BitmapData Tiling From Holysocks Blog?

Jun 21, 2011

I can't get this to work, and I guess it has to do with my knowledge of loading a bitmap

This is what i've got so far:

[Code].....

View 3 Replies

ActionScript 3.0 :: Flash - Create A Tiling Image That Fills The Stage?

Jul 2, 2010

I've attempting to create a tiling image that fills the stage using AS3. Its all well and good until the stage is resized - once this happens things being to look very poor. At first I thought it was a smoothing issue but now I realise that the same image is being drawn over itself again and again. As I want to eventually have this over video, I need the transparency. If I use an opaque image, obviously you cant see the problem.

I've tried adding a condition to remove the child that is being drawn to in several ways but this dosen't seem to work. You can see these commented out in the code below.

[URL]

Code:
import flash.display.Bitmap;
import flash.display.BitmapData;
var _stageHeight = (stage.stageHeight);

[code].....

View 3 Replies

ActionScript 3.0 :: Snap Image Over - Place All Images In Side By Side Like Tiling

Aug 26, 2009

i have to sanp images into tile or grid form. but my images are in 4 different sizes in height/width. i have to place all images in side by side like tiling.

View 1 Replies

ActionScript 2.0 :: Full Screen Tiling Working But Not Working Right?

May 16, 2003

am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"Here's the code(taken from various posts)

import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";

[code]....

View 3 Replies

ActionScript 2.0 :: Filling A MovieClip With A Small MovieClip And Tiling?

Mar 30, 2008

I was hoping to get a little guidance from the AS pro's. I have a movieClip that is 500x500 in one of my movies that I would like to add a tiled background to. This tile will be very simple something like 4x4. I have been reading up on the BitmapData class and figured this would be the best way to get this done and use up the smallest file size.But I am not 100% understand if that is the best solution. Anyone have any thoughts? After reading up on full page flash movies I figured that method should be able to be applied to individual movieClips as well.

View 4 Replies

Scaling Background / Whole SWF Object Without Tiling Background

May 15, 2009

I really don't know much about flash or swf files but in updating my portfolio I came across Polaroid gallery. I have managed to update the background jpeg with my own picture and remove the fade effect. However in the original program the background was tileable so when seen in a full screen browser looked fine. As my picture is not tileable I would like to know if it is possible to scale the background or the whole swf object without tiling the background.

View 1 Replies

IDE :: Movie Keeps Repeating?

May 12, 2010

By the way I'm still really new to Flash and AS3.I'm writing this quiz that gets questions and answers from an xml file in the same directory and displays the question in a TextArea, the available answers in a list, and additional text in another text area.Most of it was working the way I wanted and I noticed the apostrophes weren't coming through the XML so I thought I'd try escaping it with a not thinking. I did a publish preview and saw that my list loop became infinite populating my answer list. I took the out and still had the same problem. I backed out as far as I could in the AS3 and couldn't find anything that would cause it to continually loop like that. I traced a statement at the beginning of the script and realized it was actually looping the whole app not just an event or function. I'll reply back with the code.

View 1 Replies

ActionScript 3.0 :: Script Keeps On Repeating

Jun 3, 2009

i made two buttons, first called buttonA and the second buttonB.each button will run a movieclip when it's clicked now, the first time when i try it it works wonderfull, then when i keep clicking it, the scrips repeats causing the moviclips to pause or run again, the more i click the more it repeats ,

View 2 Replies

ActionScript 1/2 :: Array Keeps On Repeating?

Sep 14, 2010

Is something wrong in this syntax? I'm getting only the first record and it keeps on repeating. When the php file is being tested in the borwser, it shows its data correctly in this format. AA,,BB,,CC,,DD,,

senderLoad.sendAndLoad("http://www.web.com/bb.php",receiveLoad,"POST");
txt2.html=true;
receiveLoad.onData = function(src) {

[code].....

View 18 Replies

ActionScript 3.0 :: Mc Won't Stop Repeating

Sep 25, 2010

I have a website with a mc inside a mc. The nested clip keeps repeating , I want the nested clip to run 1 time. I have stop actions on each clip, it delays, but won't stop repeating.

View 6 Replies

ActionScript 2.0 :: Count From 0 Through 9 And Then Just Keep Repeating Over And Over?

Oct 20, 2003

if there is a piece of code that will count from 0 through 9 and then just keep repeating over and over?

if there is would there be a way of controlling the spped of the count - so it could go really fast or quite slow??

i tried
[AS]onClipEvent (load) {
myValue = 0;
}

[Code].....

View 5 Replies

ActionScript 3.0 :: Mp3 Repeating Play Button?

Dec 3, 2009

I have a simple mp3 player, with PLAY PAUSE PREVIOUS and NEXT buttons. the problem i have is if you click the play button more than once, the mp3 clip will start to play itself as many times as you clicked. this sounds really bad..u could have the clip playing over itself 5 times.

Code:
if(play button is clicked ONCE){
(deactivate play button until next song);
}

in other words, only one PLAY-button-CLICK allowed per song...

View 7 Replies

ActionScript 3.0 :: Stop An Flv Video From Repeating Itself?

Mar 10, 2010

I am dynamically playing a video.flv file on the stage when a button is clicked. It plays fine but continuously repeats itself. I want it to play once and the disappear.

View 2 Replies

ActionScript 3.0 :: Sound Loop Not Repeating

Apr 25, 2009

So, I downloaded a simple sound loop from Flash Kit.

I am building a Flash webiste and want the sound to loop once the movie loads.  I have added a stop and play button to the movie in case the viewer doesn't want the sound on.  I understand sound can be annoying.

I add the following code to the FRAME 1 of the movie.  Everything works fine but when the loop finishes, it just stops.  How do I get it to continue looping?  Also, as I navigate to other sections of the movie.. I want it to continue playing and not restart when I go back to say "Home".  Home starts at frame 1 as well.[code]...

View 9 Replies

ActionScript 1/2 :: Repeating Functions While Key Pressed?

Jun 8, 2009

I'm just starting to learn to make my own functions and was trying to make a walk sequence. My original program used an elaborate series of counters and onEnterframe, but I want to take a different route (basically starting from scratch) because my walk sequences always turned the avatars into picasso paintings when two or more keys were pressed simultaneously. I'm more familiar now with set and clear timeout, but what do I do if I want a specific sequence to count up, then down, or rotate back and forth, like the pendulum of a clock? starting with a basic function like function walk(bodypart){bodypart._rotation += 45;}. if (keyUsed == 68){walk(square_mc);} what do I have to change so the square rotates back and forth +/- 45 degrees while depressed?

View 1 Replies

Professional :: Non-repeating Movie Clip?

Jun 16, 2010

On the stage of a flash app I  have several movieclips that keep repeating. Now I need a movieclip  that doesn't repeat. It should play once, and then keep its last state  on stage. I can't find out how to stop this movieclip from repeating.

View 3 Replies







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