ActionScript 2.0 :: Loading Variables That Contains Images Into Path
May 2, 2009
I have a quick question about using an XML file to contain the path to something I want to load in Flash. Right now, I have:
this.loadMovie("Images/1.jpg");
I'd like for the word "Images/" to be read from the XML file and I was wondering how I would go about loading the variable that contains "Images/" into the path line in Flash.
View 1 Replies
Similar Posts:
Nov 26, 2006
A short description of my project:
1) Fetching data from mysql
2) Make x numbers of buttons using duplicateMovieClip. (depends on num_rows from db)
3) Set text in buttons from db with dynamic text.
I'm talking about the buttons on the left side here:[URL].. Here's the code-snippet i experience problems with.
[Code]...
If you look a the code above, button0 <- I want that to be something like: button[a].If I do a trace on trace("button"+a), it works perfectly.(returns button0, button1 ... etc)If I make it a variable, var tmp:String = "button"+a;, it will also give me the same result. But if I try to target a mc with path, example tmp.onRollOver = function(){, it will not work.
- button[a].onRollOver doesnt work.
- "button"+a.onRollOver doesn't work.
How can I integrate that a-variable into my path to the newly created mc's?
View 5 Replies
Jul 7, 2005
I am making the following call...
Code:
on (release) {
_root.imopen = "girl1";
_root.girls.imopen.gotoAndPlay("in");
}
And it's not working, it should, of course, be calling
_root.girls.girl1.gotoAndPlay("in");
How to incorporate the variable "imopen" into the path.
View 2 Replies
Apr 27, 2006
If I want to change a set of movieclips that all have the same name except they end in a different number i.e
movieclip1
movieclip2
movieclip3
whats the correct actionscript to refer to a movieclips path in terms of the name plus a numerical variable i.e
movieclip + var
so I can cycle through each one by altering the variable.
something like
var x = 1;
_root."movieclip" + x.othermovieclip.gotoAndPlay(1);
my attempts don't seem to have worked!
View 7 Replies
Nov 3, 2009
i am getting all the images path from XML and adding those thumbnails on my stage using XMl and for loop,
Now i want to perform tweening effects on all of them but if you see my code - it only does effect on the last object instead of doing on all added objects,
How do i make this work, so all thumbnails gets my tweening effect and i can start that effect and stop ,
[Code]...
View 1 Replies
Feb 1, 2010
I having an issue getting the path of an image loaded into my scroll bar. I am using XML.When I click on an image all I get is the instance name. Like instance31 or instance 32 and so on. I can't seem to find away to get the actual image name or trace the path in my click event. Maybe my approach isn't the best or correct. Can someone explain how I can get the information I want
View 11 Replies
Apr 13, 2010
Is it possible to have an image cross the screen slowly on a random path for say 10 seconds, then have another image replace it and go across on another random path? i will have maybe 15 images in toal that I want to do this with!
View 1 Replies
Sep 17, 2010
how to load images from file path rather than URL
[URL]
which after a lot of looking ticked all my boxes for a gallery tutorial, the only problem is that is not finding my images when I change the url location in the tut xml to the root location of my images.
eg " <pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata.jpg</image>" works fine,
" <image>file://cropped files/made/bronze-dress.jpg</image>" doesn't : (
I need to adjust the action script to load a from a root folder?
View 1 Replies
Oct 16, 2004
if i have a text field which is loading text from an external txt file and is HTML enabled, can I use <img> tags to load an image?
View 3 Replies
Oct 16, 2004
if i have a text field which is loading text from an external txt file and is HTML enabled, can I use <img> tags to load an image? If not, is there an equivalent?
View 3 Replies
Apr 26, 2010
<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {};
swfobject.embedSWF("loader.swf", "flash-banner", "920", "320", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
After loading loader.swf I'm getting this error Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
This is folder structure.
loader.swf
main.swf
main.xml
images
1.jpg
2.jpg
3.jpg
View 1 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies
Dec 9, 2005
Explaination: MX 04' Pro Thumbnail Nav. loading images with XML Loader resizes and displays images when users click on Nav. reading XML Problem: Users click Thumbnail Nav. first image gets loaded and loader resizes to image. However the next choice by user on thumbnail click, the second image doesnt get resized in the loader. It goes beyond holder. Here is my code for Thumbnail and Loader:
[Code]....
Now the first image loads fine and the loader sizes to file from XML. However, when users click second choice from Thumbail the loader doesnt resize to new image size. It only gets resized on the first selction or if users click the next or prev. buttons then the images fade correctly but nothing fades back in. Now if they do hit next or prev and then hit a thumbnail option it loads and resizes.
View 1 Replies
Jan 26, 2009
im loading multiple images but how do I make sure the program will start once all images have dispatched a complete event. like make a universal loader for all the other "small loaders" if you understand.
View 1 Replies
May 10, 2010
I was given a file and told to make the xml path an external variable. This is the code I have:
var panelNumber:Number;var xmlLoaderPath:URLLoader = new URLLoader();xmlLoaderPath.addEventListener(Event.COMPLETE,loadXML);xmlLoaderPath.load(new URLRequest("FlashFiles/CP_UnsecuredHomePgDataXMLPath.xml"));function loadXML(e:Event):void{ var myPath:XML; XML.ignoreWhitespace = true; myPath = new XML(e.target.data); var path:String = myPath.path;
[code]....
View 11 Replies
Jan 14, 2009
create a flash viewer, which will load various other flash movies. The viewer will be in the root directory, but the flash movies it will load are a few directories deep. Those movies access various sound clips that are in an audio directory relative to each swf I want to load.
/flashViewer.swf
/myContent/someProgram/program.swf
/myContent/someProgram/audio/sound1.wav
It seems that when I load one of these movies into my viewer, the loaded movie is looking for the sounds in an audio folder in the root directory, and not relative to the swf I loaded. Is there a way to set this? I would rather not have to make the changes in each of my other movies to use the absolute path
View 1 Replies
Jun 20, 2009
I have this code working on a button.
[Code]...
Works great, but there's obviously no path recognized when loading this swf with the button on it, to an empty movie clip on another swf. (ie: _root.container.bio ...)
View 5 Replies
Oct 20, 2009
I need to load dynamically a few images (4-6) so that by clicking on particular image user would invoke particular action. Embedding images solves the problem but at the expense of file size. If I load them dynamically, they lose their ID.
<comps:ExercisesScroller id="scroller" x="300" y="100"
ex1="@Embed(source='assets/Exerc_1.png')"
ex2="@Embed(source='assets/Exerc_2.png')"/>
and so forth this works. But instantiated in CDATA it does not work:
import components.ExercisesSCroller;
private var custScroller:ExercisesScroller;
private function init():void {
[Code].....
View 1 Replies
Mar 7, 2010
Code:
/
|-main.swf
|-game
|-game.swf
|-assets
|-a.jpg
let's say I have a file structure like above, I have game.swf loads resource by relative path like "assets/a.jpg". It runs fine on its own. But when I try to load game.swf from main.swf (using relative path again "game/game.swf") it tries to find a.jpg from "/assets/a.jpg" instead of "/game/assets/a.jpg"
View 2 Replies
Feb 27, 2011
I am having trouble loading an external swf on a server using the absolute path. This external swf uses webcam streams and is loaded in the original swf file using the URL request code. I can load other swfs but just not that one. I have set the permission of the external swf to allow write/read/execute
//Loads the augmented SWF into the main timeline.
var request:URLRequest = new URLRequest("http://www.reminisce.me/files/jz_AR.swf");
var loader:Loader = new Loader()
[code]......
View 1 Replies
Oct 2, 2009
I have an external swf file that I am using for an image gallery utilizing XML.I have a main swf that loads the external swf. Everything works fine locally, however i get nothing when I put it on the server. I have been trying to find the answer and I think it has something to do with the path, its a guess really.So this is how I have it set up. On my main flash time line, I have an empty movie clip with an instance name of loader_mc. When a user clicks on the button for portfolio it stops on the portfolio keyframe and should call the external swf located in the folder Flash. This works when I test it locally, but does not work when I test on server. Here is my exampleThis is my actionscript.
Code:
stop();
_root.loader_mc.loadMovie("Flash/gallery.swf");
[code].....
View 0 Replies
Nov 1, 2009
I am trying to create a flash viewer, which will load various other flash movies. The viewer will be in the root directory, but the flash movies it will load are a few directories deep.
/flashViewer.swf
/myContent/someProgram/program.swf
/myContent/someProgram/audio/sound1.wav
It seems that when I load one of these movies into my viewer, the loaded movie is looking for the sounds in an audio folder in the root directory, and not relative to the swf I loaded. Is there a way to set this? I would rather not have to make the changes in each of my other movies to use the absolute path
View 7 Replies
May 9, 2006
I was following the 'news-ticker tutorial' the other day but couldn't get to work with the embedded font (yes, the embedded font contains these characters).It works great if I'm loading the xml from a local path but the thing with this news-ticker is that the xml-content will be updated as you reload the page (not saved in cache).Therefor the path to the xml-file looks like this
View 3 Replies
Feb 19, 2012
I have typical situation where big loop is loading lots of images and its done asynchronous which make browser to frees during loading and I want to make it synchronous but having big trouble doing it. I found this class synchronous loader and it work great but you cant add mouse event listener to loader. Here is sample code:
[Code]...
View 2 Replies
Apr 1, 2010
I want to have an AS3 app load images from url supplied by the user. But I don't want a malicious user to be able to load an SWF file in place of the image, such as with an altered extension "maliciousSwf.png". Well, not sure how big a security threat that is above and beyond the ability of the hacker to decompile swf, but I think that ideally such behavior should not be allowed.
So, is there any way to prevent this? When people allow users to load images in their Flash apps, do they somehow guard against loading of SWF? Or is this really absolutely no big deal?
View 1 Replies
Nov 15, 2010
How would you defer loading of other graphics on the page until after the images in a Flash gallery's images.xml file are finished loading?Is there any way to detect for this, or would I only be able to check if the flash swf object is finished loading? I'm pretty sure the swf object would be loaded/ready as with document.getElementById('flashobject').onload = function(){}; before the corresponding images have loaded though, instead of after.
View 1 Replies
Mar 23, 2011
I am loading images of different size and then images are scaled and border is drawn for each image as shown in below link,[URL]... I want that border of images to be of the same width and height and for that I need to find out the max width and height size image before loading all the images. Is there any way that I can know the width and height of an image before loading it completely?
View 1 Replies
May 17, 2011
This isse occurs in flash player 10.2 but not in 10.1. Im sorry if my rusty english is making this hard to understand. I have an issue that causes my hair to turn grey. I think it has something to do with security sandbox when accessing file over networks share from http. I have an swf wrapped with swfobject in html on a intranet: [URL] That swf tries to access/stream/load a flv file on a network share unc path:[URL] I get an NetStream.Play.StreamNotFound error when i try to load that flv file. I catn even load an image from that share. The code works fine when accessing files on the same http domain and when locally on my hd.
I've tried both with single and double backslash i the path so that it isnt broken.. cause I noticed that flash removes single back slashes. It actually seem as if I cant access any file on the netwrok drive. So therefore I cant load a policy file (crossdomain) from that network as well. I've added the network path to the Global Security settings panel, I can provide you with more info if you want to.
View 2 Replies
Mar 13, 2012
Is there a way to add paths to the Flash runtime search path for loading files? Say I want to load myXML.xml and its down in /myDir1/myDir2/myXML.xml. Is there any way I can add "/myDir1/myDir2" to the search path so I can just load using the string "myXML.xml" INSTEAD of loading by the full path "/myDir1/myDir2/myXML.xml"? My directory structure will be changing on a semi-regular basis so I can't hard-code the direct path to the file.
View 8 Replies
Jan 18, 2007
is being returned once the onrelease event happens. the loadmovie works fine but I want to remove
[Code]...
View 3 Replies