ActionScript 3.0 :: Image In Array To Background Of MovieClip

May 22, 2010

When the xml file of images is loaded, I place each image into an element of an Array so I can handle them individually. Problem I am having now is this. When image at element 1 is pressed, it should become one of my movie clips background. I am using some code I was using in as3, when the image wasnt in an Array and it worked fine. Now I am in AS2, and the image is in an Array, it doesnt seem to work. Additionally, I get no errors whatsoever.

The code for this is
picHolder[1].onPress = function() {
picHolder[1].width = card.width;
picHolder[1].height = card.height;
picHolder[1].x = 0;
picHolder[1].y = 0;
card.addChild(picHolder[1]);
};

Whereby picHolder[1] is an image, and card is my movie clip. If I do picHolder[1].startDrag(true), I can pick up and drag the image. So, I know I am dealing with the correct image here. Should I be doing the above differently when working with an Array?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Change Background Image Of A MovieClip In It?

Oct 15, 2009

I have the following package[code]...
 
1. The class instantiates and adds a number as text on top of the image that I created the MovieClip class from

2. As the main class of the fla rotates images it calls the loadItem() function of each corresponding button.

3. That function starts the timer and, on each tick of the timer, the background image changes.
 
What is happening right now with this code is that the new image (that I want to be the background image behind the text) is coming in on top of the text.

Is there a way to simply replace the image currently loaded into the MovieClip.

View 2 Replies

Javascript :: Video With Transparent Background On Page Above Image Background?

May 2, 2010

I want to embed some video into my HTML page. As background I want to use big picture. And above it I want to insert loop video with (i.e.) walking man.So, can I embed video (without flash and any player controls) in page?Can I decode video with transparent background? Is there any codecs which support transparent background (alpha-channel)?

View 1 Replies

ActionScript 3.0 :: Loading Image From Array Into Empty Movieclip?

Mar 6, 2011

I'm converting Kirupa tutorial for AS2/XML gallery to a AS3 image gallery that works with AMFPHP.I'm running into a output error:TypeError: Error #1010 After some searching I found out that the script says that there's a undefined propperty in the script below. It should load an image from the Array "Image" in a empty movieclip wich excists on stage called "picture" ["picture"+0] is also used in other parts but then as ["picture"+p]. P=0 with an increment based on button clicks (previous and next)

function firstImage() {
if (this.loaded == this.filesize) {
picture.alpha = 0;
var loader:Loader = new Loader();

[code]....

View 1 Replies

Image As Background / Resizing / Scalable Background

Jul 24, 2009

I am relatively new to Flash CS3 and i have been learning Action-script 3 over the past week. I have come quite a long way and i have made a site in flash but i just have a question.I have been using an image as my background and i am happy with the way flash automatically scales all the objects in my file but the background image does not scale. Is there a way to do this? I have found out things online which show me how to add auto-resizing to the background but this knocks off the flash auto scaling/resizing for everything else.

View 4 Replies

Actionscript 3 :: Avoid Image To Get Stretched When Used As Background Image, In Flex

Dec 12, 2009

I am developing a website in flex. And in that, i am trying to set the background image of my application. like this: parentApplication.setStyle("backgroundImage", data.image_src);

From a different location.

My issue is that, the images that i have are small and hence they are being stretched when used as background images. I want to avoid that from happening. How can i do it?

View 1 Replies

ActionScript 2.0 :: Image Pan - Making The Background Image Move Around As If It The Scene Is A POV

Mar 7, 2011

was wondering if anyone could assist me with some actionscript. I am working on a project similar to this (thehideout.org.uk/refuge/) and making the background image move around as if it the scene is a POV.

View 1 Replies

ActionScript 3.0 :: Background Image Scroller To The Left Third Or The Right Third Of The Image?

Aug 4, 2009

Iv got a background image 3 times the length of my stage.. what im trying to do is create a scroller so when you press a right button or a left button, it scrolls to the left third or the right third of the image.

[Code]...

View 0 Replies

ActionScript 3.0 :: Add Border/background Image To Display Image?

Jan 12, 2010

I am using this following code to display images using xml.Everything is working fine for me but i have to add background image or border to the displayed image using function BitmapFileMaterial.

using BitmapData or Bitmap Class but same functionality.

[Code]....

View 0 Replies

ActionScript 3.0 :: Background Image Will Change To This Button Specified Image?

Jul 10, 2011

I am making a new flash website and i stack on the as3 part.My site have a menu like all the site do.Now on the site load there is a background picture.When you press one of the menu buttons, the background image will change to this button specified image.But all that in an animation of fade in and out.My problem that i have everything but i cant know which image was before it changes to the buttons specified one. It maybe require as3 which i dont know.I cant upload here my work. its personal.But i ask you the professionals, please make a short fla file which will have the code and animations i need.(if you cant understand me)Please, make a fla file, which contains random 3 images.At the start it will have main background and a menu on it(just text-for fast and short work)The menu is 3 text ine(main,about,contact)now, make that when you press about(for example) it will change the main image(background) to the image of the about page.

View 2 Replies

ActionScript 2.0 :: Tell Flash To Call A MovieClip As Opposed To SetRGB For The Background MovieClip?

Feb 2, 2005

If I have a piece of a function that is telling Flash to:

// show a hover color
var col = new Color(this.background);
col.setRGB(0xf4faff);

How do I tell Flash to call a MovieClip as opposed to setRGB for the background MovieClip?

View 4 Replies

Flex :: Get Selected Image(MouseClick Image)from Array Collection Using DataGroup?

Jul 26, 2011

Gallery in DataGroup, How can i Call selected image(MouseClick Image) this is my Sample code

<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;

[code].....

View 1 Replies

Centering A Background Image?

May 14, 2009

I'm told that the following chunk of script will center the stage on resize, but not knowing much of anything about actionscript,

myListener = new Object(); myListener .onResize = function () { ... } Stage.addListener( myListener ); // later ... Stage.removeListener( myListener );

View 5 Replies

Set Swf As A Background Image In Vista?

May 28, 2009

Set a .swf as a background image. I want it to still move.

View 3 Replies

Get Swf To Play As Background Image?

Nov 17, 2009

I want to convert a .avi into a flash movie and import it into Dreamweaver as a background image so that it will expand in all different resolutions 1. what do I need to consider when building this in Flash (using MX 04)?2. What should my html look like in order to call this file as a background swf (and poss css file)?

View 7 Replies

Flex :: How To Set Background Image For App

Jul 9, 2010

I'm using Flash Builder 4 to create an application. I need to set an background image for the app. I've pulled through the data from XML. I am using an <mx:Image> for the background-image. But I need elements to then be added inside it. How do I achieve this? I considered using Layers, but dont know how you achieve this.

View 3 Replies

Actionscript 3 :: Set A Background Image?

Apr 8, 2011

I have looked around for about two hours now and I can't seem to find the command to convert this little piece of code to change the ball colour to a bitmap:

on(release){
myColor = new Color(_root.ball_mc);
myColor.setRGB(0xFF0000);
}

View 2 Replies

Flex :: Set Background Image In 4.5?

Jul 10, 2011

I have written a custom skin in Flex 4.5, which shows a custom image. I want this to my background image, so how can I set this skin to the application container?

View 3 Replies

IDE :: Way Of Scrolling Image Background?

Sep 16, 2005

I have come to a solution where I use an invisible button (covering the whole movie) where the action takes place in. Problem is, I can't put buttons on it because the invisible button blockes them.Does anyone know an other solution of making my background image scroll like the example site?

View 4 Replies

IDE :: Css Background-image When Using Swfobject?

Aug 4, 2008

Is it possible to target and style the div that swfobject (2.1) creates to display flash content?

Basically I want to be able to set a background image to appear in a header div, and then load a tranparent swf file over the top using swfobject. But swfobject doesnt seem to have any reference to the div that it creates when displaying flash content.. only the alternate content div.

View 3 Replies

IDE :: Background Image Behind Flash?

Sep 28, 2010

i am creating a website for a personal trainer and i am having problems with the white background behind the flash website. how do i change the background colour/image?

View 2 Replies

Full Screen Background Image

Apr 7, 2010

I'm trying to create a website with full screen background images (or possibly, a video) but don't know the best way to approach it. The Die Antwoord site does pretty much what I'm trying to accomplish. I'd also like to know how they can use such high resolution images. If I try to use a high res image, the file size is enormous.I also want to do is to be able to change the background image when a button is clicked. What is the best way to do that with large images? Another site that uses similar technology only with a video is the TV on the Radio site.

View 3 Replies

Professional :: Scrolling Background Image?

Jul 20, 2010

I've got a 800x600 document that has a panoramic picture scrolling horizontally and buttons in the image.
 
i've got this piece of code for AS2.0

[Code]...

Otherwise it is working all good, but I'd like it to stay put at the start. Right now it immidiately starts scrolling to right unless I move the mouse on top to stop it. So ye, i need to have it sitting still and only scroll when the mouse is at the edges of the document.

View 3 Replies

Make A Random Image Background?

May 25, 2011

I have this site[url]... and i want to make a random image background.so it is not always the same image. and at this point i dont need the radio buttons.

View 18 Replies

Put A Fullscreen Image As A Background Using Flash?

Jan 29, 2010

I wonder how you can put a fullsize background image to a website using Flash, similar to how www.zugspitze.de does.I can copy the HTML code but what does the flash document looks like?

View 1 Replies

Css :: Setup A Video As A Background 'image'

Feb 10, 2011

I need to set up a website with a video as the background.

Will I be able to use z-index to position other elements on top of the video? Is there a better alternative?

View 4 Replies

Flash :: Background Image While Is Loading

Feb 18, 2011

It seems that this should be a simple thing but I can't figure it out. I would just like my visitors to see a beautiful, still, jpg image in the space where my flash movie is loading...until it is fully loaded. I tried putting a background image in the cell (using Dreamweaver MX) but once I import the swf file, I can no longer see what's in the background.

When I select the flash movie in MX it only allows me to select a background color, not an image. I know that I can use a preloader of some sort to let people know there is flash content loading but I would rather use the opportunity to show a professional photo. Do I have to set this up the same way a preloader is set up but with a single frame maybe or is there an easier way.

View 2 Replies

Flex :: Set The A Background Image Of A RichTextEditor?

Apr 11, 2011

I have tried setting the background image this way, but it doesn't work. how to set the background image of a rich text control in flex as easy as possible?

.rte{
...
backgroundImage: "assets/globe.jpg";
}

[Code].....

View 3 Replies

Swf :: Size Of Background Image In Flash?

Jun 3, 2011

I have a swf and the background image looks bad in a monitor 1680 x 1050 , it get cutTo define this in flash, I hace to edit my image to this size 1680 x 1050, but in flash How would I define this?. Can it be done in html code?

View 1 Replies

ActionScript 3.0 :: Background Xml Image Slideshow?

May 27, 2010

Im new to as3 and am looking for a similar result toI've had a look around the web but cant find anything (maybeim searching for the wrong thing).

View 1 Replies







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