FLVPlayback Separate ServerName From ContentPath
Hi there
Streaming [FCS] & Progressive Video
Using Flash 8 ~ FLVPlayback with standard skins
What I need to do is insert the ~ 'serverName' i.e. rtmp://194.44.176.249 - into the PLVPlayback ~ so when a user selects a video the FLVPlayback will immediately direct itself to the Hosted Streaming Server and then refer to the Object / Embed path in the HTML form for the contentPath [.flv]
Streaming [FCS] So in the FLVPlayback ~ Actionscript we have something like 'whatever action code' - serverName rtmp://194.44.176.249 and my_FLVPlybk.contentPath = file; [which refers to the HTML Object / Emded code ~ for the path to the .flv i.e. file=video/_definst_/movies/selection/onceuponatime.flv
For Progessive Video the rtmp would be replaced by the HTTP serverName [url] then the HTML object / embed refers to the contentPath [.flv] same as above
So the idea is to try and split the servername [which is hard coded into FLVPlayback] and the contentPath [which is dynamic] which I dont know how to do [real novice in actionscript]
FLVPlayback component offers ~ contentPath ~ editing in Flash 8 ~ but that is where I come to a grinding halt
If anyone could help ~ that would be great !!
ActionScript.org Forums > Supporting Technologies > Flash Media Server
Posted on: 07-07-2006, 02:07 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
FLVPlayback Separate ServerName From ContentPath
Hi there
Streaming [FCS] & Progressive Video
Using Flash 8 ~ FLVPlayback with standard skins
What I need to do is insert the ~ 'serverName' i.e. rtmp://194.44.176.249 - into the PLVPlayback ~ so when a user selects a video the FLVPlayback will iimmediately direct itself to the Hosted Streaming Server and then refer to the Object / Embed path in the HTML form for the contentPath [.flv]
Streaming [FCS]
So in the FLVPlayback ~ Actionscript we have something like
'whatever action code' - serverName rtmp://194.44.176.249
and
my_FLVPlybk.contentPath = file; [which refers to the HTML Object / Emded code ~ for the path to the .flv i.e. file=video/_definst_/movies/selection/onceuponatime.flv
For Progessive Video the rtmp would be replaced by the HTTP serverName [URL] then the HTML object / embed refers to the contentPath [.flv] same as above
So the idea is to try and split the servername [which is hard coded into FLVPlayback] and the contentPath [which is dynamic] which I dont know how to do [real novice in actionscript]
FLVPlayback component offers ~ contentPath ~ editing in Flash 8 ~ but that is where I come to a grinding halt
If anyone could help ~ that would be great !!
FLVPlayback ContentPath Problem
Hi!
Supouse a I have a the following folders directory:
/Home
/Home/swf/files/movies/player.swf
/Home/swf/files/movies/myMovie.flv
Inside the Home directory I have an html file with an swf with the FLVPlayback component. The swf is embed in the HTML file using a path like this "/swf/files/movies/player.swf".
Inside the "movies" directory we have also the flv file and the skin of the flv.
The problem is that when we set the conentPath of the FLVPlayback to "myMovie.flv" it just doesn't display the movie. We need to pass the whole relative path like "/swf/files/movies/myMovie.flv" for it to display it.
Is there any way to avoid this and make the swf aware of it context or something like that?
greetings,
Polaco.
[F8] Why Is Targeting The FLVPlayback Component Not Working With .contentPath?
Hey,
I'm using this code to attach a movie that has an FLVPlayback Component in it. I'd Like to add the Content Path when I attach it because the video will change depending on where i attach the movie. My targeting is correct because I can populate a text box. My content is correct because if I put the .contentPath code on teh frame it loads a movie. So Why can't I add it when I load the movie?
thanks
Sample Code:
_root.s1Holder.bullets_mc.bp1.onRelease = function() {
_root.attachMovie("videoPopUp1","videoPopUp",getNe xtHighestDepth());
_root.videoPopUp.myFLVPlayback.contentPath = "video/crane.flv";
_root.videoPopUp.textB.text = "video/crane.flv";
_root.videoPopUp._x = cornerX;
_root.videoPopUp._y = cornerY;
Flash Video Wrong ContentPath - FLVPlayback Pro's Please Help...
Hi Forum
This one is for FLVPlayback experts. I am using flash 8 actionscript 2.
I am getting a connection error (Error 1000) from the FLVPlayback when the contentPath of a Video does'nt exist. Once I try to stop and close the videoplayer (FLVPlayback .closeVideoPlayer()) the whole site freezes and I get this message in the output:
"1000: Unable to make connection to server or to find FLV on server"
I have added a listener for this error. The listener seems to read the state changes but in the end the system again freezes.... is this a bug ? does anyone know of a workaround? or am I doing something wrong?
Any leads or insight is much appreciated.
Thank you
Stephank
Attach Code
//this is the core of my AudioPlayer class
[...]
private function init(){
bhsModel = BhsModel(getModel());
bhsController = new BhsController(bhsModel);
setController(bhsController);
root = InstanceManager.ROOT;
root.createEmptyMovieClip("audioUI",DepthManager.AUDIOPLAYBACK);
root.audioUI._x = ConfigData.STORYPLAYER_AUDIOPLAYER_TOP;
root.audioUI._y = ConfigData.STORYPLAYER_AUDIOPLAYER_LEFT;
root.audioUI._visible = false;
root.audioUI.attachMovie("audioPlayback","playback",DepthManager.AUDIOPLAYBACK,{width:310, height:40});
audioPlayer = root.audioUI.playback.audioPlayer;
InstanceManager.AUDIOPLAYER = audioPlayer;
}
private function destroy(){}
private function initAsset(_pers:Number,_cat:Number,_clip:Number){
addListeners();
loadAudio(_pers,_cat,_clip);
root.audioUI._visible = true;
InstanceManager.BHSCONTROLLER.on_SP_Launched("audioPlayer");
InstanceManager.BHSCONTROLLER.onPageLoaded();
}
private function destroyAsset(){
trace("destroy Video Player Asset");
removeListers();
root.audioUI._visible = false;
audioPlayer.stop();
audioPlayer.closeVideoPlayer();
}
private function loadAudio(_pers:Number,_cat:Number,_clip:Number){
var aPath:String = StoriesData.getAudioClipFile(_pers,_cat,_clip);
audioPlayer.skin = PLAYER_SKIN;
audioPlayer.contentPath = aPath;
}
private function addListeners(){
playerListener = new Object();
playerListener.stateChange = function(eventObject:Object):Void {
if(eventObject.state == FLVPlayback.CONNECTION_ERROR){
eventObject.stop();
eventObject.closeVideoPlayer();
trace("State: " + FLVPlayback.CONNECTION_ERROR);
}else{
trace("New audio state: "+eventObject.state)
}
}
audioPlayer.addEventListener("stateChange", playerListener);
}
private function removeListers(){
audioPlayer.removeEventListener("stateChange", playerListener);
}
[...]
Dynamic FLVPlayback - ContentPath Require Full LOCAL Path?
I just created a 448x380 SWF with the following code:
Code:
import mx.video.*;
this.attachMovie("FLVPlayback", "corp_video", 10, {width:448, height:336, x:0, y:0});
my_FLVPlybk.skin = "SteelExternalAll.swf"
my_FLVPlybk.contentPath = "corp_demo_video.flv";
The FLA/SWF are in the same folder as SteelExternalAll.swf (the skin I copied to the local folder from Flash) and FLV file.
Why doesn't that load a video? The skin partially appears, but the video does not. Hitting "Play" gives a server error, even though I'm testing locally.
Does FLVPlayback need the full MACHINE PATH -- file:////blah blah blah -- to access that local file? You'd think not. Any suggestions are welcome and appreciated.
Thanks,
IronChefMorimoto
Can I Combine Separate Swf's Into One Project To Combining Separate Swf's Into One Pr
I'm working in Flash 5 on a G4 OS 9.2.2 - I need advice - Thanks!
Hey there,
Quick question before continuing on a very large project.
Can I combine separate flash projects or coded swf's into one large Flash final project without making a mess to conserve on space and memory? I would like to leave all my library elements behind as it's taking up too much space.
At the moment, my project is too large to work on - I have too many items in the library, so I'm in the pocess of separating it into individual projects respectively.
What's a good way of attacking this problem? At the moment - I have in 6 different "scenes" using the Flash default (new scene) with approximately 12-17 layers in each scenewhich totals 65 separate screens the player can choose that are linked with gotoAndPlay frame # action. I want to get rid of tweened animations and use script instead in my movies but I'm having difficulty since all is not the root level.
What do you think - your seasoned techno opinion is desparately needed.
Thanks,
Bluevenus
ContentPath With Jpg Or Gif
Hi all,
I'd like to use the Loader component to load external images found in different directories. But the problem is that some images may be jpg, and some gif. I tried to use the following code, but that doesn't work.
Any help??
Quote:
mainImg.contentPath = ("images/" + sectionChange + "/" + picNumber + ".jpg" || "images/" + sectionChange + "/" + picNumber + ".gif");
Contentpath ?
i have a new windows server dedicated to flash server 2.0
do any of the experts know what the EXACT path that would be placed in the contentpath field to be able to stream a video?
so far with a test, i have only been able to view a AVESQ14swf and test.html file ONLY on the server by installing flash 8 on the server and by using the contentpath of:
C:Program FilesMacromediaFlash Media Server 2applicationvideostreams\_definst_AVESQ14.flv
from a web browser on my local machine the test.html and AVESQ14.swf will not load and I realize this because the contentpath is not correct, and should be something as:
rtmp://66.235.194.204/video/streams/_definst_/AVSEQ14.flv
the problem is i have tried every possible combination known to man, rtmp:/ with one slash, two slashes, localhost, ip address, path this and path that for three days and can not get the swf or html to load locally on my machine at home.
to test, i have uploaded a different .swf file (progressive download config) that was placed on the webserver just to make sure this new windows server and was able to view it in flash player, therefore this windows webserver is able to deliver .swf files and the problem must be the contentpath.
and suggestions appreciated, what this EXACT setting should be, or if i'm missing something
Help, i'm going bonkers !!
Edited: 11/30/2006 at 04:39:42 AM by barfine
ContentPath Problem
i have a main movie that loads a swf which has a library of exported movieclips.
my main movie then sets the contentPath of a scrollpane to one of those exported movieclips (ie, contentPath=linkageID)
this doesn't seem to be working. Has anyone ever successfully done this?
FLV ContentPath=variable
We are working on a new website located at http://iuvodesign.com/clients/stephen_blackman/ . If you click on "Work" in the menu at the bottom you will get a list of commercials. Clicking on on, eg AOL, sets contentPath for the FLVPlayback component to movs/aol.flv. But if you click on several really fast the player breaks.
Is there anyway to fix this issue?
Scrollpane.contentPath
It doesnt work at all.
scrollpane.contentPath = "folder/file.jpg";
This works, but doesnt exactly help (the loadbytes stuff wont update after the first has been loaded in and on(complete) wont reconize that something actually be loaded in).
scrollpane.loadScrollContent("folder/file.jpg");
If anyone can explain why it doesn't work or even agree with me that it doesnt work it would help a ton.
Send ContentPath To PHP
Hi,
I have a question, how can i send the contentPath from a scroller to a php file? The scroller has the instance name of ImagePane. I want to publish that contentPath to a txt file using php. could somebody help me?
Scrollpane ContentPath
How can one load a movie with action script into a MovieClip and then display it too a scrollpane.
If you load a movie into the library then u just export it for actionscript, But what if you want to load a movie in action script.
ActionScript Code:
createEmptyMovieClip("mymovie", getNextHighestDepth());
mymovie.loadMovie("testbutton.swf");
myscrollpane.contentPath = "mymovie";
That is not working for me, any ideas as to what I am doing wrong? It tries to load "mymovie" from disk.
ContentPath Subfolder
Last edited by conspirisi : 2006-02-09 at 03:53.
I've got a preloader in the top level of a folder and some swfs in subfolders. Can I use contentPath to load a swf in a subfolder?
The official blurb is below:
'......If you are using Flash Player or test-movie mode in Flash, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive information.'
are they saying I can't use a directory structure, and swfs to be loaded must be in the same directory as the parent movie?
Scrollpane & ContentPath
Hi guys,
I'm having a problem with the mx 2004 scrollpane component. I have a scrollpane on the main stage which is supposed to
dynamically load the content of 8 or so movies from the library. The actionscript Macromedia says to use is:
scrollpaneInstanceName.contentPath = "movieClip_Name";
but this gives nothing, nada, zip. I have tried using:
my_Btn.onRelease = function() {
scrollpaneInstanceName.contentPath = "myMovie_MC";
}
on frame 1 of the main timeline to no avail.
I have also tried the same code within the button:
on(release) {
scrollpaneInstanceName.contentPath = "myMovie_MC";
}
can anyone shed any light on why this isnt working correctly? All instance names have been checked and triple checked.
regards
shaolin
FLV Playback Component & Contentpath
I have an flvplayer component. I have buttons that change the content path of the player to play different songs. The FLV Playback component is called "player". This is the button code:
Code:
on(release) {
this.playerTitles._alpha = 100;
this.player.contentPath = "http://www.twentytwelverecords.com/fragments.flv";
}
My problem is that after I switch between a few songs I can't pause the current track or press another button to load another song. Anyone know how to fix it? You can see what I mean at http://www.twentytwelverecords.com/2..._PROGRESS.html under Media >> Music.
Thanks in advance!!
ContentPath/complete And Subdomains
Hi everyone,
I seem to have run into a problem with the "complete" event. What I am working on will have the user watch a movie and then when it is done playing the root timeline goes to frame 2. It works perfectly fine when typing in the full address (like in the help file example:http://www.helpexamples.com/flash/video/water.flv) but not when it comes from a subdomain or relative path (example: http://mysub.domain.com/intro_video.flv). Any help would be greatly appreciated!
p.s: "video_id" is a flash var. I tried it without using the flashvar and typing in the path myself and it didn't help.
ActionScript Code:
import mx.video.*;
intro.contentPath = video_id+"/intro_movie.flv";
var listenerObject:Object = new Object();
// listen for complete event;
listenerObject.complete = function(eventObject:Object):Void {
_root.gotoAndPlay(2);
};
intro.addEventListener("complete", listenerObject);
Resetting Loader's ContentPath
Help!
I have spent hours trying to figure this out.
I have an externally-loaded class which contains a function which reloads certain variables when the user selects a new language. Everything works fine with this class except one thing:
There is a contact page with an image file of their business card. The business card has different languages, so when the language is changed, we want to reload the image file in the Loader component. I simply cannot get this to work.
Here is the current code:
Code:
private function changeLanguage(eventObj:Object): Void {
var langNew:String = eventObj.target.data;
var user_so:SharedObject = SharedObject.getLocal("langPref", '/');
user_so.data.lang = langNew;
user_so.flush();
// omitting other functions which work OK
var myData5:LoadVars = new LoadVars();
myData5.onData = function(src:String) {
_root.contactPageContentMC.busCardMC.pic1loader.contentPath = src;
}
var path:String = 'jpg/ILVAZBC_'+langNew+'.jpg';
myData5.load(path);
_root.contactPageContentMC.busCardMC.pic1loader.contentPath = path;
_root.gotoAndPlay('start');
}
The path does not get passed into the 'onData' function. I put a trace in there for 'src' and it has no value.
I also tried just doing a straightforward statement to simply set the contentPath:
Code:
var path:String = 'jpg/ILVAZBC_'+langNew+'.jpg';
_root.contactPageContentMC.busCardMC.pic1loader.contentPath = path;
I also tried setting the contentPath in the frame named 'start', which is where the .swf 'rewinds' to when the language is changed. Again, nothing.
I have checked to be sure I have the correct path to the loader, about a dozen times.
Obviously, I am not going to figure this out on my own!
Thx in advance.
ContentPath Not Relative To HTML
OK, this is my problem:
I have my flv video player at this location: /scripts/mediaplayer.swf.
My HTML that embeds the player is here: /courses/english1/page.html as well as my .flv file.
I use swfobject.js to embed the swf and I use addVariable to pass the path to the .flv file but it is a relative path, let's say: images/video.flv. I have many courses so I need one place for my mediaplayer.swf file but many different .flv files & html files that embed it. For instance, imagine there being many course directories: /courses/english2, /courses/math1, etc... trust me there are a lot and each one has many videos. Unfortunately, when I set videoplayer.contentPath in my actionscript and pass it "images/video.flv" I get a 404 error on my server that says it can't find "/scripts/images/video.flv". Somehow the contentPath gets set relative to the .swf file and not the HTML the .swf file was embedded in. How can I change it so that it always looks relative to the HTML location? In my opinion, it should always be relative to the html the .swf was embedded in and not the .swf's actual location.
Help Setting ContentPath To A Variable
I am using Flash CS3 to build a website. The content for each page is encapsulated in a movie symbol. Therefore, as you click on the nav of the site the corresponding movie symbol will display.
Each movie symbol is pulling in extrenal content. The text areas are working perfectly. Using an HTML file, I am assigning variables to the external text. Then I use the properties GUI to assign each text area the corresponding variable.
However, I am having a problem with the Loader component. In the same HTML file, I am assigning a variable to the path of each external image I want to use. Using the GUI, I am trying to assign this variable to ContentPath in the component parameters. On the parameters tab, I am setting ContentPath to: _root.page1_tphoto01
It is not working. I can only get it to work by hard coding the ContentPath to the image's physical path. Can someone please help a brother out?
My_FLVPlybk.contentPath - Loading URL From DB With ASP
Can someone point me in the right direction here? I am trying to use the FLV Playback component to load FLV's dynamiclly into the flash movie.
What I have is a asp page with a Recordset pulling the URL from the DB into the page using Dreamweaver. This is all fine.
Now I have one instance of the FLVPlayback on the stage with flash
I am trying to load the url for the FLV file into the movie, via ASP, MsSQL and a url parameter. What I am trying to accomplish is to have a link on a page with a url that will open a popup window. In this window I will have the Flash file that will load the FLV based on the URL, and play it.
Any help is appreciated.
Thanks in advanced
Scroll Pane Contentpath
how would you set a scroll panes content path from a button that is within a MC and the MC exists in multiple scenes, only one of which has the scrollpane? (hope that made sense)
thankz
Loader.contentPath From External Txt?
hey guys im trying to set my loaders contentPath from an external txt file.
can some one please check out my small fla and see if they can do anything...
Code:
loadText = new loadVar();
loadText.load("linkage.txt");
loadText.onLoad = function(success) {
if (success) {
this.loader1.contentPath = this.Path01;
}
};
FLA Here
Window Component And ContentPath
I have several window components that slide onto the stage with user click. I have been able to get 1 component to load in the widow. A text area that takes up the whole window. But the rest will contain forms, several input text fields, combo boxes, ect. that will affect clips on the stage. How do I get more than one text field into the window? This may be a bonehead question, but I have searched a couple forums and haven't found anything. Anyway, thanks in advance.
Chris
ContentPath/complete And Subdomains
Hi everyone,
I seem to have run into a problem with the "complete" event. What I am working on will have the user watch a movie and then when it is done playing the root timeline goes to frame 2. It works perfectly fine when typing in the full address (like in the help file example:http://www.helpexamples.com/flash/video/water.flv) but not when it comes from a subdomain or relative path (example: http://mysub.domain.com/intro_video.flv). Any help would be greatly appreciated!
p.s: "video_id" is a flash var. I tried it without using the flashvar and typing in the path myself and it didn't help.
Code:
import mx.video.*;
intro.contentPath = video_id+"/intro_movie.flv";
var listenerObject:Object = new Object();
// listen for complete event;
listenerObject.complete = function(eventObject:Object):Void {
_root.gotoAndPlay(2);
};
intro.addEventListener("complete", listenerObject);
Scroll Pane Contentpath
how would you set a scroll panes content path from a button that is within a MC and the MC exists in multiple scenes, only one of which has the scrollpane? (hope that made sense)
thankz
Changing The Contentpath While Buffering FLV
Hi, I have a website that load different flvs into one player.
http://ubco.tv/frontend.html
if you change the movie, (by clicking on a movie or channel) while its buffering it stops responding to anything.
any help would be great thank you
its flash 8
FLV: SMIL As ContentPath Issue
Hi,
I've been playing around with progressively streaming some FLV’s using the standard FVLplayback component bundled with flash 8.
The idea is for the viewer to be able see an flv that is suitable for their bandwidth, for example if they have a connection of at leased 300 Kbps then they would view “file_300.flvâ€Â.
The bandwidth detection part is complete thanks to the excellent tutorial by Hayden Porter (which can be seen here: http://www.sonify.org/home/feature/remi ... page2.html )
The detected bandwidth is then converted into kbps and stored in a global variable “bwâ€Â.
Here’s the code:
Code:
onClipEvent(load){
/*
Calculate approximate kbps after test swf loads
*/
function getkbps(startTime,sizeInBytes) {
elapsedTimeMS = getTimer() - startTime; // time elapsed since start loading swf
elapsedTime = elapsedTimeMS/1000; //convert to seconds
sizeInBits = sizeInBytes * 8; // convert Bytes to bits,
sizeInKBits = sizeInBits/1024; // convert bits to kbits
kbps = (sizeInKBits/elapsedTime) * 0.93 ; // IP packet header overhead around 7%
return Math.floor(kbps); // return user friendly number
}
/*
Load test.swf with a unique time to work around browser caching.
Browser will always load a new copy of SWF because url is different each time.
*/
now = new Date(); // create date object
nocacheStr = "?" + now.getTime();
this.loadMovie("test.swf");
}
onClipEvent(enterFrame){
// do not execute code until SWF begins to load
if(this._url != _root._url){
if(typeof start == "undefined") {start = getTimer();} // set start time once
if(this.getBytesLoaded() < this.getBytesTotal()){ // not yet loaded
_root.statusmsg = "Checking Bandwidth";
//------ checking bandwidth message true------
}
// swf loaded call getkbps()
if(this.getBytesLoaded() == this.getBytesTotal()){
_global.bw = getkbps(start,this.getBytesTotal());
_root.statusmsg = "Bandwidth = " + getkbps(start,this.getBytesTotal()) + " kbps";
_root.gotoAndStop('bw_done');
}
}
}
next that figure determines the flvPlayback system bitrate:
Code:
flvPlayer.bitrate = bw;
trace(flvPlayer.bitrate);
I’m tracing it to check a number is being returned.
Finally I’m using an smil file to decide which flv to play based on the bitrate, I’ve linked this directly into the component contentPath as I have some actionscript cue points I’d like to use. I’ve traced and tested the path’s and the smil is being loaded ok.
Here’s the smil file:
Code:
<smil>
<head>
<meta base="http://xx.xxx.x.xx/flv/"/>
</head>
<body>
<switch>
<video src="450.flv"system-bitrate="450000"/>
<video src="300.flv"system-bitrate="300000"/>
<video src="150.flv"/>
</switch>
</body>
</smil>
(I’ve omitted the server address for privacy)
I’ve also looked at the live doc’s on smil’s and bitrate, they’re here:
livedocs.adobe.com/flash/8/main/00003525.html – bitrate
livedocs.adobe.com/flash/8/main/00003646.html – smil file
and after all that, its still not working! Only the top flv (450.flv) will play regardless of the bw number, has anyone got any ideas?
The only other similar topic I could find is here:
http://www.gotoandlearn.com/forum/viewt ... light=smil
I’ve also tried converting the bw number using if statements to make it only “450000†or “350000†or “0†to keep the outcome exactly in line with the smil switches, but to no avail.
For example:
Code:
function innit () {
if(bw >= 380){
trace("----_high 398 chosen ------");
passBitrate= 450000;
gotoAndStop('play');
_root.statusmsg2 = "_high" + " --- " + chosenFlv;
} else if( bw <379 && bw >=228) {
trace("----_med 228 chosen ------");
passBitrate = 300000;
gotoAndStop('play');
_root.statusmsg2 = "med" + " --- " + chosenFlv;
} else {
trace("----_low 132 chosen ------");
passBitrate = 20000;
gotoAndStop('play');
_root.statusmsg2 = "low" + " --- " + chosenFlv;
}
}
innit ();
trace(passBitrate);
flvPlayer.bitrate = passBitrate;
Any thoughts?
Contentpath In Screen Swf: Wrong Position
I made a screen (slides) based document which was very slow loading (size more than 4 MB...)
So I emptied all slides an made external swfs that are to load in the slide by contentpath.
My problem is that the external swfs do not place correctly and this ONLY in Internet Explorer (Mac)
Actually sometimes they come in the correct position and sometimes not. After reloading the page they are always in incorrect position ( http://roswa.free.fr )
I tried everything, nothing seems to influence the positionning.
Does anyone know what this could be ???
[F8] Contentpath Error For Loader Component
I put my video name. yuna and koki.flv in contentpath for loader component. and I drag progressBar. But it appear error.
Where should I save flv video? I saved in my document/web.
Should I setup something before creating FLA document???
Help Setting ContentPath For A Component To A Variable
I am using Flash CS3 to build a website. The content for each page is encapsulated in a movie symbol. Therefore, as you click on the nav of the site the corresponding movie symbol will display.
Each movie symbol is pulling in extrenal content. The text areas are working perfectly. Using an HTML file, I am assigning variables to the external text. Then I use the properties GUI to assign each text area the corresponding variable.
However, I am having a problem with the Loader component. In the same HTML file, I am assigning a variable to the path of each external image I want to use. Using the GUI, I am trying to assign this variable to ContentPath in the component parameters. On the parameters tab, I am setting ContentPath to: _root.page1_tphoto01
It is not working. I can only get it to work by hard coding the ContentPath to the image's physical path. Can someone please help a brother out?
FLVPlayer Dies When ContentPath Changed
I've written a player application which happily streams from FMS2 using an FLVPlayer component.
However, when the time comes to display a new video, and I set the contentPath property, the player changes state to "connectionError" and pretty much refuses to do anything after that. Dead.
Any ideas on what I might be doing wrong or how to work around it?
CreateEmptyMovieClip, CreateTextField As ScrollPane ContentPath
I'm trying to add textfields to a movieclip, then use it as the contentPath on a ScrollPane.
How do you dynamically alter a movieclip that doesn't have an instance (resides only in the library)?
I've also tried creating an empty movieclip, adding a textfield then setting the contentPath:
createEmptyMovieClip("scollPaneContent_mc", 1);
var myTextField:TextField = spContent_mc.createTextField("myTextField", 1, 0, 0, 150, 20);
myTextField.text = "Hello World";
myScrollPane.contentPath = "scollPaneContent_mc";
This code throws: Error opening URL "file:///D|/SD%5FWeb%5FNew/scrollPaneContent_mc"
If I have an empty movieclip in the library named scrollPaneContent_mc, there is no error, but there is no textfield added either.
Thanks,
Carl
CreateEmptyMovieClip, CreateTextField As ScrollPane ContentPath
I'm trying to add textfields to a movieclip, then use it as the contentPath on a ScrollPane.
How do you dynamically alter a movieclip that doesn't have an instance (resides only in the library)?
I've also tried creating an empty movieclip, adding a textfield then setting the contentPath:
createEmptyMovieClip("scollPaneContent_mc", 1);
var myTextField:TextField = spContent_mc.createTextField("myTextField", 1, 0, 0, 150, 20);
myTextField.text = "Hello World";
myScrollPane.contentPath = "scollPaneContent_mc";
This code throws: Error opening URL "file:///D|/SD%5FWeb%5FNew/scrollPaneContent_mc"
If I have an empty movieclip in the library named scrollPaneContent_mc, there is no error, but there is no textfield added either.
Thanks,
Carl
Loader ContentPath: How Can I Use A Relative Path?
Hey, I'm using a loader to dynamically load images, but I'm having problems with the syntax for the contentPath. Sometimes this works locally:
"file:///images/hd_services.jpg"
but sometimes it can't locate the file, so I use the full path, but now that I need to have this thing on the live server, I can't figure out the correct syntax to use a relative file path. What gives? Any ideas?
Thanks!
Feeding ContentPath To A MediaPlayback Component
Well here is my idea: i have a page where i would want to open a new window when i press an icon next to the song title and have a MediaPlayback Flash component to play that song.
A standalone MP3 is not OK..has to be either incorporated (only playing part) into the choosing page or the way im trying to do.
Something with the overall design...
So..is there a way to feed the component contentPath to the song when i click on the icon? Maybe via PHP and loadVars? Ive tried something like this already but didnt work. Although in worst case scenario ill just create a swf file for each MP3
This is what i tried though:
the code i put on mediaPlayback
Code:
on(load){
var dataIn = new LoadVars();
dataIn.onLoad = function(){
var conPath = this.komad;
player.contentPath = conPath; //player is an instance name of MediaPlayback component on Stage
}
dataIn.load("peeppop.php");
}
in php
Code:
<a href="#" onclick="
<?php
echo '&komad = music/01.mp3&';
?>
"><img src="images/zvocnik.gif" /></a>
CreateEmptyMovieClip, CreateTextField As ContentPath For A ScrollPane
I'm trying to add textfields to a movieclip, then use it as the contentPath on a ScrollPane.
I've also tried creating an empty movieclip symbol (no instance), adding a textfield then setting the contentPath:
Code:
createEmptyMovieClip("scollPaneContent_mc", 1);
var myTextField:TextField = scollPaneContent_mc.createTextField("myTextField", 1, 0, 0, 150, 20);
myTextField.text = "Hello World";
myScrollPane.contentPath = "scollPaneContent_mc";
This code throws: Error opening URL "file:///D|/SD%5FWeb%5FNew/scrollPaneContent_mc"
If I have an empty movieclip in the library named scrollPaneContent_mc, there is no error, but there is no textfield added either.
Thanks,
Carl
Contentpath AS Problem With Scrollpane Component
(I posted this in compenent
section also but since this will prob take some AS to make it work I thought I would try posting it here too)
I have setup a scrollpane that is in a .swf file called artisthold.swf that contains a component that loads into the scrollpane a .swf file called artists.swf.
When I publish a preview of artisthold.swf it works fine and the content (artists.swf) gets loaded in and it looks/works exactly like I want it to.
Now here is my problem. I have another movie clip that I want to load artisthold.swf into which the hierarchy of that is basically setup as _root.cliphold --- I am loading artisthold.swf into _root.cliphold and when I do that the scrollpane is blank and artists.swf does not get loaded into the scrollpane area. I see the scrollpane but its content is blank.
Now my brain tells me that somehow this is a pathing issue with the component and I need to setup some actionscript in the timeline to tell my scrollpane (instances named my_sp) to correctly path the content to load in. I have looked at the AS library at ScrollPane.contentPath but my brain is just not putting this all together and I was wondering if someone could help me out to get it to work!
Window.contentPath Is Driving Me Crazy
Hey,
I'm trying to create an window component in an for loop. Like this:
this.propleCount is 2;
ActionScript Code:
for(i=0;i<this.peopleCount;i++){
duplicateMovieClip(_root.peopleInfo, "peopleInfo"+i, _root.getNextHighestDepth());
var oWindow:Window = _root.createClassObject(Window, "peopleInfoWindow"+i, _root.getNextHighestDepth());
oWindow._y = 18;
oWindow._x = i*240+260;
oWindow.setSize(240,180);
oWindow.enabled = false;
trace(_root.peopleInfo0)
oWindow.contentPath = _root["peopleInfo"+i]
}
But all I get is an error:
Error opening URL "file:///x5/Users/fredrik/flash/_level0.peopleInfo1"
Error opening URL "file:///x5/Users/fredrik/flash/_level0.peopleInfo0"
Does anyone knows why ?
//Fredrik
Changing The ContentPath Of A Flv Component Through Action Script
this is action script 2.0
what i need to do is, when you click this button it pulls up another flv file, that this player will play
ok this is the code i have
on (release) {
import mx.video.*;
flvTest.contentPath = "water.flv";
}
the flv player is named "flvTest"
-thanks
[F8]Calling New ScrollPane.contentPath From Current Content
Hey:
I have a movieClip, upon which is a ScrollPane object, "main_sp" (main_sp is not a movieClip itself; I dragged the ScrollPane object from the Library onto the stage and set some parameters in AS). The ScrollPane, in turn, loads any of several different movieClips as content.
My question is: how do I call a new .contentPath object from the current content? In other words, my ScrollPane loads a movieClip called "ScrollOne" with a button. How do I get the button to clear the ScrollPane and load another movieClip into it? I tried this:code: ScrollOne_btn.onRelease = function() {
main_sp.contentPath = "ScrollTwo";
};which didn't work. I also tried using _root and _parent in front of main_sp, but it won't go. Anyone know what I'm doing wrong?
-Jeff
Refreshing ScrollPane ContentPath With Dynamic Text
I have come to the point of refreshing the contentPath for static text but it will not work for dynamic text instances. How can I get by this?
I have a mc with a ScrollPane in it. Its contentPath is to another mc in the same library. This second movie has a dynamic text box but will not seem to work in the ScrollPane (only the static will).
Button To Load ContentPath And External Text Problem
i have the following layers:
Gallery - containt mx.controls.load named art1Loader
Gallery Info - Dynamic Text Box named infoBox
Gallery Buttons - btn1
i have the following script within btn1
on(release){
art1Loader.contentPath = "images/artists/artist1/exam1.jpg";
}
loadText = new loadVars();
loadText.load("txt/art/artist1/TEXT1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
infoBox.html = true;
infoBox.htmlText = this.info;
}
};
}
i get the follwing errors:
**Warning** Symbol=Test Clip , layer=GaleryButtons, frame=2:Line 4: The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
loadText = new loadVars();
**Error** Symbol=Test Clip , layer=GaleryButtons, frame=2:Line 5: Statement must appear within on handler
loadText.load("txt/art/artist1/TEXT1.txt");
**Error** Symbol=Test Clip , layer=GaleryButtons, frame=2:Line 6: Statement must appear within on handler
loadText.onLoad = function(success) {
**Error** Symbol=Test Clip , layer=GaleryButtons, frame=2:Line 13: Unexpected '}' encountered
}
Total ActionScript Errors: 4 Reported Errors: 4
Ok so im new to this somebody please help?
FLVPlayback Changing Another FLVPlayback
Hi,
I have a movieclip with an FLVPlayback component and a second movieclip on it. In that second movie clip, there's another FLVPlayback component. I was wondering if there was any actionscript I could use in the second movieclip to change the contentPath of the first FLVPlayback component upon the completion of the second FLVPlayback component.
This is the code I tried, but didn't work:
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
this._parent.flvp1.contentPath = "vid2.flv";
}
flvp2.addEventListener("complete", listenerObject);
(flvp1 is the first FLVPlayback component, flvp2 is the second, and vid2.flv is the file to be played in flvp1)
Also, I know that the listenerObject function is working because I tested a trace() command earlier, and it worked.
If anyone could point me in the right direction, I would appreciate it.
Thanks,
Brad
MC Into Separate Swf
How do I export a mc into a separate swf? My file size is becoming very big and hence quite slow on a normal 56k modem. I want to export the mc to a separate movie and then link it back to the original movie.
Hope someone can help. Thanks a lot.
[F8] ContentPath Doesn't Always "take"
I have a simple script that loads a ScrollPane object and attaches a .swf file to it. The ScrollPane is supposed to get the .swf, then fade in. Strangely, the .swf only attaches to the ScrollPane sometimes; the rest of the time it merely lines up on top of the ScrollPane. I'm not sure what makes it work and then not work.
code: main_sp._alpha = 0;
main_sp.setSize(700, 350);
main_sp.hScrollPolicy = "off";
main_sp.vScrollPolicy = "on";
main_sp.contentPath = "http://www.augurband.com/Pic/mainScroll_mc.swf";
main_sp.refreshPane();
var alpha_interval:Number = setInterval(fadeImageIn, 50, main_sp);
function fadeImageIn(main_sp:MovieClip):Void {
main_sp._alpha += 5;
if (main_sp._alpha == 100) {
clearInterval(alpha_interval);
}
}
stop();
mainScroll_mc.swf is 700x700, so I'm only using a vertical scrollbar. I'm not sure if main_sp.refreshPane(); makes any difference. Ideas? Thanks for any insight.
-Jeff
MyLoader.contentPath = X & ".jpg";
This is my code:
Code:
myLoader.contentPath = x & ".jpg";
I'm randomly generating a number, x, and I want to load that random jpg file. How do I put the x in there so it'll recognize it as x.jpg?
Can You Preload A Separate SWF?
Can you preload an SWF file? I know how to make a preloader "scene" before the main scene but can you tell flash to start loading an external SWF?
|