ActionScript 3.0 :: Flash Scrolling Mc With Dynamicaly Loaded Pictures From Xml
Oct 18, 2011
My AS3 project is devided in to 4 sections.
1.) load XML file directed from php site and store all data to miltidimensional array
2.) load mc from library to stage and scroll it with mouse move
3.) load pictures into previous scrolling mc on calculated coordinates
4.) add event listener to every loaded pic to open new site
here is part of code that's bugging me:
Code:
var polica_mc:libMc = new libMc;
var container_mc:MovieClip;
if (xmlLoaded == true) {
[Code].....
Problem is that pictures are not loaded into polica_mc (scrolling mc) but outside.
View 1 Replies
Similar Posts:
May 19, 2010
I'm trying to get this effect [URL] but, instead of scrolling through pictures from an xml I want it to load one movieclip from the library and pan in and out as shown in the demo.
ActionScript Code:
var xmlURL:URLRequest = new URLRequest("images.xml");
var xmlLoader:URLLoader = new URLLoader();
var xml:XML;
//Declares the image array
var imageArray:Array = new Array();
[Code] .....
I tried to modify this so it would work to my standards, but it doesn't... I don't even get any errors.
View 0 Replies
May 29, 2004
what is the AS for making some text and pictures scroll in with the same scrollbar. is there a component in mx that i could use?
View 1 Replies
Jun 7, 2011
how to make the gallery/pictures stop scrolling 20 or 30px to the right of the webbrowser. I think something has to be added in the end of the code under IMAGES DRAGGING FUNCTION.
This is the page: [URL]
Heres the code for the scroller:
//FUNCTION UPDATE IMAGES SCROLL WHILE PRELOADING
function updateScroll() {
//SCROLL ACTIVE OR NOT
[Code].....
View 2 Replies
Sep 19, 2003
Is it possible to put pictures and buttons and links in a scroll box right alongside the scrolling text?
View 1 Replies
Jun 3, 2008
I'm having two problems. First of all, the gallery loads all pictures at once. The more pictures in the XML file, the slower they all load. Secondly, I wanted the pictures to scroll in its _y coordinate, similar to Sugar Rhyme's website portfolio (see url]...).
View 1 Replies
May 4, 2011
I need to create a flash chart that would take data dynamicaly as in this link [URL]..
View 2 Replies
Dec 6, 2004
I have a text box which dynamically loads the information from a .txt file. I want to scroll the text, with buttons that I have made(not the component scroll bar that comes with Flash MX), up and down through the text I have. I've tried many different scripts, and none seem to work. Is there a good concise walkthrough for this anywhere?
View 7 Replies
Jun 25, 2010
This the the project in a nutshell. The website has inventory that has three pictures for each piece of inventory that's paths are stored in a SQL database. Now when a piece of inventory is clicked it goes to the page that the slideshow will be located. Here is where the 3 pictures will be playing in a loop. The problem is I don't know how I'm going to get to pictures loaded into the .swf. XML is out of the question because I have 143,000 pieces of inventory and I don't want to have that many XML files. Is there a way I can access the database directly and pull the paths from there?
View 4 Replies
Jul 24, 2003
I have a problem. Using loadMovie(); i load jpg file and this picture is not shown. but only if I test it using internet but if i run it from HDD everything is all right.
View 9 Replies
Feb 28, 2010
I have been looking around a bit everywhere, but everything I've tried just don't work.I am looking for a simple way to resize an externally loaded picture in AS2.Exemple:We have 4 movie clips (that we will use as containers), and 4 JPEGs, each with a different pixel resolution. What we need is to first, load these JPEGs into their movie clips (no problem for this part > using loadMovie), but then resize them (once loaded) so that they all have the size they are supposed to be (let say here they are all supposed to have a size of 150x100 pixels).Problem is, I have been trying many ways to resize them, but so far none of them work..._width and _height do not work either since they seem to work proportionally of the original loaded picture (ie. a 640x480 jpeg will not be resized same as a 1280x740, which I think is weird... but well).
View 1 Replies
May 7, 2009
as a part of a bigger project, I'm trying to figure out how a loaded picture can be moved across stage... AND looking smoothly while moving so far, all my tests have ended up looking not very smooth at all!check out my tests here
heres my code:
Code: Select allimport caurina.transitions.Tweener;
var _image:Bitmap;
[code]...
the third picture - the first to be moved - is a picture embedded inside a MovieClip already placed on stage.the second picture - the next to be moved - is a picture loaded into a Loader and then the Loader is placed on stage.the first picture - the last to be moved - ia a picture loaded into a Loader. then the content of the Loader is put into a bitmap, and then the bitmap is placed on stage.
View 5 Replies
Apr 14, 2003
Im making a site where I at the main frame load in a movie at a higher level. In this loaded movie I load in pictures dynamically with a function I use together with setInterval. I feel its a little bit anoying everytime a pic loads because it blinks. Is there maybe a smart way of fading the pictures in and out? I now it takes a lot of computer power using _alpha, and because I load in the pics I cant use tweening.
View 3 Replies
Dec 1, 2009
I have loaded 11 pictures through an array and a loop and then tweenlite'd them so them come on the screen from the right and move across 'til the middle picture is in the middle of the screen.Now, I am trying to figure out how to make it so I can move them to the right or left by a press of a button, (bntLeft and btnRight).Three pictures show on the screen at one time. So if btnRight is clicked then the 3 pictures which are off the screen to the right would come on and center in the screen. And if btnRight was clicked again then the pictures would move to the left and the last picture would come on.I don't know if that is going to make sense to anyone but me so I have created a picture to show what I mean.
View 3 Replies
Aug 2, 2004
This flash gallery is wonderful, however, since I do not know actionscript I need some assistance figuring out where to implement the order in which the pictures are loaded. This code views everything in the images and thumbs directory and loads it. 1, 2, 3, 4, (.jpg)The more pictures we add to the directory, the higher we make the number of the jpg.(51.jpg, 52.jpg, 53.jpg, etc) the number grows.How do we make it so all new images are loaded FIRST on the left and not on the right?I have attached the fla.
View 3 Replies
Oct 13, 2002
Wel I know how to load pictures dynamicly into a MC, but is it also possible to resize te picture?
View 3 Replies
Mar 23, 2004
I am having 2 problems with the following code...
[AS]
picNamesA = ["pic1","pic2","pic3","pic4","pic5","pic6"];
picNamesB = ["pic7","pic8","pic9","pic10","pic11","pic12"];
[code]....
Ok First problem the pics load but the second FOR loop the buttons don't position themselves correctly. Second problem was in the getURL() It doesnt seem to read the variable picNamesA[i], I did a trace as you can see and it outputs "undefined".
View 11 Replies
Jul 18, 2010
I'm having trouble getting my scrollbar to work with dynamically loaded movies inside the movie the scrollbar is attached to.An example of my working scrollbar code with static data and my broken scrollbar with dynamic data can be found here: [URL]
I have a for loop that pulls data from my database, populates a topMovie(contentMain) with 20 subMovies inside it. My scrollbar is attached to topMovie. Once the data is loaded and the topMovie is populated, the scrollFace(not ScrollTrack) dissapears and the dynamic movie is not scrollable.As a test, I populated the topMovie with graphic boxes and no dynamic movies and it scrolls just fine.
Scrollbar code:
Code:
scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
[code]....
View 2 Replies
Nov 4, 2009
I have a simple gallery in my flash website. The gallery is a separate swf which is loaded into the main swf. When I view the gallery swf on its own, the images are crystal clear - but when it's loaded in the main swf, whether on my local drive or on the server, they come up all fuzzy. [URL]...
View 3 Replies
Aug 12, 2004
I have a problem with a caption. When i load a picture, the picture goes in front of the caption. I tried a swapdepths between the 2 mc's but it seems not to work. Here's my code : You can also see the swf online here : [URL]
[Code]...
You'll see that i have also a problem with the pictures loaded. I place the pic ni the middle of the scene, but when i click the button, i can see the picture moving.
View 3 Replies
Oct 15, 2010
how to unload my already populated xml gallery,before loading new content here the functions i want :
following 2 functions will be called by a button :
removes previously placed objects
function clearLoadedPictures():void {[code]....
View 8 Replies
Nov 17, 2009
That said, I would like to alter some of the code to allow the thumbnail scrollbar to begin scrolling once the page has loaded. Here is what the code looks like as it is right now.
[Code]....
View 1 Replies
Dec 27, 2010
In this game I dynamically load 9 random pictures onto the stage. They all start off with maximum blur. The idea is that when the user hears a sentence the pictures gradually lose their blur. The sooner the correct picture is clicked on, the higher the score. My problem is, I can't stop the tween when the user clicks on a picture. I've tried it successfully on a much simpler fla, where the images are already on the stage and not loaded from an external source.
Here's my extracted code - the source fla is way too long to attach.
Actionscript Code:
import mx.transitions.Tween;
import mx.transitions.easing.Strong;
import flash.filters.*;
import mx.controls.Loader;
var totalBlur:Number = 100;//100 is maximum blur,
[Code] .....
View 1 Replies
Apr 25, 2003
I have created a gallery that loads pictures from the server into a movie clip within Flash MX. This works fine. Now I have been asked to take those pictures that load dynamically and allow them to be a static image so that they can be clicked on enabling the user to view them at an enlarged state.Can I create a button that talks to the movie clip allowing the pictures being loaded to pull a pop up window enlarging it?
View 3 Replies
Aug 25, 2002
why the following script is not working?
on (release) {
var set1 = [34, 19, -7];
var set2 = [39, 34, -3];
[code].....
View 2 Replies
Nov 10, 2006
So I'm making a flash proggy that displays member details for a guild dynamicaly (calling their bio info from a database) and was wondering if it's possible to also call an image dynamicaly as well?I know I could setup a PHP function to display a set image for each member, but that obviously means manualy placing in images and having to update the entire program each time I want to change a picture and thats obviously no good .. so is it possible for actionscript to call in images stored OUTSIDE of the flash program?
View 6 Replies
Jan 7, 2005
I have made this:
Main Timeline: _root.produkt = 2
on A Button:
on (release) {
[code].....
View 1 Replies
May 8, 2011
Basicly I'm adding dynamicaly sprites and textfields, which i populate from xml, in for loop. I'm building sort of table, so for every sprite, I'm adding new data in textfields.I've loaded xml and passed data to 2 xmllists, both traced and doing fine... Later on I add data from xmllist to array which then I'm looping in for loop.Problem is that from 1st xmllist, 6 out of 7 textfields are visible, 1 can't be found nowhere :/ from the 2nd xmllist only 1 out of 4 are visible...I've tried everything, tracing them returns that they are visible, on good position, filled with text, contrasted color from background.
PS: here is the part probably causing the problems..
for(mojbroj=0;mojbroj < dohvatiosamih2;mojbroj++){if(mojbroj%2){lista.graphics.beginFill(0xdddddd);lista.graphics.drawRect(150,prenesi+(
[code].....
View 1 Replies
Apr 18, 2006
Is it possible to load libary items from one swf into another?I am trying to load a set of tiles stored in one swf into a tile editor.In the code for the tile editor it adds objects from the libary onto the stage. Is it possible to get the movieclips from another swf?
View 5 Replies
Mar 13, 2008
I'm making a map creator for a tabletop game. The idea is that the map creator would consist of a 48x48 grid and would allow people to drag items onto that grid and save the positional layout of objects like trees and buildings.So I'm working on the very first steps of this and have written the script so far to dynamicaly generate a 48x48 grid and created a test object to be dragged called "follow".
The dynamicaly generated MC draws from the "grid" MC from the library which consists of two layers; the outline of a box and an MC named "grid_bg" which contains a coloured square (set to the same size as the outline). This is all placed into the "container" MC which by default is empty.This part I get working fine.the "follow" mc is set so that it can be dragged on a mouse click.Now the idea is that if a hitTest is run to see if "follow" is in contact with any of the "grid_bg" MC's and if so, run code (i.e. hide or show the grid_bg mc).
This is where I am encountering problems. If I set the hitTest into a layer within the "grid" MC, it only runs the hit test when the movie is first loaded and ignores you dragging and dropping the "follow" mc. If the hitTest is placed into the actions of the "grid_bg" MC and used in conjuction with an IF statement, it seems to act like there is a collision on every box generated.Code to generate the grid:
Code:
//make textboxes
count=2304;
[code].....
View 1 Replies