PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Graphisme & Infographie > macromedia.flash > cs3 - UILoader Component
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
cs3 - UILoader Component

Réponse
 
LinkBack Outils de la discussion
Vieux 24/06/2008, 20h19   #1
66vwsplit
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut cs3 - UILoader Component

Hello,

After many different forum searches, I still can't find the answer to my
newbie problem when using Flash CS3.

I'm trying to use the UILoader component that creates an empty container into
which I want to load an external swf file. Without using AS, in the parameter
box for the "container" placed on the stage of my main movie, I specify the
name of the file I want to load (box.swf). Upon testing the movie, two problems
occur.

First, I can't figure out how to ensure that displayed position the loaded swf
is centered on the stage. I've tried moving the container such that it's lower
right corner sits on the stage's spot where I want the UL corner of the swf to
play, but no joy.

Secondly, instead of placing the external swf inside of the container and
scaling it appropriately, the loaded swf (as mentioned previously) loads
outside of the container's position, and cuts off a portion of the swf. I've
tried ensuring that the container is the same size as the swf (or even bigger),
but again to no avail.

Can someone please point out what I must be doing wrong? The external swf
plays well on its own and simply represents a motion tween of a box growing in
size and changing shape over the course of 20 or so frames.

Thanks in advance for any assistance!

:confused;[h]Text[/h]

  Réponse avec citation
Vieux 24/06/2008, 23h47   #2
dzedward
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cs3 - UILoader Component

1) not sure what you mean.. explain further.

2) make sure the components scaleContent parameter is set correctly, as well as the maintainAspectRatio parameter.
  Réponse avec citation
Vieux 25/06/2008, 01h55   #3
66vwsplit
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cs3 - UILoader Component

Thanks for your fast response, dzedward.

Here goes...I hope you'll bear with me. Since I don't know what type of
background info you need, I'll explain in detail.

Background:
I'm creating a flash presentation that we can display on a large monitor at a
tradeshow. The presentation will simply play from a connected laptop and loop,
without the need for user navigation (no buttons). This is my first time
creating such a long file (I anticipate that this will play for 3-4 minutes
straight) so I thought it would be best if the main timeline were to call and
load successive smaller, stand-alone swfs at selected times, based as the
playhead moves through the timeline in a single pass. I'd be able to minimize
the size of the main file in this way.

Trouble Using AS3:
As a newbie, I don't have much experience with AS3. Using an AS3 script found
online I've been able to load a single swf into the timeline of my main movie
successfully, but when I try to load another later on in the main timeline,
neither swf plays....most of the scripts and forum answers I've come across
over this past few days deal with AS2 or earlier versions, so I can't use or
learn from them.

Using the UILoader Widget:
Thats when I saw reference to using Flash CS3's UILoader Component for this
purpose (accessed via Window>Components menu). What it does is create an empty
container into which you can load an external swf, jpg, or png file. You first
simply drag and drop the widget onto the stage from the component window. Then,
from the container's property window, you choose its dimensions and placement
on the stage. Via the container's parameter window you tell it whether to
autoload the content, maintain aspect ratio, and/or scale the content, as well
as provide the name of the source file you want to load. It seems pretty simple
- even I can do it and can get it to work when I load a jpg or selected swf
file. Upon testing the movie, the jpg or swf plays back INSIDE the container,
scaled down or up based on the container's size as it relates to that of the
source file. So far so good.

You'll see from this widget that you only need to specify "true" or "false"
for the autoload, maintain aspect, and scale content questions. I've done this
inside the widget as I'm not sure how to accomplish this with the scaleContent
and scaleAspectRatio parameters you mention using actionscript.

Problem When Using UILoader Widget:
Here's the problem I'm having. As I mentioned, I've created a short 20-frame
animation output to swf showing a white box that grows in size and changes
shape against a black background, using the same frame rate (30fps)_and
dimensions as my main movie. The animation is a simple shape tween, with no
actionscript other than a stop ( ) ; placed on the last frame of an
actionscript layer to prevent looping. It plays as desired on it's own.
However, when I load it into the UILoader container that is centered on the
stage of my main timeline and then test the movie, two problems occur.

Firstly, the animation does not play inside the container; instead, the upper
left corner of the loaded swf animation shows up where the lower right corner
of the container showed up on the stage (hence I only see one corner of the
animation). Secondly, the animation is cropped; the visible outer edges of the
morphing white box are cut off meaning that I lose the visual effect of the
shape tween.

I saw reference online elsewhere to the possible need to position the
container on the stage such that it's lower right corner is where you want the
upper left corner of the animation to be placed, but this doesn't make sense to
me (it's likely that I misunderstood what I read). I did try this however, and
while doing so allowed me to more correctly center the external animation
within the main movie, it's edges are still cropped. To me it should have been
placed inside of the container and scaled.

I'd love to be able to do this using actionscript 3.0, but I'm having even
more trouble with this and haven't found any comparable tutorials or forums
explaining how to load and unload multiple swfs into a main timeline without
the need to control using buttons or a mouse. I'd like to be able to specify on
the main timeline when a particular swf is played, then do so again later on in
the same timeline with another swf file, and so on.....

I don't know if this explanation will make anymore sense. I could send you the
fla or even screenshots showing what I see during playback of the short
animation inside of my main flash file you can provide me with your address and
feel that it would . It looks like I can only post code from this forum.

Thanks for reading through this and for your possible !







  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h37.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10521 seconds with 11 queries