ActionScript 3.0 :: XML Gallery Using Greensock Loader Class?

Jun 28, 2011

I am finding my way with AS3 but am having difficulty with a gallery project I am trying to put together based on the sample slideshow available on this site.

The problem relates to reading the thumb and image paths in the xml file. The error that is coming back is:

Loading error on ImageLoader 'loader1' (assets/thumbs/): Error #2035: URL Not Found. URL: file:///C|/Documents%20and%20Settings/Alistair.HOME/Desktop/AB%20gallery%20proj/assets/thumbs/

[Code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: XML Gallery Sorting With Loader Class?

Sep 26, 2009

I'm reasonably new to AS3 having made the leap from Flash 8 to CS4 in a single bound. I've been doing okay, but I've stumbled across a bit of an issue:I'm using an XML file to load a gallery of images and information, where a node typically looks like this:

PHP Code:

 <project>  <image>1.jpg</image>   <link>gallery-1</link> - <title>- <![CDATA[ This is image number 1]]>   </title>- <info>- <![CDATA[ Lorem ipsum dolor sit amet, consectetaur adipisicing elit. ]]>   </info>  </project>- <project> 

In AS, once my XML has been parsed, it runs this function:

[AS]
var projectTitles:Array = new Array();
function createProjectClips(list:XMLList):void {

[code]....

This all works fine; I need all of these thumbs loaded and parsed at the same time to show the full gallery. The issue is that, as the images are of varying file sizes they don't load in sequence, and because I can't pass additional parameters through the eventListener, I've apparently got no way to organise the images on screen. So, my images on screen might be in the sequence 1.jpg, 4.jpg, 3.jpg, 2.jpg, but my projectTitles array will say Image 1, Image 2, Image 3, Image 4.

View 6 Replies

ActionScript 3.0 :: Loader Class - Error 1061: "Call To A Possibly Undefined Method Load Through A Reference With Static Type Loader"

Oct 20, 2010

siteLoader.as, Line 23 1061: Call to a possibly undefined method load through a reference with static type Loader.

[Code]....

View 2 Replies

ActionScript 3.0 :: Pre Loader Into Gallery?

Oct 1, 2011

I'm making a flash gallery with a pre loader on the first frame and on the second frame is the content.
 
The pre loader works, and loads up my first gallery image but then I can not proceed to view any more when I click my gallery buttons. Previously without the pre loader the buttons worked fine.

[Code]...

View 1 Replies

IDE :: Positioning Loader, XML, Swfs, Gallery?

May 20, 2009

This is driving me crazy. When I preview in Flash, everything looks fine. When I preview in HTML. Not so much. I've created a gallery using xml and have the code centering (and otherwise positioning) each new loaded item by referencing each ones information.

It seems to have trouble doing this with the first swf and positioning it at 0,0 after I click through the forward/back buttons that swf moves to a different location on the stage. My guess is that the loader height and width get calculated as 0,0 before the image gets loaded, and then screws everything up from there.

import fl.transitions.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.LoaderInfo;

[code]....

View 3 Replies

Flash :: Loader Class Problem Tracing The Swf (document Class)

Oct 12, 2010

I am using the Loader class to load 3 external swfs: sharedTopics.swf (does not have a document class) fonts.swf (document class is FontManager) main.swf (document class is Main) The same loader is used to load all 3 assets.

[Code]...

View 2 Replies

ActionScript 3.0 :: XML Loader - Dynamic Image Gallery

Oct 14, 2008

I'm trying to do a gallery with an XML file. My XML file is organized like that :

<images>
<image chemin="images/Palmares.jpg" titre="Palmares"
commentaire="Chamonix" />
</images>

The picture loader is working well and the text too but it doesn't work so well together. When I'm clicking on a sticker, the picture is load and a text too but it's not the good one.

View 6 Replies

ActionScript 3.0 :: Adding A Pre Loader To An XML Photo Gallery Between The Photos?

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

Professional :: Add A Loader To An Image Gallery Loading Content Using Only Actionscript

Jul 26, 2010

i am loading all thumbs and  images in a container on a single frame using action script..but the  size of the swf becomes 1.2 mb so i want to add a loader to it...the  loader i am trying to add counts the frames but my file has just one  frame so the loader doesnot show up..

here is the script of my  gallery..and the timeline has just one frame...

import mx.transitions.Tween;import  mx.transitions.easing.*;
this.createEmptyMovieClip("container",1);var  imagesNumber:Number = 18;var scrolling:Boolean = true;
for (i=1;  i<=imagesNumber; i++) {container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);myThumb_mc  = container["thumb"+i+"_mc"];if (i==1){    myThumb_mc._x =  (0.0)*myThumb_mc._width;

[Code].....

View 1 Replies

Flash :: Can't Remove All Loaded Children In A Gallery Because Can't Close() A Loader?

Jun 15, 2011

My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. When i load a new album i used a code you posted here: AS3 How to remove previous loadersbut the problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work.Here you can see the working site to see what im talking abouy you have to click on an album, leave before all the pictures load and open up another one.

getImage(dataList[0].file)
function getImage(href:String):void {
var loader:Loader = new Loader();

[code].....

View 3 Replies

ActionScript 3.0 :: Sliding Thumbnail Gallery - Loader Content Drag

Jul 28, 2010

I have a sliding thumbnail gallery which when a thumbnail is clicked loads an external .png into a container with an instance name of mycontainer which I have on the stage in the .fla. Its added like such:
When the Loader's (which I gave an instance name of imgLoader) complete event is called the function onLoaded loads it -like this: mycontainer.addChild(imgLoader);

I also added a mask(stageMask2) to mycontainer which is the same size as the external .png--I then used this code imgLoader.mask=stageMask2; to mask the .png. I did this because I added a zoommc function which enlarges the imgLoader and wanted to keep the visible size of the container the same. I would also like to be able to drag the zoomed image. I don't want to drag mycontainer as it contains the mask and I cant drag the imgLoader as it doesn't have that property--Do I need to put the imgLoader in another container?

Here's the problematic code:
var stageMask2:Sprite = new Sprite();
stageMask2.graphics.beginFill(0x183045,0);
stageMask2.graphics.drawRect(swfX,swfY,604,403);
stageMask2.graphics.endFill();
var closeWin:TextField=new TextField();
[Code] .....

View 9 Replies

ActionScript 3.0 :: Can't Remove All Loaded Children In A Gallery Because Can't Close() A Loader

Jun 15, 2011

0 down vote favorite

This is the code i used in a gallery that loads images sequentally. My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. The problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work. Here you can see the working site www.barbarabritvin.com (to see what im talking about you have to click on an album, leave before all the pictures load and open up another one.

getImage(dataList[0].file)
function getImage(href:String):void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, imageReady);

[code]....

View 1 Replies

ActionScript 3.0 :: Sending Current Sprite To Loader Function For Image Gallery?

Nov 30, 2010

I have set up a functioning xml image gallery with simple left and right arrows. I am now trying to make it an infinite looping gallery swapping the first and last sprites in an array and + and - their x value so they "physically" move in the photos container.

All of this works fine except for the actual loaded image. The xml data, name description, and image to be loaded are set up in one function and all the data is added to the sPhotoSprite (sprite) in this function. This All works perfectly..

A second function is then called to add the current image:

var currentImage:Loader = Loader(evt.target.loader);
then currentSprite.addChild(currentImage); (the sprite is declared at the start)

The problem being that the sPhotosSprite is no longer reference-able. I've tried :

imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, function( evt:Event)
{ imageLoaded( evt, sPhotosSprite )
} );

But this only ever returns the final sprite. The same problem of only ever returning the final sprite occurs when I try setting an external sprite to hold the current sprite in it and then referencing it in the second function.

View 1 Replies

Professional :: How To Install The Greensock Plugin

Nov 17, 2010

I have downloaded the "greensock-as3.zip" extracted it and tried to run the following file to install the plug-in. But it throws an error "Unexpect file format".
 
greensock.swc

View 3 Replies

Flash :: Greensock Library Which Is The Best Option?

Nov 30, 2009

i am new in flash development, i heard that Greensock lib is the best one. But when am trying to download its really confusing. there are a lot of names like

* TweenNano
* TweenLite
* TweenMax
* TimelineLite
* TimelineMax
* Tweening Platform v11

Which is the best or full featured lib.. where do i get the download link for the complete package or. lease guide me if am wrong.

View 6 Replies

Actionscript 3 :: LoaderMax (greensock) Forced GC?

Nov 22, 2011

LoaderMax uses the following function in their DisplayObjectLoader.as class which is under loader/core :

Although they have put the forced GC under a Try/Catch block. Flash Player 11 still manages to crash on it. Any ideas about this?

protected static function _forceGCHandler(event:Event):void {
if (_gcCycles == 0) {
_gcDispatcher.removeEventListener(Event.ENTER_FRAME, _forceGCHandler);
_gcDispatcher = null;

[Code]...

View 2 Replies

ActionScript 3.0 :: Greensock Animation Not Working When Imported

Mar 14, 2012

Using the greensock tween engine I have a little effect going over my button. It works when I publish on my desktop. But stops working when I import the swf into my main swf. It's the scaling e.target, that is not working!

PHP Code:
map.east.buttonMode = true;
map.east.mouseChildren = false;
map.east.addEventListener (MouseEvent.MOUSE_OVER, eastOverHandler);
map.east.addEventListener (MouseEvent.MOUSE_OUT, eastOutHandler);
function eastOverHandler (e:Event):void {
[Code] .....

View 1 Replies

ActionScript 3.0 :: Greensock Split Text Field?

Nov 29, 2011

I have a page I'm developing that has a greensock split text field that I use to animate text. [URL].. I'm using a timer to help control the tween it doesn't work real smoothly.
 
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.text.*;
import com.greensock.text.SplitTextField;

[Code]...

View 2 Replies

ActionScript 3.0 :: Import GreenSock External Classes?

Mar 30, 2012

importing GreenSock external classes into my flash project.

Line 27: import gs.*;
DesktopmyFlashAPPS wittersrczainu witterMainClass.as, Line 271172: Definition gs could not be found. 

[Code].....

View 6 Replies

Actionscript 3 :: Skew Or Change Perspective Using Greensock?

Jul 5, 2010

I want to tween programmatically an image using greensock, but i dont know if it is possible to make it look like the image is 3d.

View 1 Replies

ActionScript 3.0 :: Greensock.easing And Choosing Effect Via XML.?

May 14, 2010

ive got xml file which in:

HTML Code:
<easeType easeType="Bounce.easeInOut"></easeType>

and after xml loaded to flash i set variable which is actually set up in function after starting flash movie to just refresh values of variables:

ActionScript Code:
newEasing = setupXmlList.attribute("easeType");
changeSetup(newEasing);

[Code]......

but there is no any change whichever easing i choose... I think there is some issue with refferencing objects, as from XML there comes String and in the TweenLite constructor i pass a string when i think some specific object is required.

View 3 Replies

Actionscript 3 :: Play Sound At Certain PlayProgress Or VideoTime With Greensock?

Mar 31, 2012

I'm using greensock LoaderMax to load video files and sound files. I've copied as much code as is available to me. A video (s9) is playing and at a certain percentage through the video, I need to play another sound.

[Code]...

View 2 Replies

Actionscript 3 :: Make Tweens Happen At Same Time With Greensock Timelinelite?

Oct 29, 2011

Is it possible to make tweens happen at the same time with Greensock Timelinelite?

I know it could be possible to fake it by putting a negative delay in but that's not very accurate.

View 1 Replies

ActionScript 3.0 :: Pushing And Retrieving Data Into Array / Greensock Loaders

Jul 7, 2011

I want a random image from the xml to be loaded and displayed when gallery is opened, together with gallery thumbs. Then remaining images are to be loaded in the background.

I am having problems pushing and retrieving data from the array that I have set up. The trouble I am have relates to the following code (but I attach a zip with all code and assets).

ActionScript Code:
private function _xmlCompleteHandler(event:LoaderEvent):void {
trace("loading complete");
_slides = [];

[Code].....

View 0 Replies

ActionScript 3.0 :: Using The Loader Class?

Mar 24, 2010

I have created a drop menu, with a nice little transparency. I have also set up the buttons to link to other SWF files and load them into a loader on the page. My problem is that the loader sits above the drop menus, so when you go to click on the menus they drop down behind the loader and you can't see them. Is there away of sending the loader to the back of the flash work? Maybe using a sprite, not that I have had much experience with sprites.

var my_loader:Loader = new Loader();
my_loader.x = 10;
my_loader.y = 40;

[code]....

View 3 Replies

ActionScript 2.0 :: Image Loader Gallery - Put A Timer - Divert To The Next Image Automatically

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

ActionScript 3.0 :: Loader Class + As A Package

Jan 9, 2011

I wanted to design a [relatively] all purpose class to load images and SWF's with a preloader MC and error handler. I made this BUT, when I load the MC I cannot control it. i.e. I load an SWF containing an animated GIF, but I cannot say mc.gotoAndStop();

[Code]...

View 1 Replies

ActionScript 3.0 :: How To Get Loader Class From ProgressEvent

Jan 2, 2011

How can I get Loader class from Progress event.
function loadMovies () {
var ldr:Loader=new Loader()
ldr.load(new URLRequest("test.swf"))
ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,getper)
addChild(ldr)}
function getper (event) {
var info:LoaderInfo=LoaderInfo(event.target)
trace(info.loader)
}loadMovies()

View 4 Replies

ActionScript 3.0 :: Loader Class As Lame?

Sep 14, 2009

my application needs to load an swf into something that looks and acts like a video player. so you can scrub through the parts that are loaded and see the progress of the load. im not using any pre-fab video components, but to make it work i need to know which frames are loaded and i need to be able to skip to them.

1) to know how many frames are loaded (not bytes!) and
2) to be able to skip to a loaded frame before the movie finishes loading.

it seems to me that using the Loader class you can do neither. sure, you can check progress with bytesloaded (not useful to me) but you cant do ANYTHING to the swf, programmatically, until it is fully loaded! am i wrong about this?

[Code]...

if you look at the comments in the code above you see my problem. if i cant see which frames are loaded or skip to them before the movie is finished loading, the user has to wait until the movie is done loading before they can start no navigate and i can't show them a meaningful loading progress bar like they have on video players (bytes doesnt tell me how much "time" is loaded)

am i the only one who thinks its crazy that in flash, which is all about showing content quickly while it loads, you cant do anything with the swf until its complete? am i missing something or is this a real limitation?

View 7 Replies

ActionScript 2.0 :: Memory Leak In The New Loader Class?

Aug 3, 2006

I am making an application where I load a picture from the web at a rate of once per second. When I load a new picture I unload the old one the problem is that the old pictures are never completely erased from memory and the application keeps on consuming more and more memory until I'm guessing it eats all the memory in the cache (I haven't run it for that long yet :))

here is the code: what this does is load a picture when you click the screen, then unloads it when you click the picture. do it a few times and notice that the numbers (which show System.totalMemory) only go up but never go down to their original amount...

Code:

var url:String = "http://www.memorycity.com/shop/MBB/images/GIGABYTE_memory.jpg";
stage.addEventListener(MouseEvent.CLICK,onclick)
var txt:TextField = new TextField()

[code]....

View 1 Replies







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