Adobe Dreamweaver Forums



Last 10 THreads :         Pop up window using AS3 (Last Post : retsnomrev - Replies : 1 - Views : 2 )           »          CS4 - annoying help system (Last Post : Rothrock - Replies : 9 - Views : 10 )           »          My bullets dont work in my game >.< (Last Post : kglad - Replies : 1 - Views : 3 )           »          flash movie plays prematurely (Last Post : kglad - Replies : 6 - Views : 7 )           »          Image Fade Out/Load new Image/Fade In (Last Post : EWN-CMI - Replies : 0 - Views : 1 )           »          Recommend Reading? (Last Post : anpuofeck - Replies : 5 - Views : 7 )           »          static sound (Last Post : kglad - Replies : 15 - Views : 16 )           »          Detect multiple areas of transparency in an image? (Last Post : Rothrock - Replies : 8 - Views : 9 )           »          Add a full screen button to a video. (Last Post : kglad - Replies : 5 - Views : 9 )           »          Problems when uploading my website (Last Post : speculumcm - Replies : 4 - Views : 5 )           »         


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



Reply
  #1 (permalink)  
Old 11-21-2008, 06:15 PM
Applied CD
 
Posts: n/a
Diggs:
Default Re: export image in D11

For the sourcePath you?re using _movie.path and the @ operator which is
redundant. Just use the @ operator and you should be fine. If that doesn?t
solve the problem check the value of resultCode, it will probably be something
other than 0.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-21-2008, 08:25 PM
DAVID NAJAR
 
Posts: n/a
Diggs:
Default Re: export image in D11

Sorry about that, the script and xtra works on Windows.

Luck.
Reply With Quote
  #3 (permalink)  
Old 11-24-2008, 11:34 AM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: export image in D11

whitestar7 wrote:
> Thanks for this, unfortunately still not having much luck, when I
> checked the script it said the resultcode was <void>


That would mean that destinationPath="".

You perhaps need to use buddyAPI to get a list of the drive names on the Mac
before presenting the baGetFolder dialog, although I suggest that just using
buddyAPI to get the Desktop folder to supply as the starting folder in the
dialog would suffice.

Andrew


Reply With Quote


  #4 (permalink)  
Old 11-24-2008, 12:14 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: export image in D11

whitestar7 wrote:
> I am not very good at writing lingo (as you might have guessed) how
> would I ammend my script to do what you say?


I don't have the Mac BuddyAPI docs to hand, but I think it's the same call
as on Windows:

----------------------------------
property spriteNum

on beginSprite
sprite(spriteNum).cursor=280
end

on endSprite
sprite(spriteNum).cursor= -1
end

on mouseUp me
sourcePath = _movie.path &
"@:PRODUCT_1roduct_1_imagesroduct_1_zoom.j pg"
provisionalDestFolder=baSysFolder("desktop")
destinationPath = baGetFolder(provisionalDestFolder,"Copy
image",1,"Select folder",-2,0)

if destinationPath <> "" then
resultCode = baCopyFileProgress(sourcePath, destinationPath,"ALWAYS",
"Saving
file... ", "Cancel", 0)
end if

end
-------------------------------

Also, you will get better cursor responsiveness by setting the sprite's
cursor rather than using mouseEnter/Leave to set it.

I suggest keeping the value of the folder the user chose and starting from
there if they can copy more than one file. You can write the code for that
:-)

HTH

Andrew


Reply With Quote
  #5 (permalink)  
Old 11-24-2008, 02:54 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: export image in D11

whitestar7 wrote:
> I am still getting the resultcode as <void>, this is what I have put
> in as a behaviour on a shape:


> sourcePath = _movie.path &
> "@:PRODUCT_1roduct_1_imagesroduct_1_zoom.j pg"


> provisionalDestFolder=baSysFolder("desktop")


> destinationPath = baGetFolder(provisionalDestFolder,"Copy image",1,"Select
> folder",-2,0)


Have you tried those lines in the message window, one at a time and checking
the values at each stage?

Andrew


Reply With Quote
  #6 (permalink)  
Old 11-24-2008, 04:24 PM
Mike Blaustein
 
Posts: n/a
Diggs:
Default Re: export image in D11

A quick glance at the BuddyAPI documentation shows that 1 is the error
code for "Invalid Source file name". I would look into the 1st argument
of baCopyFile and see what is wrong with it. Is it an invalid filename?
Does the file exist?

put this immediately before the copy command:

put sourcePath

Does it return a valid filename? Is it correct? Does that file exist?

As Applied CD said earlier, you do not need the @ sign and _movie.path
in the same command. They mean the same thing, so you may very well be
mangling the actual command by using both.
Reply With Quote


  #7 (permalink)  
Old 11-24-2008, 04:44 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: export image in D11

whitestar7 wrote:
> hiya, I gave the message window a go, and everything seems good, the
> message I got for the result code was:
>
>
> --> resultCode = baCopyFile(sourcePath, destinationPath,"ALWAYS")


This is different code from what you had in your previous posts... you may
have to call that BuddyAPI function with different parameters depending on
the platform.

And a result code of 1 means the source file name was invalid, so something
is wrong there too - I guess you didn't get round to correcting the line

sourcePath = _movie.path & "@:PRODUCT_1roduct_1_imagesroduct_1_zoom.j pg"

- didn't the value of sourcePath look wrong in the message window? That
would show you what you need to correct.

I'd rather show you how to find out what is wrong than spoon-feed you all
the answers...

HTH

Andrew


Reply With Quote
  #8 (permalink)  
Old 11-24-2008, 05:24 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: export image in D11

whitestar7 wrote:
> hiya, this is what I get from the message window:
>
> == Script: (member 1 of castLib 1) Handler: mouseUp
> --> sourcePath =
> "@roduct_1roduct_1_imagesroduct_1_pack_zoom. jpg" == sourcePath
> = "@roduct_1roduct_1_imagesroduct_1_pack_zoom. jpg" -->
> provisionalDestFolder=baSysFolder("desktop") == provisionalDestFolder
> = "Macintosh HD:Users:2e_adminesktop:" --> destinationPath =
> baGetFolder(provisionalDestFolder,"Copy image",1,"Select folder",-2,0)
> == destinationPath = "Macintosh HD:Users:2e_adminesktopOWNLOAD:"
> --> if destinationPath <> "" then
> --> resultCode = baCopyFile(sourcePath, destinationPath,"ALWAYS")
> == resultCode = 2
> --> end

> I am guessing this means the filename is not valid as when chose a
> filename which definitely doesnt exist it give the same message, i
> have tried using an image which is


You've forgotten to tack an actual filename onto the end of destinationPath.

Andrew


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 06:56 AM.


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