External .swf Files
This is probably a easy question and it will probably register with me when somboby answers. Can you target a certain MC from a seperate swf file. For example I have mainMovie.swf and it loads otherMovie.swf on level 5. Can otherMovie.swf tell mainMovie.swf to gotoAndPlay(); a certain frame in a MC. Hope that made sense.
FlashKit > Flash Help > Flash MX
Posted on: 09-11-2003, 03:27 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Targeting External Files To Text Files In Flash
Gooday all
I am developing a flash site for a movie company and it needs to be 100% dynamic! and must be flash 5 compatible
To put things as simply as I can here goes.
I have a directors page - on this page I have two text fields.
The first text field pulls all the directors names from an external file called directors.html, In this external file I have html hyperlinks which link to each directors bio text (in another external text file), what I want to do is basically target the second text field in flash. i.e. when you are in flash and click one of the directors names his info must appear in the adjacent text field.
you follow?
THIS DOESNT LOOK LIKE A COW!
Loading External Text Files With Links To .swf Files
i am loading a external text file with html links. I would like to know if anyone out there know how to make those links load .swf files, that would work with the levels hierarchy of the original level0 file. I tried passing a variable that would be detected by a movie clip on EnterFrame but no success, maybe I had written something wrong. Loading just the swf file will replace the html page on the browser.
Multiple External Text .txt Files In Different Swf Files
I'm trying to have several external files (txt or html) attached to a several swf flash files, loading in different levels of one main movie, for easy updating.
Example is: loadVariablesNum("ext-track.txt", 0);
This I can do, partly working.
Say you click the button for "about" that loads that flash file (in a layer), it fails to load in the relevant external file (the movie loads just not the external text file).
When you open up the "about.swf" on its own, it loads up the external file no problem. It just fails to do it when I am loading it from the main swf movie file that then loads this in a layer.
I can get all the text files working by putting in all the loadVariable parts in the main movie but I need them put into their relevant swf movies.
Does that make sense?
How do you correct, something to do with layers or targetting? I'm sure it'll be easy for you guys, Actionscript ain't my thing.
Thanks.
FLASH - Flv Files & Importing External Files
Note: this is trying to be done all in Flash... please be patient as I have to explain it...
Here's the scenario... I am currently building a website for a coffee company, and as an introduction to their website, they want to play a short clip of 16 seconds, size 350x250 - fine... The real problem is that I have been asked to make it appear as if it was actual footage on TV - in effect, at super high quality with NO (and I mean, NO) Pixelation... very stringent, but they think I can somehow push the boundaries and work something out!! Also they wish for it to play as soon as the website begins (no chance of preloading!!) - without an option for the user to control the film (as in no play/stop/rew buttons, etc.)
In order to create this, I had to use Final Cut Pro - as this was the only program that passed the 'test' for what was asked... the client has a major issue with the 'fade' to black sections of the film - believing them to look as if they are shimmering (this also being the initial problem with building it directly in Flash). I passed this through all types of compression to achieve the smallest possible file (12MG) - and then from Quick Time Pro - I came up with an immaculate looking, but incredibly large flv file - using the export feature. Total... 82MB, yes MB...
Please note, I am fully aware of compression, but have to iterate this incredible request!!
Rather than attach it to the timeline in Flash, I placed the created FLV file in the same folder and requested on the first line of the timeline - through Actionscript - that it plays the FLV 'progressively'. To my understanding, this file should play whilst not having to load up before hand... (learnt of this from Macromedia website.)
I have seen this method used in a few tutorials, but admittedly the file sizes are approximately 5MB...
After uploading the file (took over an hour), I tested the film and it began to play extremely slow and choppy. After 16 seconds (the expected duration of the clip) the next scene in the timeline began !! The film had actually only progressed about 3 seconds into itself....
I don't think I am necessarily doing much wrong as it is the best solution that I could come up with in terms of keeping the final 'SWF' file to a minimum size so a user will not have to wait it to load up (got Flash files to 24MB - but still too long to load up!!!)
Can anyone think of an alternative method to playing an 82 MB file, or is this just plain ridiculous??
I am at a loss because I am still curious to see if this is actually feasible... if so then maybe you will help me push the boundaries of Internet viewing!!!
ALL comments/suggested will be highly appreciated and definitely considered
Okolom
[F8] External Text Files Wont Load Into External Swf File...
Hi,
I'm making a Flash website in Flash 8 (mac).
Structure: There is 1 main file that loads external SWF files depending on what is clicked on.
One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.
I made that particular SWF on my mums computer running Flash MX 2004. The flash file itself uses the Scrollbar component from MX.
Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.
I've attached the files in question. Its a 200kb ZIP download. Do tell me if you need to know more.
Thanks
Loading External Html Files With External Css Please Help
Hi people,
I'm new to this forum and new to ActionScript. I have not worked on AS1 or AS2 before so I just got started on AS3.
I'm trying to learn ActionScript 3 and I started experimenting with ideas and workinf examples.
What I'm trying to achieve is a website where the content shown is from external HTML files and external CSS.
My code was working up until trying loading the CSS. The error that I'm getting is "Call to a possibly undefined method URLLoader"
here is my code:
ActionScript Code:
import flash.display.MovieClip;
import flash.text.*;
import fl.transitions.*;
import fl.transitions.easing.*;
var bodyTextField:TextField = new TextField();
bodyTextField.x = 50;
bodyTextField.y = 300;
bodyTextField.width = 500;
bodyTextField.multiline = true;
bodyTextField.wordWrap = true;
bodyTextField.autoSize = TextFieldAutoSize.LEFT;
bodyTextField.selectable = false;
var textBox_mc:MovieClip = new MovieClip();
showContent("html_pages/home.html");
function showContent(paraString:String):void
{
var contentPage:String = paraString;
var myURLLoader:URLLoader = new URLLoader();
var myURLRequest:URLRequest = new URLRequest(contentPage);
var myCSSLoader:URLLoader = new URLloader();
var myCSSRequest:URLRequest = new URLRequest("html_pages/demo.css");
myCSSLoader.load(myCSSRequest);
myURLLoader.load(myURLRequest);
//myURLLoader.addEventListener(Event.COMPLETE, dataOK);
myCSSLoader.addEventListener(Event.COMPLETE, dataOK);
function dataOK(myevent:Event):void
{
var css:StyleSheet = new StyleSheet();
css.parseCSS(URLLoader(evt.target).data);
bodyTextField.styleSheet = css;
bodyTextField.htmlText = myURLLoader.data;
textBox_mc.addChild(bodyTextField);
stage.addChild(textBox_mc);
var myTransitionManager:TransitionManager = new TransitionManager(textBox_mc);
myTransitionManager.startTransition({type:Wipe, direction:Transition.IN, duration:0.5, easing:None.easeOut});
}
}
Can someone please have a look and tell me what I'm doing wrong? Thanks.
Loading External Files Within External File
Is there a way to load an external file from within an already loaded external file?
Example:
I want to do a section devoted to blog entries. So, I was wanting to externally load the dated references in one textbox on the right side, and when the user clicks on one date, it loads the referenced text file into the larger box next to it.
Any ideas of how to accomplish this?
Thanks!
bbbco
External Files
Anyone know how to grab (specifying a file name through an ASP-defined variable) an external WAV file and play it through a Flash movie without launching an external media player?
External Files
can I open an external file with a button??using the users defaults..for example I am creating a CD with all my avi, mpg etc. And would like to open the files in my default or the users default veiwer like windows media player or real player..
External Files
can i use an external file to allow limited access to my swf
such as changing "key values" and sounds to play. please
External Files...
ok Now I`am now confused,
What’s the best way to preload multiple external .swf files in sections, showing file size / plus what’s left to download?
Here’s an example. Only loading/showing one process at a time
Loading Site Tables... 57kbs/20kbs to go
Loading Polls… 57kbs/20kbs to go
Loading Site News… 57kbs/20kbs to go
Loading Site Menu… 57kbs/20kbs to go
Loading Site Jukebox… 57kbs/20kbs to go
Anyways, this should move pretty fast depending on the size of the .swf files.
Using External Txt Files
Hi Everyone
I'm new to flash and this forum so not sure if this has been asked in the past. Basically i want to incorporate external txt files into a flash movie. What I am after is the ability to do 2 things with a button or series of buttons that will allow for quick and easy updates without having to go back the source.fla file every time.
1. Generate the text/title on the button from an external txt file
2. Action a link to a specified url that is also in the same or another txt file. rather then having it embedded.
The idea being the one week I may have a button that says for instance, apple and links to http://www.apple.com and the next week the button says hotmail and links to http://www.hotmail.com. All of which is achieved by way of editing text files and not even opening the source file.
Sorry for spelling it out but I just want to be clear, be gentle.
Cheers
Wass
External Files
ok well heres the deal. im making this design where im including external html files into flash for each content page. ive got everything working but...the images in the html code dont seem to be included in the flash movie. so either im doing something wrong, or you cant include external images through flash. the temporary thing im talking about is at http://fokused.com/portal.html - if anyone can help it would be much appreciated. however, if you cannot include the images from the html files, is it possible to instead of include html files in the scrolling area include flash files? then it might work. well, time for bed. hope this gets a response soon .
mike ... heh its a cow
External Files
Hello,
I was just wondering how can I open up an .exe file from flash. I been trying this code and it does nothing.
on (release) {
fscommand("exec", "folder\file.exe");
}
Can I even open a .exe from flash 6? I've accomplished this before in Flash 5 but I don't remember how. Any help would be great.
External Files
Is there anyway to get an external text file to show up in flash
External Files
Hi everyone!
Just a quick question for Flash MX, i need to be able to open an external file from within flash, similar to a GetURL but i need to open a PDF.
The purpose of this is to have a specification sheet avalible on command when a suer if running the flash presentation.
All advice welcome, thanks in advance!
External SWF Files
I've never had the desire to do this before so I haven't the foggiest idea how to go about it.
What I have is a rectangle on my stage which I want to load other SWF files into. Now how do I go about doing this?
External Files
Hi. Can flash show (or load) images in a movir clip (or somewhere else) given a path?
Can it play sounds this way?
For example, I want to display the file 1.jpg, wich is in site/photos folder, inside the movie clip Photos, in keyframe 1, lets say.
If it could be done with ASP, please point me the way
External SWF Files
Help!
I need to be able to load external SWF files into my main interface (ie a gallery etc) when a button is clicked... can anyone point me in the right direciton please?
External SWF Files
Hey,
If anyone could help me out it would be awsome.
I am trying to upload an extrenal swf file to this webite I am designing. Now my problem, I have an external button already loaded on the site; I need that button to target another SWF file and place it in a blank movie clip into the existing flash webpage. I tried a bunch of codes and nothing seems to work, if someone knows a better or easier was of doing this it would be a great help.
Thank you much
External Swf Files?
Hello...
Is there a way to:
From a button, check what swf file is loaded into _level1 and then tell it to gotoAndPlay frame #
I have a feeling I need to use if and else, but I am not sure how to go about it.
Any help would be appreciated.
External .txt Files
this is really lame
just finished my first web site for work, well sort of as im already making loads of changes to it from feedback, should be up and finished in the next few dyas
but most feedback is really positive and good: www.ayshford.com if u want a look.
so here's what i want to do, i've changed most the text in the text fields to be smaller so it can be read easily. What i want to do though is have the headers in bold.
the text is brought in through an external .txt file in notepad. I know there is some sort of coding i can put in to change font and colour and text size etc but cant remeber how to do it. Or is it stupidly simple and you can do it in word and bring that straight in as it appears?
So this is where you lot come in.
Cheers
External .AS Files
I've seen others on the board with the similar problem but no real solution(?)
Using #include Seems simple enough yet I get the following error:
Error: "Classes may only be defined in external ActionScript 2.0 class scripts."
MX 2004
Publish Settings: F7 & ActionScript 2.0
External class, file in same directory as FLA file: "Dog.as"
AS Editor: TextEdit, plain text (Mac)
Class code:
class Dog{
public var psName:String = null;
function Dog(sName:String){
psName = sName
}
}
FLA first frame code:
#include "Box.as"
var o:Box = new Box("Booga");
trace ("name=" + o.psName);
Doesn't happen if I omit the #include statement and the class file is in the same directory as the FLA. Also happens when I try to designate a path to the class file or in Flash's Include directory. Why?
Thanks in advance.
External As Files
I cant figure out how to use external action script files, i can make them and everything, but how do i make my flash movie use it?
Help With External Mp3 Files
Thanx in advance for any help provided.
That said i dont know if this has been covered elsewhere i couldnt find anything so...
I have a simple flash movie of about 20 photos that fade in and out as they load. Now I also have a mp3 file that loads from outside the movie and starts and pauses witht he pictures (done with a pause button).
Heres the problem... the swf file when loaded on its own loads and plays the mp3 file. (this is located in the same directory the swf is in). But when i embed the swf file into a html file/page the mp3 will not load. This happens both locally (my computer) and on a server.
For the life of me i cannot understand why this is happening or not happening as i is, but nothing i have tried has been able to resolve this issue.... i think its just a problem of me making things seem hard then they are so im missing the simple answer.... but any help would be great.
Can't See External Files In Swf
Hi
Really hope someone can help me as I am going crazy!!!
I have used someone else scripting as a template to create a photo gallery. It uses external files, jpgs and stuff and is just actionscript in flash with nothing on the stage.
When I view it as a html page it is fine and works lovely, but if I view it as a swf it doesn't do anything.
I assume this must be to do with the external files but where am I going wrong?
Is it how I am publishing it to dreamweaver that is wrong? I have tried putting it in as a swf in the normal way and no joy.
Can anyone help?
Carly
[F8] External SWF Files
In my master fla I have two active frames on the timeline. Frame 1 and frame two both have external swf files that load into them. After the the first swf file loads and plays I need the time line to go to and play the second frame. I do not know how to write the correct actionscript the will allow the second frame to automatically play once the first external swf file plays. Can anyone help? I attached a snap shot of my timeline for those who found what I said confusing.
[CS3] External SWF Files
Hello people!
I am trying to write the action script for external SWF files for my flash project. It does not work! I'm using Flash CS3. When you first launch the site, it has animation on the main page. As for the drop down button, I wanted to click on the 1st button, it display an external swf file. It does not work. Please help! Needed your advised to make it works. I have attached the flash file. Please take a look and tell me what I did wrong! Thank you in advanced.
PS: I also upload the file the the magaupload as well.
http://www.megaupload.com/?d=HUV1EFHF (4.8MB)
Vince
External .txt Files
is there any way to get from a .txt file on the internet in a dynamic text box?
thanks a bunch if you can help
External .as Files In AS3?
I just started with AS3 yesterday and.. well it's a really off-putting feeling when what you were good at once just isn't working for you. At all. But I guess it'll take some practice. Anyway... How do I load external code into another file?
Should be simple enough, right?
CS3 - How To Use External .as Files?
I'm using Flash CS3 and AS 2.0. I created a separate .as file (test.as) and I have it in a project (test.flp). So is that all I need to do to use this script? Or am I missing something? I published it and the script doesn't seem to be doing anything.
I've never done it like this before... I've always had my scripts on an "actions" layer directly in my .fla file. So, what simple, obvious step am I missing here?
Thx
External SWF Files
I have create an mc from a 380x310 sqaure and called it holder_mc. I want to load external swf files into it. How do I do this?
Flv And External Swf Files
Hi,
Does somebody knows what is happening?
I'm using the mcLoader class to load all my external swf files, everything worket perfectly until I decided to use flvPlayBack on one of those external files. If the player is on my main stage it works great and if I run directly the loaded swf it also works, but now when i run the external swf through the mcLoader the player doesn't appears.
my mcLoader code:
var mcLoader01:MovieClipLoader = new MovieClipLoader();
mcLoader01.loadClip("clientes/targetTrade.swf",mcConatiner);
The flvPlayer should be on the second frame of this targetTrade.swf ("click to watch the video")
thanks,
Peter
External As Files
I find that when I make a change to an external as file, the changes don't take effect in an swf that uses it without republishing the swf. Why is that? What's the use of as files if I have to republish the swf anyways? (aside from separated view and model).
External FLV Files
I'm attempting to do this with the steps found under Flashc CS3 Documentation. My trouble comes when I get to the 8th step (actions panel). My actions panel says "Current selection cannot have actions applied to it."
Any suggestions?
External Files
Is it possible to open an SWF from within a flash document? If so how do you do it...?
Cheers, J
External Files
hi everybody!
I want to load external images on my movies but I want to select the picture
mmmm... this is an example:
when you click on the "FILE" menu and then "OPEN" a dialog box appear asking you to select a file
well thats what I want to do
I hope you understand this and that you could help me!
thanks
External AS Files
Hi,
i have a lot of code, and simply to make it easier to read i have broken it down into lots of different .as files which i then load like this:
#include "chan1.as"
#include "chan2.as"
#include "chan3.as"
is this bad practice? or does it not matter at all?
External AS Files...
I have a body of AS that when applied to a movie clip makes it elastically follow the mouse around the screen, very nice. it looks like this:
ActionScript Code:
onClipEvent (load) { var Mx = 0; var Dx = 0; var My = 0; var Dy = 0; //inertia has to be less then 1 and more than 0 looseness = 0.5; speed = 0.3;}onClipEvent (enterFrame) { Dx = Math.round(-this._x+_root._xmouse); Dy = Math.round(-this._y+_root._ymouse); Mx = Mx*looseness + Dx*speed; My = My*looseness + Dy*speed; this._x += Mx; this._y += My; //trace(Mx);}
What i want to do is turn it into a section of code that can live in an external AS file that can then be called from any point in the massive project that this is going to be used for.
What should the external AS file look like? And what should the code on the MC that is calling it look like?
I have been bumbling with it for a while, and there seems to be a crucial bit of syntax that i am not getting.
Much Appreciated.
External .as Files?
I'm working on a web based Flash game where all files are located on one server, and the main swf file is embedded on a 3d party web site. No problem so far, but after the main movie is embedded on Server 2, how will it be able to access the supporting .as files on Server 1? Would it work to add the URL of Server 1 in the classpath, or does this require a more complicated solution?
External Files
I'm new to Flash as was wondering if it's possible to open or link to external PDF files from Flash? If so, what steps do need to take to get that functional?
Basically, I want to click a button that points to a PDF file and open it when clicked--open it outside of flash that is.
Thanks for the help!
RT
External Files.
Is there any way to open an external .exe file (a flash projector file) from a flash movie? If YES, how?
I don't surf the Internet, I dive right in.
External Txt Files
Hi I'm having problems loading more than one txt file into a movie. Only files called text.txt will load all the other ones wount. I need ten after eachother on a timeline. How do I do this?
AS And External Txt Files.
this may sound stupid ... but how do you find out this ....
well first of all this is what I want to do.
I have this cr#$ and I have this dynamic text on it ... so the program runs and goes on.
I have this txt files with 2 or it could 4 variables that each one contain different Titles for the different sections.
this is how it looks like
Code:
SCREEN TITLES
&info1=Hello World.&
&info2=Im Going to Beat you up until jajajajaja.&
so then I want to try play the first Screen with the first Title (info1) then the program continue and then second title come up and I want to put the next title (info2) and so on.
but I dont want to use different SWF you got my idea. I hope so.
the AS code its the following
Code:
var lv:LoadVars = new LoadVars();
lv.onLoad = function(bSuccess:Boolean) {
var totalTitle:Array;
if(bSuccess) {
for (var i:Number = 0; i<totalTitle; i++) {
t.title_txt.htmlText = lv.info[i];
}
}else {
trace("Failed to load LV");
}
}
lv.load("title.txt");
thanks.
External Files+ Pitures
hi ;-)
well...i got a movie clip using pictures, but i need to change those pictures often...i mean really really often...
i just wonder if i can use external files for the pictures, i already use some external files for the text and it is working fine cani do it whit pictures too??
thx to help me ;-)
External Text Files
hi. i'm having such a problem with this. i've searched and searched and have found nothing. i don't have any idea what is going on here. you can check my site for it:
http://www.botticeli.com
what's happening is to be found in the scrolling text. you'll see it. whenever i enter more text the previous text gets alllll messed up. new lines start in the middle of sentences or the sentences just continue off the screen without wrapping. i started in notepad. then went to textpad (which is pretty neat, anyway) and then opened it in word and set all the carriage returns to show and there are none showing where they seem to be when you look at my site.
i am perplexed.
has anyone else had this problem?
found a solution?
have a solution?
i will send my files if it would help someone figure this out. . .. .in the meantime. . i think i'm going to retype the whole thing in wordpad. . .argh.
loooooooooooooooooooove,
botti
Preloaders For External .swf Files?...please Help
ive got a main movie which loads 15 different swf movies at level 1...ive then got another 15 swf movies which load at level 2. ive created a preloader in a seperate scene for 1 of the movies at level 2 and this works fine. im now trying to duplicate this for the other 14 on level 2 but it doesnt work (even though ive copied the script exactly)
heres the script for the button:
on (release) {
loadMovieNum ("luckybreak/luckybreak_stills.swf", 2);
}
heres the script for the preloader:
ifFrameLoaded ("Scene1", 14) {
gotoAndPlay ("Scene1", 1);
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
am i missing somthing here? i dont understand why it doesnt work if its exactly the same as the one that does?
[Edited by boonos on 09-20-2001 at 11:35 AM]
Opening EXTERNAL FILES...
Aside from using ***********'s JAvi...is there an alternative for opening avi's, mov's, or mpg's in their default players from flash (standalone)?
Would a batch file work?
|