ActionScript 3.0 :: Adding Background Image Using Loader ()
Feb 6, 2009
Am working on a simulation and am running into some trouble. I am attaching what I have so far. (I'm just in beginning stages so it's nothing fancy) What I still need to do is place the main image into the code using this code:
[Code]...
View 2 Replies
Similar Posts:
Feb 23, 2010
I need to create a gallery to load images and display them. This part is fine:
/**
* @variable image_name to store the name of the selected item
*/
private function showimage(evt:Event):void
[Code].....
where imgMain is the id the image component.
But, I need a small twist. A transition image i.e. loading image should be displayed while the the image is being loaded.
View 1 Replies
Nov 3, 2009
I've loaded an image with a loader, and if I add the loader to the stage, all is well, the image looks fine. Although if I add the loader inside a display object container, then the image gets distorted- and on top of that, trying to change the width and height once its in the container doesn't work either.
View 1 Replies
Mar 22, 2011
I added an image background 1900 x 1200 in dreamweaver, which will serve as my background image for my web site. I would like to incorporate my .flv or .swf on top of my background image. Although, when doing so, the .flv or .swf gets placed under the background image and not on top. How do I place the .flv or .swf file on top of my background image in Dreamweaver CS5.
View 2 Replies
Apr 8, 2011
The project I'm working on requires older libraries that extend mx components (such as TitleWindow and TabNavigator), I can't use what I know about Spark skinning directly. However, since the project is being programmed using the default Spark theme (with my modifications on top) rather than the Halo theme, I apparently don't have access to the styles I need (namely backgroundImage and contentBackgroundImage which apparently require Halo to be active). Simply setting Halo to be the theme will break other things, not the least of which my own theme.
Plans are in the works to replace the older libraries or at least patch them better to Flex 4, but as of right now, I need a way to style/skin these components without modifying them directly. It would be ridiculous to be unable to add a background image to a TitleWindow's content area! I've searched the internet high and low all day and tried countless variations of styles, skins, selectors, and combinations thereof with no luck. How to add a background image to the content of a mx TitleWindow while using the Flex 4.1 sdk?!
View 2 Replies
Aug 12, 2009
im working on an image viewer and im loading an image to a loader and then add the loader to the stage.I want the user to be able to drag and drop the image but since it's a loader i dont know how to do it.
I tried
imageLoader.startDrag = true;
imageLoader.content.startDrag = true;
but im getting an error on both.
View 2 Replies
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
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
Aug 19, 2010
I have a xml image gallery and I want to add a simple progress bar component from flash cs5 to the thumbs when they 1st load up in the carousel.
I understand about the progress bar and how it works and I have tried all day to insert the correct code into my project but I just can't seem to get it right. I dont want to use buttons for the progress bar as demonstrated by Republic of Code, I would just like the progress bars to load when thumbs are loading.
I have included below the progress bar AS3 code from the site "republic of code" which I have been learning from. Also below is the code from my xml gallery.
progress bar AS3 code
import fl.controls.ProgressBar;
import fl.controls.Button;
[Code].....
View 3 Replies
Feb 19, 2010
i have created a preloader for my swf file. I want to simply add an image onto the stage whilst another swf is loading. My image is saved in a movieclip called image in the library. How would i add it to the stage and make it stay there whilst it is being loaded. I have tried manually moving it onto the stage but it only stays for 1 frame.
import flash.display.*;
import flash.events.*;
import flash.text.*;
[code].....
View 3 Replies
Aug 17, 2011
i have created a preloader for my swf file. I want to simply add an image onto the stage whilst another swf is loading. My image is saved in a movieclip called image in the library. How would i add it to the stage and make it stay there whilst it is being loaded. I have tried manually moving it onto the stage but it only stays for 1 frame.
import flash.display.*;
import flash.events.*;
import flash.text.*;
[code]....
View 1 Replies
Jan 25, 2010
Is it possible to add the same Loader to many different DisplayObjectContainers?
I'm using a Loader instance to load an image which I would like to place in about 40 different Sprites. Using the addChild function the loader can only be added to one Sprite though. Is there any way around this or do I have to create 40 different loaders also?
Or is there a way to load an image straight into a Sprite without even using the Loader?
View 9 Replies
Oct 26, 2011
How would I make an image I load using AS3's loader class into a button with an event handler on it? Below is what I have started. And below that is my error I get when I click the message.
AS:
//call function that starts loading my image
callButtons();
function callButtons():void {
[code]....
the error I am getting when I click the spanish.png on the stage is: ArgumentError: Error #1063: Argument count mismatch on MyVideoPlayer_CS4_fla::MainTimeline/playSpanish(). Expected 0, got 1.I NEEDED TO ADDED evt:MouseEvent
View 1 Replies
Apr 30, 2010
I have this piece of code to change images. I was trying to figure out how you could put a timer on the code, so if the image has been displayed for say 5 seconds it diverts to the next image automatically? Also if it's not to hard, when it has played to the end to divert to the 1st image.
[Code]...
View 1 Replies
Mar 22, 2011
[code]This script is for a loader image gallery in flash, as part of a class assignment. What happens is that in flash, when I open the swf file, the initial image (images/nair_evanescentautumn.png) will load fine. However, clicking on any thumbnail image (including the exact same images/nair_evanescentautumn.png), will result in an error saying the file cannot be found.I cannot figure out why it is doing this... I've tested it over. Clicking each thumbnail does go to the correct position in the two separate functions. All said full-size image links are in the folder images/, and replacing the initial loader image will load the other images in place of the default one. However, clicking on any thumbnail still results in URL not found, even though everything works correctly.[code]Before anyone asks why I'm putting this kind of content into a flash site, I'm not--this is only for a class assignment. I'm just trying to figure out why my images aren't loading right when I'm only doing the exact same thing in the functions as I am on the other pages.Of note, commissions.swf has the exact same feature, just with swf files loaded instead, and it works perfectly fine. home, traditional, digital, and photography all have the image gallery, and all have the same issue (I only referenced one page because if I can fix one page I should be able to fix all of them).As for the artworks, they are all my fiance's. The website design was built for her, and I used the website design for this project because I didn't want to have to build an entirely new interface design. Since the project also required a gallery, I felt that this interface would work just fine.
View 3 Replies
Apr 2, 2007
im having trouble adding a progressbar components to a loader...all the images load and the progress bars too but the progress bars only change when they reach 100% and they do not disapper either..
View 2 Replies
Jan 14, 2011
I'm loading .JPGs into loaders, setting the alpha of the loaders to .5 and would like to add a ROLL_OVER event to set the alpha to 1 then back to .5 on ROLL_OUT.Here's what I've got so far and it works well.
var ldr1:Loader=new Loader();var url1:URLRequest=new URLRequest("thumbs/1t.jpg");ldr1.contentLoaderInfo.addEventListener(Event.COMPLETE, done1);ldr1.load(url1);
function done1(event:Event):void{ event.target.content.alpha=.5; event.target.content.x=currentX; //currentX & Y are already set event.target.content.y=currentY; addChild(event.target.content); currentX+=event.target.content.width;}
NOW, I'm trying to add the MouseEvent and can't figure out what to add the listener to - the loader or its content?
ldr1.addEventListener(MouseEvent.ROLL_OVER, rollOn); <<<<--- this doesn't work.
ldr1.contentLoaderInfo.addEventListener(MouseEvent.ROLL_OVER, rollOn); <<<<---this doesn't work either.
View 3 Replies
Nov 9, 2009
I have 4 separate photogalleries, they are all swfs called by buttons with UI loaders attached. The problem is when one is called the loader remains on the stage I need to be able to remove any loader on stage BEFORE calling another page weather its a photogallery or not.Easiest explanation is how I used to do it in AS2 example 2 btns /2 load separate swfs into level1 on each btn I would have
unLoadMovie(1)
LoadMovie (xxx.swf) 1
I need to do the same thing in AS3 Also, do I need to use separate loaders or can I use one loader and instance names? Below is the code I have now (btns are in two areas)
main timeline btns (all btns except photogallaries)
stop();
home_btn.addEventListener(MouseEvent.CLICK, onHomeClick);
[code]....
View 0 Replies
Feb 15, 2010
I have made a photogallery in actionscript 3 which uses an .XML file to import pictures. As the user clicks on the displayed image the code loads the next image in the cycle into the display. Now, I would like to add a preloader which displays the loading progress of each image as the user clicks (otherwise there is just a blank area as the image loads). I have made a pre-loader for the main .SWF but I can't figure out how to make it work for the images or how to make a seperate one for the images. The fact is that I am a bit of a muppet when it comes to AS3, and am finding myself getting lost an confused quite easily.
I have attatched the .FLA if that helps any! If not then...
here is the link to the .HTML page that contains the .swf:
[Code]...
View 2 Replies
Mar 22, 2011
I'm developing an ActionScript 3 app for Blackberry PlayBook.
I'm loading an image with flash.display.Loader.
I want to show that image with a 5px black border.
How can I do that?
View 2 Replies
Mar 24, 2012
I'm trying to make a navigation system for my website where each nav item is loaded as an external .swf. I was able to get that functionality in place. The problem is I want to add a preloader for these external swfs as well.
The code I'm working with is this:
var loadedSWF:Loader = null;
/**
* Loads an SWF and adds it to container once complete
* @param file The URL to the SWF to load
[Code].....
View 1 Replies
May 21, 2010
My code:
ActionScript Code:
var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]);
var tloader:Loader = new Loader();[code].....
Works fine (it's in a for loop, ...after the main XML object is loaded)... but this:
ActionScript Code:
var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]);
var tloader:Loader = new Loader();[code].....
Causes those thumbnails to be attached to the masked buttons, but not the new ones.Is there a way to do this without creating another loader object? I want to keep it efficient.
View 3 Replies
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
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
Dec 28, 2009
I want to move my multiple externally loaded images a little each time they are added to the stage along the x axis via the Loader class. It all works - But HOW do I access the added graphic synatically, so i can change its x pos?! Ive tried picLoader.x ... but that's the Loader - NOT the image...??
Code:
private function setPics():void
{
for(var i:int = 0; i < xItems; i++)
[Code].....
View 2 Replies
Mar 6, 2010
I've looked through a couple threads here about reflecting images... but I don't quite understand it. I will include a link to my project thus far: Final Project First of all, ignore the music/mp3 items at the bottom of the stage. Those aren't wired up yet. When you click on a bike image on the right, the reflection image should appear under the image... but it's not quite working out that way, and I've tried a few things. Here's the segment of AS3 code that is giving me trouble:
[Code]....
View 2 Replies
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
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
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
Apr 28, 2011
I have a dynamic text field which is loading images from an external html. This text is named scrollPaneImage and is a child of a movieClip called scrollPaneContent. I then load scrollPaneContent into a scroll pane named scrollPane
When the user interacts with my swf different images are loaded into scrollPaneImage. Since some of the images take a few seconds to load, I'd like there to be a progress loader displayed in the scrollpane.
I have tried adding the progress event listner to the dynamic text, the movie clip and the scrollpane and cannot get it to respond or track the loading.
scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
function reportProgress(e:ProgressEvent):void {
trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
trace("LOADED");
}
View 13 Replies