ActionScript 1/2 :: Loader Not Linking To External Swf Being Loaded
Jul 13, 2010
I am trying to make this website, which has separate files for different screen resolutions. I am using a first.swf file to load the right file, depending on the screen resolution, it goes to a different frame for diff resolutions. There I have placed a loadMovie function.The code for the loader follows the loadMovie call. loadingbar is a movieclip on screen, which presently does nothing.[code]This was displaying nothing, so I replaced the _root.loadMovie with mcholder.loadMovie("filename.swf"). This is not working either, the screen flashes for one second and then disappears. I put a stop(); before the code, and the screen remained, but the movie still did not load.I txt1.text shows 100. meaning percentage did reach hundred, but I am guessing that is for first.swf, and not for the file which is being loaded.
View 3 Replies
Similar Posts:
Oct 15, 2010
I'm hoping to implement a preloader on a main.swf that measures the bytes etc loaded in an external.swf. My two concerns are that 1) this just isn't possible? 2) I can't have multiple preloaders on the main.swf, which I would if I used one for the external .swf. I intend to try and explain this in the best way I can what I have done so far, as I personally feel this is quite a complex task.
Here's the basics:
I have an external .swf file, being loaded, using the following Action Script (3), in what I shall call, main.swf:
//---loader---
var swfLoader:Loader = new Loader();
addChild(swfLoader);
var swfURL:URLRequest = new URLRequest("nameofswftobeloaded.swf");
swfLoader.load(swfURL);
function loadHandler (event:Event){
var thumbsPanel:MovieClip = event.target.content;
addChild(thumbsPanel);
This works fine. The Action Script I use after this simply allows me to control the external .swf from the main .swf so isn't necessary.. I finish the loader, with this:
"swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);"
So, this all works fine. However, as the external .swf contains images, it doesn't load instantly. I therefore need some kind of preloader to show how much of the external .swf is loaded. However, I tried placing this in the external .swf itself and it failed miserably - for some reason it basically didn't preload and the completed phase of the preloader just appeared.
View 1 Replies
Feb 2, 2010
I have a Main.fla (with Main.as as document class) that calls the external SWF (which has its own document class too)
ActionScript Code:
function startLoad() {
mLoader = new Loader();
[Code]....
Another question. Is it possible to do some kind of listener? Example, I call this external swf, and if the user press a button inside this external swf, this button triggers the listener on the Main.as? Something like running an external mini game, and wait for the results/hiscore.
View 0 Replies
Sep 10, 2004
I am trying to pause/play a swf loaded into a loader component.I tried putting it in a mc and contolling it that way but it aint work.
View 1 Replies
Sep 10, 2004
I am trying to pause/play a swf loaded into a loader component.I tried putting it in a mc and contolling it that way but it aint work.
View 1 Replies
Jan 18, 2011
I am a bit stuck here for the past few days. I have a SWF running in Security.LOCAL_TRUSTED sandbox. I can load my JPEGs and simple SWFs without any problems
[Code]....
View 2 Replies
Aug 13, 2009
How to access a loader loaded by a loader
View 4 Replies
Mar 26, 2010
I have the following code which simply loads an external swf, puts it in the right place and should all be hunky dory.This works:
Code:
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest=new URLRequest("foobar.swf");[code].....
to set the dimensions of the loader so the external swf doesn't 'spill over', the result is a blank screen. No matter how high I set those dimensions it just doesn't display anything.
View 4 Replies
Sep 23, 2010
I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?
View 4 Replies
Jul 29, 2009
I have a main "shell" swf which, by clicking several buttons, will load/unload various external swfs into a Placeholder_mc which resides on the main timeline in Shell.swf In the documentation and tutorials I've seen a couple different methods, and I'm not sure I quite understand the difference, or at least the reason you would use one over the other...In the 1st method, you can just add the Loader object using the addChild() method:
Code:
var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);
Placeholder_mc.addChild(myLoader);
This will apparently add myLoader to the display list once it has completely loaded.The 2nd method, you supposedly can add the Loader.content; however, it appears you can only do this once the content has completed loading, so you need to incorporate an event handler with the contentLoaderInfo object:
Code:
var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);
[code]....
What are the pros/cons of adding the entire Loader object, as opposed to the Loader.content and vice versa?
View 7 Replies
Oct 12, 2005
Flash loads items in via xml they all work but when you click on the items there are not linking to the web pages:
My xml Code:
<?xml version="1.0"?>
<images><image>
<path>images/viper1.jpg</path>
<link>[URL]</link>
<caption>Viper 1</caption>
[Code] .....
I just need the link sorted and its done...
View 1 Replies
Aug 15, 2011
The accordion i created works by recreating a single movie clip as the frame/holder for each and every 'tab' the accordion has.Now I want to have seperate links for each 'tab'. which means, at the 1st tab for example, if you click anywhere on the content area, it will take u to page #a.If you go to the 2nd tab, click, it will take u to page #b.
the current flash file has holders in it in order to let it load the xml data. such as the tab titles, content etc. they are also reproduced in AS hence there is only one instance of each in the FLA.I have created an area which is TO BE the "clickable" area on each page. But i do not know what else to do from here...
View 1 Replies
Sep 6, 2011
Website.addEventListener(MouseEvent.CLICK,website);
function website(e:MouseEvent):void
{[code].........
This is what I have so far.It should go to "mysite.com",however when you click the button,it doesn't do anything.I get no syntax errors,
View 3 Replies
Nov 17, 2010
as3 is new for me, but i would like to write a script using loader to load an external swf, and control the external swf. But I find I can't control the swf, because there are no fixed instance name. here is my script.
[Code]...
View 3 Replies
Apr 28, 2010
Anyone knows if there's a way of calling an specific frame or movieclip from a loaded xml file? I have some xml text loaded to my flash site and i want to have a link in this text that when clicked loads a comment form that is in a different frame in the timeline. I've been looking and googling and i havent found any solution to this.
View 1 Replies
Jul 16, 2010
I want my movie to go to a specific location on the basis of whether or not a variable is attached to the swf reference. Kind of trying to control it from the outside...so I've written this in my embed code:
movie.swf?reset=1
and then this AS on the first frame of my movie:
if (reset=1) {
gotoAndStop(3);
}
View 2 Replies
Jun 17, 2009
i am working on a flash website with actionscript 3.0. i am using a scroll pane to view a external swf file that has buttons that move forwards and backwards through the swf. my problem is that when the naviagtion buttons are clicked the page changes but is at the bottom of the scrollpane. i want the verticalPostion = 0 so it starts at the top of the next page but don't know how to do this. this is the code for my
[Code]...
View 9 Replies
Oct 29, 2009
Is there a way to link a button in a swf to a java script. I'm trying to use the "lightbox" java script so that when a user clicks on an image in the swf, a larger image appears on top of the page. Here is what the link looks like in html:
View 3 Replies
Nov 12, 2010
how i can achieve deep linking with the external swf import technique? Im using the "Transitions Between External SWF's" tut from Kirupa but am not able to post a link here since im new. I have created a website that has this functionality between sections and would like to apply the deep linking to it.
View 9 Replies
Apr 25, 2011
I googled it and found that in 2006 someone was trying to do the same exact thing I am and suceeded, but didn't give much detail for a beginner like me to figure out. . I am using xml to call different swf files. What i want to do is create a link in my fla file. Or my xml to call a different swf file into the same page. Pretty much like the main menus do, but I want to create a link to it inside of the text. For instance I have an swf file called members. You click on members on the left it directs you to the members swf file switch on the right. Now that swf page is reading from my xml. At the end of everyone's brief profiles i want to put a link that says more info and it directs to a different swf that has a more indepth profile of that person, but loading in the same window as all my other swf pages of course. The person that did it before said he used actionscript to do this.
View 0 Replies
Jan 17, 2010
I have solved my remote linking from an external html, to specific swf frame problem. But now, as usual another problem has reared its ugly head. I have a button(s) with a spotlight animation effect in the "over state". It works fine on the "home" page, smooth and clean, but when you link to a frame in the timeline, once in that frame the spotlight effect stills shows up when mouseover, but becomes erratic and very jittery.[URL].. Once there, if you click on about, events, or news, and load any of those pages/frames, you should see the spotlight flicker on mouseover on all buttons
View 6 Replies
Jun 22, 2010
Okay so I am building a website in Flash for the first time and I am having some trouble with the code. I have a twitter icon that has an instance name of twitter_home and I need it to link to a twitter page [URL]... The code I pasted below opens up firefox, but does not go to any page. If firefox is already open on my computer...it does nothing.
[Code]...
View 3 Replies
Jan 20, 2012
Here is the script am using to open an external html file from moviclip but it is opening in new tab. How to make it open in the same window?
[Code]...
View 2 Replies
Feb 27, 2012
keyframe one - dialogue / conversation with characters ( then a button is triggered to call an external swf [placed at keyframe two] )keyframe two - the external swf game. i want to put a button that makes you go back to the main timeline once you're done with the game and proceed to keyframe three (that's the problem. i dont know how to declare and make that button work)keyframe three - dialogue / conversation again .
keyframeone [main timeline]
Code:
...
memory_t.addEventListener(MouseEvent.CLICK, recalltraining)
function recalltraining(e:MouseEvent):void{
gotoAndStop(2)
[code]....
View 0 Replies
Apr 28, 2009
I'm making a site right now. First there is an intro and then when one clicks on a button (for choosing your language), a new page should open (.html page made in dreamweaver) in the same window, but I don't know how to do this.
This is my actionscript now (but it doens't work):
[Code].....
View 6 Replies
Aug 4, 2009
I have basic knowledge of Flash and do not know how to link an external image to my Flash document. While flipping through a Flash resource book, my thought is that it's through Actionscript, possibly using URLLoader/URLRequest classes. But I don't understand how to do it. Also, do I use a transparent button as the placeholder for the image/actionscript?
View 2 Replies
Nov 12, 2010
im currently making a quiz with different questions and im trying to link the questions dynamix text to a xml or txt file heres an example for one question:
on my answer timeline i have for the buttons (one frame per question):
stop();//Text Linkquestion.text = question1;
b1.longtext.text = answer11;b2.longtext.text = answer12;b3.longtext.text = answer13;b4.longtext.text = answer14;
Then on my main actions line i have a list with all answers and questions, this is for question one :
[Code]...
how can i put this into a xml or txt and just say from flash, hey heres where you find the text to put onto the buttons?
[URL]
View 3 Replies
Aug 23, 2011
I'm implementing swfaddress in my project, which starts with a main swf with various menus. When a menu item is clicked, it signals a url change, and the url change loads a corresponding external swf. All works swimmingly here. But... what if I wanted to have another menu from within the loaded external swf, and have that have its own loaded external swfs, url change etc, as well? For example, on my home page, there is a menu item called "news".
Once "news" is clicked, the url changes and loads a "news.swf" into a holder on the main swf. Now, in the "news.swf" there is yet another menu, this one with two buttons: one button says "Article 1" and the other "Article 2" and each would signal a URL change and load "article1.swf" and "article2.swf" respectively when clicked. Is there a way to get the menus on the external swf to communicate with the swfaddress that is happening from within the main swf so that every swf has it's own url address and different events triggered by that change? so the url for article 1 would look something like [URL]
View 11 Replies
Nov 5, 2009
I've made a flex 3 app that is sitting on my web server. People will be able to link to this flex app on my web server on their own sites/blogs/forums and so on. Is there any way I can log where a user that clicks on it comes from? Example: the URL to the flex app is [URL] User A links the flex app at his blog at [URL] Then User B comes in to User A's blog and clicks the flex app and finally ends up at my site. Any way I can log User B's click through the flex app?
View 2 Replies
Sep 15, 2009
I am wondering how/if I can link to an external URL within a movie clip. It is easy to create a link that functions within my site, but I am having trouble linking to an independent site.
View 2 Replies