?
Solved

Load .swf in new window on mouse click. (c'mon.. eeaasssyy)

Posted on 2003-03-28
8
Medium Priority
?
157 Views
Last Modified: 2007-12-19





im making my portfolio for art school. its on a disc so i dont need to worry about file size, but i cant find out how to open a new window. the window's content is only an swf.

       frustratedartgeek
                   stubbedtoe
0
Comment
Question by:stubbedtoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 8229123
if you have a flash movie on your machine that is clicked
to load the swf on the disc..

on (release) {
     getURL("D://theMovie.swf", "_blank");
}

where..theMovie..is the name of your swf
and it is on the _root of the disc..ie..not inside a folder.
it's all about writing an absolute path to the file

the same thing on the web would be

on (release) {
     getURL("http://www.yoursite.com/theMovie.swf", "_blank");
}

_blank is calling a new browser window to open

if you have an html page that you are calling the swf
from use the code..

<a href="file:///D|/theMovie.swf" target="_blank">theMovie</a>

you can replace the last..>theMovie<.. with other text or
an image..that's what's showing on the page.

this is for the local machine..not the web

Z


0
 

Author Comment

by:stubbedtoe
ID: 8231741
will having "D:\portfolio...." work when its on cd?
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 8232083
I think ..

("D:\\portfolio.swf","_blank");  

that's for flash
I'm still not sure where you're linking..from.
Z
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:henryww
ID: 8234585
just use put everything under the same directory and ignore the drive letter. use relative path instead of absolute path, cos u can't be sure that every computer's CD drive is "D:"

cheers
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 150 total points
ID: 8240576
I would recommend publishing your portfolio SWF as an .exe, so the person does not have to have the Flash stand alone player on their machine...

let me know if you need instructions on how to do that...


also, if you are using Flash 5, then you can open an exe or bat using fscommand... this will ensure that the program you open will do so in the proper program, and also make sure that the focus is on that window...

useing something like this to open a bat file:

on (release) {
    fscommand("exec", "launch1.bat");
}


then just open up a new txt file and type this in:

@echo off
START theMovie.exe
exit


and then save the file as "launch1.bat"

this could help you out in a bunch of ways...


rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8240588
I forgot to tell you to just put the two files in the root of the CD, so that the paths are correct...

and if you need to put them into folders just make sure the paths are updated correctly...


like this:

on (release) {
   fscommand("exec", "folder1/launch1.bat");
}


then just open up a new txt file and type this in:

@echo off
START folder1/theMovie.exe
exit



rp
0
 

Author Comment

by:stubbedtoe
ID: 8254508


Thanx man!
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8255014
B?  ouch that hurts :)

rp
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question