Welcome to GraphicForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

help a total newbie :)

 
   Graphic Forums (Home) -> Newbie Corner RSS
Next:  Looking for advise/tutorials or help creating a f..  
Author Message
bumwhip

External


Since: Apr 24, 2008
Posts: 4



(Msg. 1) Posted: Thu Apr 24, 2008 1:16 pm
Post subject: help a total newbie :)
Archived from groups: macromedia>flash (more info?)

hi guys, new to flash here. i'm a photographer and preficent on photoshop, but
only just downloaded the trial version of flash from adobe. i want to see if i
can do something before i buy...

i've taken a sequence of 18 photos (jpegs) of a shoe for the manufacturure,
slowly rotating it around 360 degrees, a bit further in each pic, so it can be
seen from all angles. i'd like to have all the pics in some kind of annimation
(dont know if thats the right word) or sequence so that the person viewing can
scroll back and forward through them, giving the impression that they are
looking at an interactive 360dgree spin of the shoe.

i cant explain myself v well, so i found this example. i can't credit the
person who did it unfortunitly.

http://www.photo-mojo.co.uk/scripts/..._SkiBoot3c.swf

not bothered about the brightness thingy.

i know this can't be TOO hard. also, i've searched the forum and found a few
similar posts but no ones really answered this one, that i know of. sorry if
i'm repeating someone else.

bear in mind im total newbie to flash

any help would be greatly appreciated and i'll buy you a beer next time i see
you!

robina x

 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
DMennenoh **AdobeCommunit

External


Since: May 20, 2006
Posts: 9



(Msg. 2) Posted: Thu Apr 24, 2008 1:16 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If your sequence is numbered properly, such as image01.jpg, image02.jpg -
etc. Then you do File > Import, and click the first image. Flash will
produce a dialog saying the image appears to be part of a sequence... Choose
Yes to import all images, an each will be imported to a new frame.
If you first create a new MovieClip, then enter the clips timeline, you can
do the import and you'll have a MovieClip to scrub through...

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 3) Posted: Thu Apr 24, 2008 1:16 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

robina x,

> i know this can't be TOO hard.

Well ... difficulty assessment is a subjective beast. Wink It's not what
I would call "TOO" hard, but it will certainly require a bit of programming,
which means you have to decide which version of ActionScript to use.
ActionScript 3.0 (AS3) requires that your website visitors would need Flash
Player 9 or higher installed. ActionScript 2.0 (AS2) means you could
publish your spinning shoe for visitors with Flash Player 6 installed. Does
it matter to you? (Many agencies, out of principle, refuse to create
content for the latest-and-greatest plugin.)

> any help would be greatly appreciated and i'll buy you a beer
> next time i see you!

I'll remember that. lol

What version of ActionScript do you want?


David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
bumwhip

External


Since: Apr 24, 2008
Posts: 4



(Msg. 4) Posted: Fri Apr 25, 2008 8:52 am
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

lol

AS2 as i'm supposing its the more commonly used x
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 5) Posted: Fri Apr 25, 2008 10:59 am
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

bumwhip,

> AS2 as i'm supposing its the more commonly used x

I don't know that AS2 is the more commonly used (it might be!), but it
does allow you to publish your content for Flash Player 6 and up.

Import your photos specifically into the timeline of a new movie clip
symbol, like Dave Mennenoh described. This will give you a movie clip that
you can drag to the stage and position wherever you like. It'll have your
collection of photos sequentially in the frames of its timeline. That's
key.

With that movie clip on the stage, click it once to select it, then look
at the Property inspector. That's where you can give the movie clip an
instance name. It's the instance name that allows ActionScript to
communicate with it. In my example code, I've used the instance name "mc"
(without quotes), which simply stands for "movie clip". Use whatever
instance name you like, but if you choose something other than mc, you'll
have to change the ActionScript to follow suit. The code calls mc by name,
and you'll see exactly where that happens.

So ... with your movie clip on the stage and with an instance name,
create a new layer for your code. Select frame 1 of the new layer and open
the Actions panel (Window > Actions). Copy/paste the following into that
panel:

mc.stop();

So far, this simply stops mc in its tracks. Movie clip timelines are
independent of the main timeline, so you don't want your spinning shoe to
spin wildly on its own. Then:

var startX:Number;
var startFrame:Number;
var changeDistance:Number;
var travelDistance:Number;

These are just some arbitrarily named variables that will hold values in
a moment. Then:

mc.onPress = pressHandler;
mc.onRelease = releaseHandler;
mc.onReleaseOutside = releaseHandler;

This associates a couple custom functions with the onPress, onRelease,
and onRelease outside events of your movie clip. If you don't assign
functions to these events, then the events go unheeded. You specifically
want something to happen when the user clicks to start dragging (onPress)
and you want that dragging to stop when the user releases (onRelease) or
releases outside of the movie clip (onReleaseOutside). Then:

function pressHandler():Void {
startX = mc._xmouse;
startFrame = mc._currentframe;
this.onMouseMove = moveHandler;
}

When the user presses down, you want to note the current position of the
mouse. That value comes from the _xmouse property of the movie clip and is
stored in start X. In a similar way, you want to note the current frame of
mc's timeline. That gets stored in the startFrame variable.

Finally, the onMouseMove event of this movie clip is assigned to a
custom function named moveHandler -- that's coming in a sec. Then:

function releaseHandler():Void {
this.onMouseMove = null;
}

When the user releases, you want the onMoveMove function to stop.
Finally:

function moveHandler():Void {
changeDistance = mc._xmouse - startX;
travelDistance = startFrame + changeDistance;
if (travelDistance > mc._totalframes) {
mc.gotoAndStop(travelDistance % mc._totalframes);
} else if (travelDistance < 0) {
mc.gotoAndStop(mc._totalframes + (travelDistance % mc._totalframes));
} else {
mc.gotoAndStop(travelDistance);
}
}

So ... here's the "brains" of the dragging. The moveHandler() function
notes the difference between the mouse's current horizontal position and
startX, stores that in the changeDistance variable. The travelDistance
variable stores the sum of startFrame plus changeDistance.

Now you need a few if() statements to make sure the travel distances
doesn't go past the total number of frames in the mc's timeline -- or go
below zero. I've used modulo (%) to get the remainder when travel distance
is greater than the total number of frames. Same thing goes for the
below-zero scenario (the travelDistance variable will be a negative number
at that point, which is why mc._totalframes gets added to it. In the case
where travelDistance hasn't gone around either bend, mc is simply sent to
the frame represented by that number.

I can try to explain the math a bit more, if you're interested, but
let's get this thing to do its trick for you without exploding.


David Stiller
Contributor, How to Cheat in Flash CS3
http://tinyurl.com/2cp6na
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
bumwhip

External


Since: Apr 24, 2008
Posts: 4



(Msg. 6) Posted: Fri Apr 25, 2008 7:19 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi david
that cool refreshing beer is nearly within your grasp Smile

your post was so helpful, but im still obviously doing something fatally wrong
ive been working on my flash for a while now.
got two layers, the first with all my images in a movie clip, second with your
action script on.
i still can't seem to publish it tho. i'm obviously just doing one small thing
wrong but i cant work out what it is! i suspect its in that you meant me to
insert some figures in your AS somewhere, or in giving it the instence name,
which i couldnt really work out the best way to do and simply given it to the
top picture

i'll send u my little attempt anyway if you wanna have a look

thaaaanks robina x x
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
bumwhip

External


Since: Apr 24, 2008
Posts: 4



(Msg. 7) Posted: Fri Apr 25, 2008 7:20 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

no i wont! cause i cant work out to do it whoops.
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 8) Posted: Fri Apr 25, 2008 7:20 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

robina,

>> that cool refreshing beer is nearly within your grasp Smile

Wink

>> your post was so helpful, but im still obviously doing
>> something fatally wrong
>> ive been working on my flash for a while now.

We can step through it.

>> got two layers, the first with all my images in a movie clip,
>> second with your action script on.

Okay, so that "images" layer needs to have one (and only one) movie clip
symbol in it, on frame 1. If you double click this movie clip, you'll enter
its own timeline, and *that* timeline needs to have your images on it, one
on each frame -- all in the same layer.

Your "scripts" layer needs to have my code pasted into frame 1.

>> i still can't seem to publish it tho. i'm obviously just doing one
>> small thing wrong but i cant work out what it is!

Have you selected Control > Test Movie?

>> i suspect its in that you meant me to insert some figures in your AS
>> somewhere, or in giving it the instence name, which i couldnt really
>> work out the best way to do and simply given it to the top picture

That confuses me. Pictures (imported photos, for example) can't have
instance names. They're just not the sort of asset in Flash that can have
an instance name assigned. If you're inside the timeline of your movie
clip, select Edit > Edit Document to return to the main timeline. From that
vantage point, click your movie clip once to select it. Look at the
Property inspector (Window > Properties) and you'll see an input field in
the upper left side that lets you enter an instance name.

The way I wrote my code, that instance name needs to be "mc" (without
the quotes).

>> i'll send u my little attempt anyway if you wanna have a look

How?

> no i wont! cause i cant work out to do it whoops.

Heh. Well, you can upload your FLA file to a server and provide the
URL.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 9) Posted: Mon Apr 28, 2008 8:07 am
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

robina,

Did you get any further with this?


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
pogue:mahone

External


Since: Apr 28, 2008
Posts: 3



(Msg. 10) Posted: Mon Apr 28, 2008 2:38 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello David,
I don't want to highjack Robinas post, but I'm wondering if there is a way to
make the movement through the movie clip frames a little slower. I have a 50
frame movie clip which shows an object rotate through 360 degrees, the same
principal as Robina. Using your code, I'm able to click & drag left or right to
scrub through the frames - brilliant, but it is scrubing through the frames
very quickly. So rather than draging the mouse 1 inch to rotate the object, can
it be altered so that you have to click & drag say 6 inches to scrub through
the sequence?
I hope I'm explaining myself clearly & hope you can help.
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 11) Posted: Mon Apr 28, 2008 2:38 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

pogue:mahone,

> Hello David,
> I don't want to highjack Robinas post,

No worries. Smile

> I'm wondering if there is a way to make the movement through
> the movie clip frames a little slower.

Sure thing! All you need to do is play around a bit with the actual
distance of the mouse from its starting point for each click. The operative
code is located in the moveHandler() function. Where it originally says
this:

function moveHandler():Void {
changeDistance = mc._xmouse - startX;
travelDistance = startFrame + changeDistance;
if (travelDistance > mc._totalframes) {
// additional code snipped

.... change it to something like this:

function moveHandler():Void {
changeDistance = Math.round((mc._xmouse - startX) / 10);
travelDistance = startFrame + changeDistance;
if (travelDistance > mc._totalframes) {
// additional code snipped

The change consists of a division by 10 (or try 20, or 8, or whatever)
which is rounded in order to avoid decimal numbers.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
pogue:mahone

External


Since: Apr 28, 2008
Posts: 3



(Msg. 12) Posted: Tue Apr 29, 2008 10:13 am
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David - thanks very much, it works perfectly. I've had flash for a while now,
but so far just using it to produce swf versions of animations & time lapse
films. I can see great potential in combining these with the interactivity that
Flash offers, but so far I haven't delved into coding much.
I'm going to push my luck now and ask a question I've already posted in
another thread but have had no replies to. I know the obvious answer is "go and
learn actionscript" but some pointers would be great.
I've created an animation (using 3ds Max) which I have rendered out as a
sequence of frames (.png files). It basically shows four coloured discs with
text on each side. The text on the front shows a single heading on each, while
the reverse of each disk shows 3 subheadings. The animation is 200 frames in
length. Frame 1-50 shows the blue disc spin towards the camera(viewer)
revealing the text on the other side. Frame 51-100 shows the red disk spin
towards the camera revealing the text on the other side, and likewise 101-150
yellow & 151-200 green. Hopefully you get the picture.
What I want to do is use these frames as a basis for a navigation tool, where
the mouse hovering over any of the disks would trigger a certain portion of the
animation to play eg. Hover over the red disk triggers frame 51-100 then stops
at 100. Frame 100 shows the reverse of the red disk with a sub menu text on it.
At this point I want to be able to either click any of the sub headings, which
would take me to another page, or move the mouse off the red disk and the
animation plays backwards from 100 to 51. Like wise with each of the other
three disks.
I?m using CS3. I haven?t done anything much with buttons & actions before,
which I presume to be the solution here. Should the animation be split into 4
seperate clips? I basically want to use "hotspots" to trigger these events and
links. Do I use invisible buttons? I have no idea where to start.
Hopefully you can give me some advice or point me in the direction of a good
tutorial on the subject.
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 13) Posted: Tue Apr 29, 2008 10:13 am
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

pogue:mahone,

> What I want to do is use these frames as a basis for a navigation
> tool, where the mouse hovering over any of the disks would trigger
> a certain portion of the animation to play

I can visualize exactly what you mean.

> I?m using CS3. I haven?t done anything much with buttons & actions
> before, which I presume to be the solution here.

Flash is very flexible, so you could use buttons or not. To get the
effect you're after, though -- and because the concept of "button" may help
you as a newcomer -- I'll describe an approach with buttons. Fortunately,
you already have a leg up in regard to the click-and-drag exercise.

> Should the animation be split into 4 seperate clips?

One clip will do, just like before. Lay out your images in sequence in
the movie clip's timeline. Drag your movie clip to the stage and use the
Property inspector to give it an instance name. Remember, the instance name
is what allows ActionScript to speak to this object directly.

While we're on the subject, what sort of object is this? It's a movie
clip, of course. What may not be so obvious is that movie clips are defined
by something called the MovieClip class. (Button symbols are defined by the
Button class; text fields by the TextField class, and so on.) In
ActionScript, and in many programming languages, classes define an object's
functionality. The movie clip sitting in the main timeline is called an
"instance" of the MovieClip class, which perhaps makes some sense of the
term "instance name." Classes tend to define one or more of the following
three categories: properties (characteristics of the object), methods
(things the object can do), and events (things the object can react to).
Think of the Help docs in these terms, and you'll find it much easier to
navigate.

So ... just like the click-and-rotate exercise, you'll put a frame
script in the main timeline that starts like this:

instanceName.stop();

.... where "instanceName" is whatever instance name you decided to you (in
the earlier exercise, this was mc). What you're doing there is invoking the
MovieClip.stop() method on one particular instance of the MovieClip class.

Telling this movie clip to stop on frame 1 assumes that one of its
to-be-clickable faces is now facing the user. That may or may not be true,
given your renderings. If the first clickable face happens to be frame 30,
you could omit the stop() reference in the main timeline -- because you
*want* the movie clip to advance -- and just put a stop() action inside the
movie clip's timeline in frame 30:

// in frame 30 of the movie clip
this.stop();

Again, you're invoking the MovieClip.stop() action on a particular movie
clip instance; it's just that your reference is different. If you're inside
the movie clip, you don't need to mention the movie clip's instance name --
the reference "this" (without quotes) will do. In fact, in this context
(but not always, and it will eventually become clear), you can drop the
"this" reference and simply use:

// in frame 30 of the movie clip
stop();

At this point, you don't have very much interactivity going on. Buttons
will help. Inside the movie clip that contains your image sequence, create
a new layer above the images. This is where your buttons will go. You may
as well create a new layer for your scripts, too, just to keep things
organized.

In the buttons layer -- this is inside the movie clip, remember --
insert a keyframe at the appropriate frame (e.g., 30) and draw a circle (or
whatever shape) to represent the clickable face. Select your shape and
convert it to a button symbol (Modify > Convert to Symbol). Choose Button
as your type, and give it a name. This name isn't the same as an instance
name: it's just a name that labels the asset when it appears in the
library, as all symbols do. Once you've converted the shape to a button
symbol, select the symbol and use the Property inspector to give it an
instance name.

Create keyframes at the appropriate frames for the other faces. Since
you already have a button symbol handy, re-use that one: drag the same
button symbol to each new keyframe and postion it over the cube's face.
Give each button a unique instance name.

It'll be easiest to put your code inside the timeline of this movie
clip, rather than the main timeline. Insert keyframes in your scripts layer
at each of the button frames. Enter the following code into each script
keyframe:

// frame 30
stop();
buttonIntanceNameA.onRelease = function():Void {
play();
}

// frame 60
stop();
buttonIntanceNameB.onRelease = function():Void {
play();
}
// etc.

.... where buttonInstanceNameA, B, etc. are the actual instance names of your
buttons.

Test so far (Control > Test Movie), and you'll see that the movie clip
plays until it hits the stop() method in frame 30. When you click button A,
the movie clip will play again until it hits the stop() method in frame 60,
and so on.

> Do I use invisible buttons? I have no idea where to start.

Invisible would be good; otherwise, your cube faces will look horrible
when the buttons appear. Double-click the button asset in your library to
enter its timeline. You'll see four frames: Up, Over, Down, and Hit. Drag
your artwork from the Up frame to the Hit frame. That makes your button
invisible when you create the SWF (artwork in Hit frame only).

This scratches the surface, but it should give you a good start. Like
you said, you're going to want to "just learn ActionScript," because that's
what will unleash your creativity. Smile


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
pogue:mahone

External


Since: Apr 28, 2008
Posts: 3



(Msg. 14) Posted: Tue Apr 29, 2008 3:45 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David, you are a star. I'll chew over this info tonight and try to get my head
round it.
" just learn ActionScript, because that's what will unleash your creativity."
- is there a pill? or even an implant? no? ah well, sleep is overrated anyway...
I'm sure i'll have more questions for you soon, thanks again & all the best
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
David Stiller

External


Since: Dec 28, 2007
Posts: 32



(Msg. 15) Posted: Tue Apr 29, 2008 3:45 pm
Post subject: Re: help a total newbie :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

pogue:mahone,

> David, you are a star. I'll chew over this info tonight and try to
> get my head round it.

Rock on! Smile

> " just learn ActionScript, because that's what will unleash your
> creativity." - is there a pill? or even an implant?

haha ...

> no? ah well, sleep is overrated anyway...

It really isn't. Sleep is good.

> I'm sure i'll have more questions for you soon, thanks again &
> all the best

Sure thing. These frorums are good for it ... though you'll probably
want to direct specifically ActionScript-oriented questions to one of the
ActionScript forums (there are separate forums for AS1/AS2 and then AS3).


David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
 >> Stay informed about: help a total newbie :) 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Total Newbie - I have purchased a template for a client I have from MonsterTemplates and I have a question on how to incorporate an event handler into an existing Action Script. Here is what I want to do. OnClick load a page into an invisable frame page. I need....

need to edit an flv movie with Flash 8 - total newbie - Hi, I have an flv file on my pc that I need to shorten - it is one section that was made from a VOB file and it plays without problems. The edit that I need to make is very simple but how do I do it ? I am fairly familiar with Adobe Premier but a..

TOTAL NOOB! - :confused; I've got a sweet flash template whose content I need to change - contact addy, some pictures, etc. Just five simple pages but I don't even know how to load the swf file in order to edit it! I just downloaded the 30 day trial of CS3 Flash....

Crew I an a total Noob here please help! - Crew, First let me say I am a Noob at Flash. I recently purchased Studio 8 and CS2 Photoshop. I created a basic button in flash using the default Up,Over,Down and hit routine. I have the frames working and can save (publish) the file ie: ..

Help needed for a total novice - :confused; Greetings. I am a teacher that is attempting to learn Flash along with other Adobe applications so that I can create online activities to support the very original and unique teaching strategies that I use (elementary ed) I have purchased...
   Graphic Forums (Home) -> Newbie Corner All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]