ActionScript 2.0 :: Call Images Thro' Xml?
Dec 8, 2009have to call images through xml file and I have to place those images in a movie clip. with specified x and y places.
View 1 Replieshave to call images through xml file and I have to place those images in a movie clip. with specified x and y places.
View 1 RepliesOk so here is the situation: i have a swf. in that swf, i have 2 buttons (button_mc and button3_mc).
i'm trying to call different images with shadowbox (image gallery).
For now, one image works FINE:
[Code]...
I have a basic question about a function I am using that is goes against my logic. It is the showImage function that is used to call up xml images:
[Code]...
the problem is specifically coming in this part of the code, I know because if I set it to a number it will load up the corresponding image. However, When currentButtonId is used it causes an error loading the xml. I'm not sure why since I set it a number and it I trace it and it increments fine...
ActionScript Code:
picture.loadMovie(image[currentButtonId], 1);
titletxt.text = header[currentButtonId];
descrip.text = description[currentButtonId];
I'm a newbie to Flash. I'm learning how to create a flash based image gallery. How to call images from a folder to the main stage and animate the image to show for 1 second and the change to the next image as a slideshow in a loop. This is the home page of the gallery.
View 6 RepliesI'll make a gallery of 122 images but I don't want to place each of them on the timeline
or I can't call them, they should be included in the exported .swf or .exe file I guess what I need is something like an actionscript that would call the images imported to the library is that possible or is there a gallery like that?
a SWF that will serve as the main movie for the site. Inside this SWF, I have a script that loads a JPG into a holder MC that's on stage. So basically it's like this:
- main.fla
-- holder_mc (this isn't an empty MC, it has some PNG's inside)
--- external JPG loaded in by loadMovie
I'm ok with building a preloader for the holder_mc and the rest of the FLA (without the size info of the external JPG), but how would I incorporate the size of the external JPG into my initial preloader before I actually start playing everything. Would I have to set the holder_mc visibility to false, call the loadMovie, initiate the preload, and then set visibility back to true. There's gotta be a better way?
I am loading 5 images using "for loop" and I have created the listener and if the images completes the loading, the function is called. Now, I need is the name of the "image" which is loaded on each five images gets completed.
[Code]...
in the output it is throwing as "[object LoaderInfo]". Now i need is the name of the "Image", inside the thumbnail_load function, that means, which image loading is completed.
I am trying to build a flash slideshow that uses XML to call up images and text captions. I 've found a good example of what I am looking for on macromedia's website.found here: http:[url]...
I would like to add the ability to fade between images and have a button that creates a larger jpg version in a popup window for whatever image is being displayed as current in the slideshow.Would I need 2 XML files for this or can I just use one? I prefer one. Sorry I am quite new to XML, this is my first foray into it.I can build this thing w/o XML, but it seems to be so much easier if I did it with XML.
i have some actionscript that makes a
ExternalInterface.call('someFunction');
call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?
Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.
Currently:
Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);
[code]....
I'm trying to use ExternalInterface.Call to call a JavaScript function to launch a lightbox window. So far I have this:
AS3:
flash.external.ExternalInterface.call("launchLB", "" + aUrl + "");
JavaScript:
function launchLB(url) {
alert(url);
[Code]....
I get the alert but I can't get the lightbox window to display. When my as code makes the ExternalInterface call I get what looks like a page refresh and a blank browser window.
I'm trying to get the AS3 Flash remoting example found here: [URL]. and I keep getting this error: Code: Select allError #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion at amfphp1_fla::MainTimeline/frame1() Here's the code I'm trying:
[Code]....
I'm having trouble simulating a click call to a button(displayObject) thats generated via an API call( youtube as3 API). I have not seen any mention of security reasons as to why I can not simulate a click as long as something is registered with a click handler. Basically I checked to make sure the button made is listening to a mouse click event with:
trace(generatedButton.hasEventListener(MouseEvent.CLICK)) which returns true
I proceed to than call this:
generatedButton.dispatchEvent( new MouseEvent(MouseEvent.CLICK, true) );
And nothing happens yet if I physically click the button it works. Is there some security measure that prevents something from being fake clicked unless its origin is strictly from the system mouse?
I even set a timeout call on the click function and moved my cursor over the button and let it fire in case it was an issue of the mouse having to over the object but still nothing. I am kind of stumped at this point.
I have an enterFrame action that I use on a graphic:
[Code]....
Because I want to use the above code more than a few times, I tried to make it a function.
[Code]....
But for some reason the function call does not work when I call it via an action on a graphic where initially the code worked when it was explicitly written and not called as a function.
Code:
onClipEvent (enterFrame) {
fadeOut();
}
why this is not working.I have an application with a new class I just created. The class loads, but will not call it's own internal function.
package com.parkerandkent.components.classic.photogallery {
import caurina.transitions.Tweener;
import flash.display.MovieClip;[code]....
"Test 2" will not fire here.And I get this error message:
CallTag.as , Line 10 1180: Call to a possibly undefined method init.
I need to get a javascript var in my Flash application. I like to be able to just set a variable in the javascript (client constraints) rather than define a function.
Can this be done? I am trying to use the ExternalInterface.call()
AS:
ExternalInterface.call("function(){return window.someVar}", null);
JS:
var someVar = "Test";
This does not work and I suspect it is because the ExternalInterface.call() does not like the anonymous function.
I have a function defined in JavaScript like so:
function fadeBack() {
alert("fadeBack called");
};
I call that function from my Flash file like so:
import flash.external.*;
flash.external.ExternalInterface.call("fadeBack");
This works in both Safari and Chrome, but for some reason Firefox won't ever call the function. Still, I can't figure this out. How can I fix it?
Does anyone know if there is a way to call a dispatchEvent call from inside of a static function?
View 2 RepliesWe have been given some code that does a URLRequest call which is really slow to respond, so I was looking to make it pull the data from the page, as it is already on the page.[code]I have tried to replace it with this (actionscript is definitely not my forte):[code]I am using addCallBack as that is what the editor suggested via autocomplete, unfortunately it doesn't seem to work. Unfortunately I cannot go back to the developer at this time.The error message is:Call to a possibly undefined method addCallback through a reference with static type flash.external:ExternalInterface
View 3 Replieshave a node that has an asfunction embedded - won't work. if I change the a href to a web page- it works fine. If I try to call a custom function it doesn't call it at all.
View 1 RepliesJS-to-AS3 callbacks work in kinda asynchronous way right? So for example if I ask SWF to download some file, which may take some time (depending on the size of that file), and while it downloads it, ask it to do some other operation (suppose SWF has several callbacks for various purposes), what happens in this case? Does SWF continue to download file and handle my second request in a different thread maybe, or it crashes, or throws some error? I know this is a good case for some testing, but I wonder if anyone has already done that, or maybe there is public info on the case that I cannot find?
View 1 RepliesI have an issue with my eventListeners with the URLLoader, but this issue happens in IE, not in FF.
public function getUploadURL():void {
var request:URLRequest = new URLRequest();
request.url = getPath();[code]....
The issue is that my getBaseURL gets executed automatically after I have executed the code at least once, but that is the case only in IE. What happens is I call my getUploadURL, I make sure the server sends an event that will result in an Event.COMPLETE, so the getBaseURL gets executed, and the listener is removed. If I call the getUploadURL method and put the wrong path, I do not get an Event.COMPLETE but some other event, and getBaseURL should not be executed.
That is the correct behavior in FireFox. In IE, it looks like the load() method does not actually call the server, it jumps directly to the getBaseURL() for the Event.COMPLETE. I checked the willTrigger() and hasEventListener() on _loader before assigning the new URLLoader, and it turns out the event has been well removed.
I simplified my code. To sum up quickly: in FireFox it works well, but in IE, the first call will work but the second call won't really call the .load() method; it seems it uses the previously stored result from the first call.
I have a function in Flex which has three function in it.
public function update():void
{
A(); \Dispatches a event with Remote Call
[code].......
I'm trying to call a javascript function from a flash movie. I'm using IE.
This one works:
AS3: ExternalInterface.call("test();");
Javascript:
function test()
[Code].....
...it says "undefined" insted of alert(666)...it seems that if i use a field in the function it simply stops working. (I'm accessing the page [URL]
I have a flash file sitting inside of a web page in our company domain. There is another server (used to store images) that is part of the domain but is not running any web services (for security reasons). A folder on the images server is however shared in such a way that any site on the web server can display images from the images server as long as the user is plugged into the domain. For example, both I and my boss can pull up a web site on the web server and see all the information, but only he can see the images
because I have Vista Basic and no domain support. This is done via "<img src='\serverNamedirectory.'/>"
That's ok, but on this particular instance I don't want to display the image on the webpage, I want it in a SWF on the page. However the SWF can't seem to load the images even though the page it's sitting in could. I've tried tons of variations of URLRequests and Loaders, most resulting in security errors. Since most of the online discussions about these errors revolve around cross-domain access, I can't seem to find any tech support for our specific situation.
i couldn't find a tutorial on this matter so i sorta started making my own hypothesis... what i'm trying to do is: have a gallery of images automatically scrolling horizontally while having the set of images loop. like at[URL]..
here are a couple of my theories and questions for AS commands to have this work:
1) display a range of pixels of an image at certain positions, i.e. if gallery is scrolling to the left, leftmost image when its parts are disappearing out of the viewing area, they become visible at the right.
2) have two instances of each image and when an image is disappearing on left, the second instance of that image comes visible on the right. this I imagine would take up more HD space.
i guess what i was wondering more about is how jager did their gallery where there's only enough images are in a set to be viewed in the viewing area.
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.
I am pulling external images, I have my main image, and five small images, I have that to make the small images when click to appear in the place of the main image, but I am not obtaining to make they to click, I am placing my archive who to want to make download
View 2 Repliesim 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 RepliesThis is my first post as i m just beginner in Flash JavaScript. I want to prepare a FLash Movie in which all the images r dynamic and the images should change after a time say every 30 secs the image changes.
View 1 RepliesIs there a way using flash you can display images but each one selected randomly from say an array of different images?
View 4 Replies