Adobe Dreamweaver Forums



Last 10 THreads :         Confused - Color control with multiple utilities available (Last Post : chris_farrell@adobeforums.com - Replies : 1 - Views : 2 )           »          Re: SFW and date created (Last Post : Neil_N@adobeforums.com - Replies : 0 - Views : 1 )           »          Em Dash (Last Post : Jiva Mukta - Replies : 0 - Views : 1 )           »          changeWatcher of variable? (Last Post : David Repas - Replies : 0 - Views : 1 )           »          ZEND STUDIO ! does it work on any php capable server orneed some sepcialized? (Last Post : LuigiL - Replies : 5 - Views : 6 )           »          How to turn IMAGE into MOVIECLIP??? (Last Post : LuigiL - Replies : 20 - Views : 21 )           »          Help with button sounds (Last Post : JDMD - Replies : 2 - Views : 3 )           »          Problem initialising quicktime (Last Post : eoinie - Replies : 0 - Views : 1 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 3 - Views : 4 )           »          Online Catalog (Last Post : chris.cavage - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 08:59 AM
tata668@gmail.com
 
Posts: n/a
Diggs:
Default relative paths not used in the same way for flv and mp3

When I load an mp3 using the Sound component, with the relative path
"medias/test.mp3", it works.

When I try to load a flv using the VideoDisplay component, with the
relative path "medias/test.flv", it doesn't work!

VideoDisplay seems to build the path to the flv from the directory where
the .swf is
, not from where the webpage is...

Webpage is : /blabla/index.html
Swf path is: /blabla/swf/main.swf
Medias path: /blabla/medias/...

Is there a way to tell the VideoDisplay component to load a relative path
starting at the level where the webpage is?

Thanks in advance!






Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:00 AM
tata668@gmail.com
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

Any help, please?
Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:00 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv and mp3


"tata668@gmail.com" <webforumsuser@macromedia.com> wrote in message
news:gdilgt$qku$1@forums.macromedia.com...
> When I load an mp3 using the Sound component, with the relative
> path
> "medias/test.mp3", it works.
>
> When I try to load a flv using the VideoDisplay component, with the
> relative path "medias/test.flv", it doesn't work!
>
> VideoDisplay seems to build the path to the flv from the directory
> where
> the .swf is
, not from where the webpage is...
>
> Webpage is : /blabla/index.html
> Swf path is: /blabla/swf/main.swf
> Medias path: /blabla/medias/...
>
> Is there a way to tell the VideoDisplay component to load a relative path
> starting at the level where the webpage is?


Relative paths are_always_ relative to the swf, regardless of the media
type. Note that media is actually _already_ plural ;-).

So try:

"./medias/test.flv"
or possibly
"../medias/test.flv"


Reply With Quote


  #4 (permalink)  
Old 11-04-2008, 09:00 AM
tata668@gmail.com
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

But then, why does it work to play a mp3, using the Sound component, with the same relative path structure?

Reply With Quote
  #5 (permalink)  
Old 11-04-2008, 09:00 AM
jeyana
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

Have almost the same problem:

public class SoundPlayer extends Sprite {
private var url:String = "sound.mp3";
private var soundFactory:Sound;

public function SoundPlayer() {
var request:URLRequest = new URLRequest(url);
soundFactory = new Sound();
soundFactory.load(request);
}
}

sound.mp3 file is placed in the same directory as flex-config.mxml
SoundPlayer class is in /sample package.


However, when I use something like [Embed(source="sound.mp3")] in my mxml
file, it works well.

Could you please help me how to resolve it? =(

Reply With Quote
  #6 (permalink)  
Old 11-04-2008, 09:00 AM
ntsiii
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

This does not precisely answer the question, but...

I got so tired of wrestling with relative path issues that I began passing
"root urls" in to my application via flashvars in the html wrapper. This lets
me have multiple apps reunning from the same code base by having multiple
versions of the html wrapper. It also supports multiple launch configurations
from within Flex Builder.

I no longer have any pathing issues.

Tracy

Reply With Quote


  #7 (permalink)  
Old 11-04-2008, 09:00 AM
Handycam
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

Tracy

Sounds like an excellent idea. Can you please post a quick example?

I run into the problem that I keep having to change the path to my xml
depending on if the file is local or on one of the test servers, so this might
help there.

Reply With Quote
  #8 (permalink)  
Old 11-04-2008, 09:00 AM
Handycam
 
Posts: n/a
Diggs:
Default Re: relative paths not used in the same way for flv andmp3

Tracy

Sounds like an excellent idea. Can you please post a quick example?

I run into the problem that I keep having to change the path to my xml
depending on if the file is local or on one of the test servers, so this might
help there.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:24 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk