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 swf’s that are to load in the slide by contentpath.
My problem is that the external swf’s 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 ???
FlashKit > Flash Help > Flash MX
Posted on: 09-12-2005, 08:29 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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);
}
[...]
Wrong Swf Position WITHIN Js Pop-up
Hi,
I have a 782x634 pixel swf which appears in a javascript window. However, its position WITHIN the pop-up window is offset to the direction of the right bottom corner.
Why?
Here is the javascript code detail about this:
Code:
function openwindow(page, name) {
var remote = window.open(page,name,"fullscreen=0, resizable=0,toolbar=0,scrollbars=0,menubar=0,status=0,directories=0,width=782,height=634,top=100,left=100");
if (remote.opener == null)
remote.opener = window;
remote.opener.name = name;
}
Movieclip Moves To Wrong Position
i have a movieclip called "follow", it trails the mouse position. when a certain condition is met, it is supposed to return to it's starting position which is x=350 y=500. the code that executes when this condition is met is
_root.follow._y+=(_root._y-_root.follow._y/7);
_root.follow._x+=(_root._x-_root.follow._x/7);
the problem is that the movieclip always returns to x=0 y=0. i've tried a number of different ways to assign the variables such as using this code along with
_root.follow.x=350
_root.follow.y=500, among many other code changes...
can anyone suggest a solution? thanks...
Scrub Bar Starts In Wrong Position
hey, i have just started to make my flash video player, and realised that the scrubber starts in the middle of the loadbar instead of the start? it will play the full distance it should, though starts in the middle and plays past the end of the loadbar?
it is meant to start here:
___________________________
|[]________________________|
but is starting here:
___________________________
|____________[]____________|
(sorry for rough drawings, i didn't know how to add a picture)
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.play("familyguy1.flv");
replayButton.onRelease = function() {
ns.seek(0);
}
playButton.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number
var duration:Number
ns["onMetaData"] = function(obj) {
duration = obj.duration;
}
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 82.8;
loader.scrub._x = ns.time / duration * 82.8;
}
everything works besides this, please help!
Loadmovie Is Placing Movie In Wrong Position
I am attempting to load a movie (TEM3.swf which contains a static symbol) into a movie clip in my main movie. (the objective is to replace placeholder symbols in a tweened animation with different images.) My code is loadMovie (currentimage + ".swf", "demoimage");
I am using Flash 5!
The problem is:
Whenever I load the movie (currentimage.swf or TEM3.swf), it's image appears positioned not where the motion clip it replaces was positioned (demoimage) but way down and to it's right! My movie clip (demoimage) is positioned at X axis: +41, Y axis: + 76; in order to have my movie loaded in roughly the same position as demoimage, I had to place the object in the newly loaded movie (TEM3.swf) at
X axis: -174 and Y axis: -73 (basically, with half the image OFF the stage) ! Both movies are the same size. Instances of images are roughly the same size!
Do you know what the problem might be? (Because I'm going to be loading 60 movies this way, I'll need an accurate method, as opposed to trial and error, for positioning the images so that they load in the right position)
Any help would be greatly appreciated!!
URGENT Movie Loading Into Wrong Position
i have seperate web pages that i'm loading into movies via buttons, everything's working ok apart from a few buttons which are located in movieclips. when these buttons are pressed the movie is loading into the wrong position. it should lay directly over what is already there but instead is appearing halfway down the stage.
eeeek!
help!!!
Sprite Appearing In Wrong Position For 1 Frame
Hey I'm just going through the Friends of Ed book, Actionscript 3.0 Animation and just noticed in some of their examples that the ball sprite is appearing the wrong spot, at position 0,0 on the stage for a second, probably 1 frame. I'm just wondering if there was a way to make it go to the position specified straight away, instead of after 1 frame or so.
Here's a sample 2 classes of what I'm using.
Ball Class:
Code:
package {
import flash.display.Sprite;
public class Ball extends Sprite {
private var radius:Number;
private var color:uint;
public function Ball(radius:Number=40,color:uint=0xff0000) {
this.radius=radius;
this.color=color;
init();
}
public function init():void {
graphics.beginFill(color);
graphics.drawCircle(0,0,radius);
graphics.endFill();
}
}
}
Circle Class:
Code:
package {
import flash.display.Sprite;
import flash.events.Event;
public class Circle extends Sprite {
private var ball:Ball;
private var angle:Number=0;
private var centerX:Number=200;
private var centerY:Number=200;
private var radius:Number=50;
private var speed:Number=.1;
public function Circle() {
init();
}
private function init():void {
ball = new Ball();
addChild(ball);
ball.x=0;
addEventListener(Event.ENTER_FRAME,onEnterFrame);
}
public function onEnterFrame(event:Event):void {
ball.x=centerX+Math.sin(angle)*radius;
ball.y=centerY+Math.cos(angle)*radius;
angle+=speed;
}
}
}
Thanks in advance!
Screen Position
I have created a flash application but I am getting a strange problem that I can't figure out.
The screen position of my application moves over to the right hand side, if I trace the .x location of the movieclips on the screen they don't change but everything has moved way over to the right hand side?
Any ideas or pointers what it could be doing?
Top Position Into A New Screen
Hi all.
I need your help, I am trying to position my screen at the top but I am loosing the SSL icon and service.
I am using GetUrl function. My first screen has a Next button at the bottom of the screen, once I click the next button the second screen appears but it appears at the bottom also. It seems to keep the scroll bar position at the bottom. What can I do to re-position my second screen at the top and to keep the SSL working.
ADV: Controlling The Screen Position
i need to know the actionscript property that controls the screen position... if its _root._x then i dont understand how it works.. please explain
Controlling Mc.'s Position On Screen.
Hi all, I have a mc w/ an invisible button attached to my main stage called mc.return. Attached to the mc.return is the following script:
ActionScript:--------------------------------------------------------------------------------on (release) {
mc.blkqueen._x = 275.3;
mc.blkqueen._y = 461;
}
--------------------------------------------------------------------------------
The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.
Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.
Hoping someone would shed some light on this quandry for me.
Much thanks!!!!
[CS3] Position An Object At The Right Of The Screen
Hi Guys,
I need to position an object (a movie containing a vector graphic) in my flash movie so that when the browser expands the object always stays to the right of the browser while the rest of the content stays in its current position.
The movie is set to scale so that it takes up 100% width and height.
So basically how do I permanently align an object to the right?
[CS3] Position An Object Always At The Right Of The Screen
Hi Guys,
I need to position an object (a movie containing a vector graphic) in my flash movie so that when the browser expands the object always stays to the right of the browser while the rest of the content stays in its current position.
The movie is set to scale so that it takes up 100% width and height.
So basically how do I permanently align an object to the right?
Caret Position On The Screen
Hi all, is there a way of knowing the exact X and Y position on the screen of a textInput caret found using Selection.getCaretIndex()?
Controlling Mc.'s Position On Screen.
Hi all, I have a mc w/ an invisible button attached to my main stage called mc.return. Attached to the mc.return is the following script:
ActionScript Code:
on (release) {mc.blkqueen._x = 275.3; mc.blkqueen._y = 461;}
The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.
Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.
Hoping someone would shed some light on this quandry for me.
Much thanks!!!!
Can A Swf Know Its Position In A Web Page/on Screen?
Hiya, I would like to find out if a swf can know where it is positioned within an html page or on a user's screen.
I would like to know this as I am creating some banners that use local connection to communicate but the swfs may appear in different locations on the web page so I need to know where they are in relation to each other.
All of the code to solve this must be inside of the swfs (I can't put any in the web-page)
Any suggestions much much appreciated
Schm
Controlling Mc.'s Position On Screen.
Hi all, I have a mc w/ an invisible button attached to my main stage called mc.return. Attached to the mc.return is the following script:
ActionScript Code:
on (release) {mc.blkqueen._x = 275.3; mc.blkqueen._y = 461;}
The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.
Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.
Hoping someone would shed some light on this quandry for me.
Much thanks!!!!
Load Movie Into Certain Position Of The Screen
Hi everyone!
I'm trying to load a movie into level 1, on the top of the main movie.
I want to define x y coordinate, so that it loads to cetain area of the main movie.
As for now, the loaded movie which is smaller than the main parent movie on level 0 is at the top left corner of the screen.
Can anybody tell me how to solve this problem?
thanks
X And Y Position Depending On Screen Resolution
Hi. I have a main movie "index.swf" embedded in an HTML page width=100%, height=100%.
This index.swf loads all the other movies into levels. I want some of the movies that are loaded in the upper levels to "stick" to the bottom, top & sides of the browser no matter what the screen resolution is.
In addition I need one of the movies loaded into a level to be dead center.
Anyone know how I can do this? Any help is greatly appreciated!
How To Run Movie In Current Screen And Set The Position?
I am doing a website and i need to load the movie files when i press this certain button to the right side of the frame. How do I do it?? How do I set the coordinate of the movie to the screen? playing instead of it loading into a new window??
Here is my code for the button..
I am not sure how to call out the movie to this screen.. (last sentence)
on(release){
if(_root.sp == "home"){}else{
_root.home_info.gotoAndPlay(2);
_root.as.xxx = 262.15;
_root.as.qqq = 285.85;
_root.as.www = 309.55;
_root.as.eee = 333.25;
_root[_root.sp].gotoAndPlay("go");
_root.sp = "home"
_root[_root.sp]._visible = 1;
_root[_root.sp].gotoAndPlay(2);
_root.ph = "ph1";
_root.sh_ph.gotoAndPlay(2);
_root.cont_sht.gotoAndPlay(2)
_root.loadMovie("home.swf");
}}
Slide Objects From Outside Of Screen To Specified Position
Was curious how the effect of sliding objects from outside of the screen into a certain spot was achieved on this site: http://www.arcadeagency.com/site/
The same effect was used on this site as well: http://moma.org/exhibitions/2007/jeffwall/
Any help is appreciated. Thanks.
Get X,y Position On Screen, Not From Parent Sprite
i have a sprite that's inside multiple sprites. i don't want to have to add up all the x,y positions to get the xy position on the screen....
like... the x y position should be something like 500,400, but its giving me 10,20 because it's inside a sprite that is around 500x400
i hope that makes sense..
i think there was something like localToGlobal in AS2.0, but idk if that's what that was used for....
ty in advance!
Position Projector In Full Screen
Dear Frends,
Can anyone help me out here.
I want to be able to place my projector window on any given position on the screen when its in full screen.
is there any way to do this
Best regards
Jerrel Smith
Moving A Symbol From Random X Position Across Screen.
I am trying to create a rain type effect, but i don't know how to using actionscript. I want the rain symbol to start at a random location above the stage, and then fall at an angle to the bottom. I also want the rain symbol to start to fall at different times. If you can help me with this i would greatly apreciate it.
Absolute Position Of Movie To Monitor/screen
hi
i'm looking for an answer since hours now, and it might well be that this is finally going to drive me mad!
what i want to do is the following:
I'm having this site in a browser window (that's where most sites are, hehe), it's completely one single flash movie.
on(release) of a certain button inside this movie i use
getURL("javascript:window.open(blabla)");
to open a popup.
now i want this popup to be always in the same place of that flash layout, no matter where the browser window is or how big or whatever.
thing is: to open a popup you have to provide an absolute screen(i mean monitor/screen not flash mx/screen)-position like 0,0 being the left upper corner of your monitor.
so i end up needing to know what the absolute screen-position of my main flash-movie is...
would be soo glad if anybody had any (any) solution for this
thanks
d
Loading External Screen Swf: Position Problem
In a regular flash file I have a loader component which is supposed to load a screen based flash swf.
At first it worked fine then the external swf did not load in its correct position anymore. Actually most of the time you would not see it at all because it must be way out of the loader component.
Now I know there is a problem regarding the registration point of screen based documents. I found out that the 0,0 point (or 'top-left') of the screens in a movie change dynamically at runtime, depending what's in them.
Even though I have tried to switch off the auto snap option for the registration point it does not do the trick.
I am wondering why this is not a bigger issue. I have tried to find a solution everywhere, but I only found one other person bringing even the problem up.
Does anyone know what could be done?
Screen Position & Scaling To Fit Window Size
Hi there!
I was hoping someone might be able to help me or point me in the direction of help! I'm not sure if I'm asking a really stupid question! I'm also not sure of what I'm asking for is called so I've looked at existing examples on the web to illustrate my questions.
I've come across this website (http://www.toshiba-emi.co.jp/hikki/index_f.htm) which features a swf which is displayed at 100% width and height, and with no scaling.
Firstly, I was wondering how the background photo can be rescaled depending on the window size, even with the noscale param?
Secondly, I'd like to know how the 'Last Update' box always aligns to the bottom left and the title box always aligns to the top left. Another website (http://www.square-enix.co.jp/kingdom2fm/) shows similar with elements snapping to the extremities of the screen while the main content stays centred.
Thanks for taking the time to read this. I'd really appreciate any help you can give me!
Andy
Screen Division Based On Cursor Position
I need advice in developing a dynamic user-controlled display. I've divided the layout into three equal parts. I wish to change these proportions based on cursor position:
if the user moves into panel A (left), panel A increases its width to 75% of the total area while panels B and C contract to fill the remaining 25% (at right).
if the user moves into panel B (center), panel B increases its width to 75% of the total area while panels A (moving left) and C (moving right) contract to fill the remaining 25%.
if the user moves into panel C (right), panel C increases its width to 75% of the total area while panels A and B contract to fill the remaining 25% (at left).
Any ideas?
Screen Division Based On Cursor Position
I need advice in developing a dynamic user-controlled display. I've divided the layout into three equal parts. I wish to change these proportions based on cursor position:
if the user moves into panel A (left), panel A increases its width to 75% of the total area while panels B and C contract to fill the remaining 25% (at right).
if the user moves into panel B (center), panel B increases its width to 75% of the total area while panels A (moving left) and C (moving right) contract to fill the remaining 25%.
if the user moves into panel C (right), panel C increases its width to 75% of the total area while panels A and B contract to fill the remaining 25% (at left).
Any ideas?
Help, Setting The Vertical Position Of The Movie Screen
Thanks in advance for any help you provide.
Here is the dilema, I have a list of approx 80 names down the left hand side of the screen. I have embedded the details for each individual parallel to the person's name. Problem is as you move down the screen vertically, I would like to reset the position of the screen so the details of the person are at the top of the window, not 1/2 or 3/4 of the way down.
Anyone have any suggestions.
cheers
Position Images Relative To Screen Size
i have a flash movie with scalemode set to false and in the .html file the width and height of the object tag are 100%
i have a large image in my flash movie (about 800x900) so on some screens it will be cropped. how can i make it so that the bottom of the image is always flush with the bottom of the screen. so, on a lower screen res only the top and sides are cropped, not the bottom.
i tried:
ActionScript Code:
Stage.onResize = function() {
backGroundImage._y = Stage.height-backGroundImage._height;
};
but this doesn't work because although the screen height changes, the origin (x=0, y=0) does not move to the top left of the screen, it is cropped out of view too.
cheers, james
Sorry If This Is The Wrong Forum - Need To Make Flash Windows Screen Saver...
Sorry if this is the wrong forum.
I need to make Flash Windows screen saver. Can anyone give me some advice on what the best package out there is for the price? I just need to make a simple Windows screen saver app. I would like the software to handle Flash 5 AS at least, but preferably Flash MX AS.
Thank you.
Seek Bar In FLV Custom UI Component Starts At The Wrong Position When Movie Starts Playing
Hi All,
I am doing this presentation by loading some FLV files to a SWF file. I am using a Custom Skin for the FLV. The problem is when i click on a link and load another FLV file, the seek button in the progress bar starts at the wrong place. This happens to each and every FLV component i load. Is there any way that i can reset the seek bar to start from the intial position when the FLV file start playing.....??
This is the code which i use to load the FLV.....Pls help.....
Thanks in advance....
Attach Code
on (release) {
my_FLVPlybk.play();
my_FLVPlybk.contentPath = "flv1.flv";
}
Seek Bar In FLV Custom UI Component Starts At The Wrong Position When Movie Starts Playing
Hi All,
I am doing this presentation by loading some FLV files to a SWF file. I am using a Custom Skin for the FLV. The problem is when i click on a link and load another FLV file, the seek button in the progress bar starts at the wrong place. This happens to each and every FLV component i load. Is there any way that i can reset the seek bar to start from the intial position when the FLV file start playing.....??
This is the code which i use to load the FLV.....Pls help.....
Thanks in advance....
Attach Code
on (release) {
my_FLVPlybk.play();
my_FLVPlybk.contentPath = "flv1.flv";
}
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.
|