Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuickTime Movie view



Hi,

so try another version

in IB give the main window a handler "awake from nib", put a movie view into and set up the right scaling handling for the movie view (and name it the right way - I named it 'movieView')

property theWindow : null
property movieView : null
property scaleFactor : 1
-- all properties are set in case you want to use them later on

on awake from nib theObject
set theWindow to theObject
set movieView to movie view "movieView" of theWindow


try
-- or use open panel to define what kind of file you want to open, or put this stuff attached to a button or whatever
set theMovie to load movie (choose file)
set movie of movieView to theMovie
copy (call method "sizeForMagnification:" of movieView with parameter 1) to {movieWidth, movieHeight}
set size of theWindow to {movieWidth * scaleFactor, movieHeight * scaleFactor + 16}
on error
log "f*** - this was the wrong file type. Restart the app to have a new trial!"
end try
end awake from nib

I haven't had a look for the extra +16, so you must have a look a the docs - or just try.

Regards
Andreas


On Oct 20, 2004, at 3:48 PM, Novice Software wrote:

I am sorry, I can' get it to work (cannot create script error)
Maybe I defined something wrong.
What exactly do you mean by 'defining' the variables movieView and theWindow ?
In what way is this been done?
Thanks

John





Kiel heeft op woensdag, 20 okt 2004 om 11:59 (Europe/Amsterdam) het volgende geschreven:

Hi,

try this ( I haven't tried that with a standard movie view)
the movie must have been loaded into the movie view
copy (call method "movieBoundsRect" of movieView) to {x, y, movieWidth, movieHeight}
set size of theWindow to {movieWidth * scaleFactor, movieHeight * scaleFactor + 16}
in the example above there is a scaleFactor in case the movie is bigger than the current screen, the '+16' is the height of the movie controller. movieView and theWindow have to be defined in advance.

Regards
Andreas

On Oct 20, 2004, at 9:57 AM, Novice Software wrote:

Suppose I have the following statement:


set movie of movie view "movies" of window "show" to load movie "/User/Me/Movies/bdayparty4.mov"


Now I need to adjust the size of the movie view and window to fit the dimensions of the movie.
I have been searching everywhere to find statements that do this.

The ASS sample "talking heads" offers no solution for this. The movie frame in this application has been manually preset to fit the movie exactly.

I have been trying this:
set the size of window "show" to call method "size" of object theMovie
But any variation of this statement results in an error. I suppose this is only for images.

Yet I don't understand what the use is of a movie view if you can't set the dimensions/bounds of the movie view and window.
In that case the only way to make it work is to enter the dimensions of the move manually in advance. I can't imagine that this is the only way.

Has anyone been able to make this work?
Is there some statement I have overlooked?

Any help would be much appreciated.

John



E-mail: email@hidden _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
Andreas Kiel

Spherico
Nelkenstr. 25
D-76185 Karlsruhe
Tel.: +49 (0)721 183 9753
eFax: +1 650 897 8094
eMail: email@hidden

Andreas Kiel

Spherico
Nelkenstr. 25
D-76185 Karlsruhe
Tel.: +49 (0)721 183 9753
eFax: +1 650 897 8094
eMail: email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.