Monday, March 29, 2010

Need to make a Replay button

Ok, so the company I work for doesn't want any more looping banner ads anymore.聽 Now they want me to stop the animation at 15 seconds and create a Replay button so the user can click on it to start the animation again.聽 I know how to make the button but I don't know the Actionscript to make it go to frame one and start again and I'm also not sure how to incorporate this with the Stop action.聽 Kinda new at this so any help is greatly appreciated, thanks in advance!

Need to make a Replay button

if you're using timeline animation, attach a stop() to the last frame of the timeline that you do not want to repeat (without a button click) and attach a simple button to this frame.聽 give the button an instance name (say, btn) and, if you're using as2, use:

btn.onRelease=function(){

this.gotoAndPlay(1);

}

Need to make a Replay button

right i found this code useful when i was making flash games

on(reslease){

聽聽聽 gotoandplay(type in the frame number here);

}

from wadahell


What if I want the button to fade up instead of instantly appearing on the last frame?


then create a loop (setInterval() or onEnterFrame) and fade it in.

Stages please to create dashed 2px line

Hi,

I can see on the internet a way of creating a dashed line that follows a wavy path by choosing brush, altering spacing to e.g. 200% then adjusting dynamics to squish the shape flatter, then angle jitter 0% and control method to Direction, then draw a path and r/click in paths and stroke path, but I need to make such for a 2px wide line drawn with pencil tool. I need the dashes 12px long. How is it done ? What settings work as I cannot seem to use that method at all but perhaps I am doing it wrong ?

I wish Photoshop had by now created an option called dashed lines allowing use of brush or pencil tool to leave a trail of dashes. Such a fundamental drawing thing and nothing easy or obvious. My raster drawing has many straight and curved lines needing redrawing to such.

Envirographics

Stages please to create dashed 2px line

Illustrator is made for drawing precise stuff, not Photoshop and it's very easy to do that sort of thing in it

In Photoshop you'll need to define a brush that looks like one of the dashes, change it's spacing and then stroke the path using the Brush Tool and then keep mucking around with the spacing value until you get what you want. I hope that there's a better way than that (in Photoshop) because it's not a very efficient way to work

Stages please to create dashed 2px line

You can pick a square brush that is 12 pixels in size, change the roundness to be whatever percentage of 12 will give you 2 pixels, and adjust the spacing to greater than 100%. You probably will want to go into the brush options in Shape Dynamics and change the Angle Jitter to Direction so that the brush will turn as your strokes turn. From there you could simply brush in your lines, or make paths as you were and stroke the paths.

  • makeup video
  • Sunday, March 28, 2010

    Retrieving field names on a form

    Hi,

    I have used the below code to retieve field names from a form with Acrobat 5. This has worked fine, we have now upgraded to Acrobat 9 and the same code errors when executing the line 'Set fields = AFORMAUT.flelds' I am getting a type mismatch error. This is a simple funtion in VB6 which retrieves the field names and their associated types in a comma seperated string?

    Does anyone know why this code does not work in Acrobat 9? or is there a better way to achieve the same results with Acrobat 9?

    Thanks

    Public Function fieldList(ByVal formName As String, ofields As String, otypes As String)
    聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 Dim AFORMAUT As AFORMAUTLib.AFormApp
    聽聽聽 Dim fields As AFORMAUTLib.fields
    聽聽聽 Dim Field As AFORMAUTLib.Field
    聽聽聽 Dim AcroExchAVDoc As CAcroAVDoc
    聽聽聽 Dim bOK As Boolean
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 On Error GoTo ErrorHandler

    聽聽聽 Set AcroExchAVDoc = CreateObject(''AcroExch.AVDoc'')
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 bOK = AcroExchAVDoc.Open(''C:\IHT400.PDF'', '''')
    聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 'If everything was OK opening the PDF, you can now instantiate the
    聽聽聽 'Forms Automation object

    聽聽聽 If (bOK) Then聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Set AFORMAUT = CreateObject(''AFormAut.App'')
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Set fields = AFORMAUT.fields ' this line errors
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 For Each Field In fields
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽 If Field.IsTerminal Then
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 If ofields = '''' Then
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ofields = Field.Name
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 otypes = Field.Type
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Else
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ofields = ofields + '','' + Field.Name
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 otypes = otypes + '','' + Field.Type
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 End If
    聽聽聽聽聽聽聽聽聽聽聽 End If
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Next Field

    聽聽聽聽聽聽聽 bOK = AcroExchAVDoc.Close(True)
    聽聽聽聽聽聽聽
    聽聽聽 End If
    聽聽
    Set AcroExchAVDoc = Nothing
    Set AFORMAUT = Nothing
    Set Field = Nothing
    聽聽
    ErrorHandler:
    聽聽聽 MsgBox ''FieldList Error: '' + Err.Number + '' '' + Err.Description + '' '' + Err.Source
    聽聽聽 Resume Next
    End Function

    Retrieving field names on a form

    Was the form created with Adobe Acrobat?

    Retrieving field names on a form

    I assume it has, I have attached the form - if you want to have a look yourself.

    Thanks


    Can you post a link of the form?


    He added it as an attachment but it hasn't been approved yet, it's still in the queue.聽 You'll be able to download the attachment soon once a forum admin approves it.


    The form has been created using Acrobat, has anyone got any ideas on this?

    Thanks


    HI,

    Just looking at the sample in the Acrobat 9 SDK and it has two references included in it.

    Adobe Acrobat 9.0 Type Library ( as expected )

    AFormAut 1.0 Type Library

    the AFormAut library would appear to be the one that is needed for the object you are using, I don't have access to Acrobat 5 sdk, but I think it all used to be one library.

    Just thought it was worth mentioning so you could make sure you have all the references you need,

    Malcolm


    Hi,

    Thanks for the replies, I have since found that to get the field lists in Acrobat 9 then AcroExchAVDOC.BringToFront and AcroExchApp.Hide need to be used. As without these the Acrobat object thinks there is no form loaded. I have put the AxcroExchApp.Hide in as when your automating you don't want the acrobat program to be shown - there is a slight flash - but it is minimal.

    This seems to be the only solution unless, anybody has got any other suggestions?

    So my revised code is (changes in bold):-

    Public Function fieldList(ByVal formName As String, ofields As String, otypes As String)
    聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 Dim AcroExchAVDoc As CAcroAVDoc
    聽聽聽 Dim AcroExchApp As CAcroApp
    聽聽聽
    聽聽聽 Dim AFORMAUT As AFORMAUTLib.AFormApp
    聽聽聽 Dim FormField As AFORMAUTLib.Field
    聽聽聽 Dim FormFields As AFORMAUTLib.fields
    聽聽聽 Dim bOK As Boolean
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 Dim FieldName As String
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 On Error GoTo ErrorHandler
    聽聽聽
    聽聽聽 Set AcroExchApp = CreateObject(''AcroExch.App'')
    聽聽聽
    聽聽聽 Set AcroExchAVDoc = CreateObject(''AcroExch.AVDoc'')
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽 'formName
    聽聽聽 bOK = AcroExchAVDoc.Open(''C:\PDFForm.pdf'', '''')
    聽聽聽聽聽聽
    聽聽聽 AcroExchAVDoc.BringToFront
    聽聽聽
    聽聽聽 AcroExchApp.Hide
    聽聽聽
    聽聽聽 'If everything was OK opening the PDF, you can now instantiate the
    聽聽聽 'Forms Automation object

    聽聽聽 If (bOK) Then
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Set AFORMAUT = CreateObject(''AFormAut.App'')
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Set FormFields = AFORMAUT.fields
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 For Each FormField In FormFields
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽 FieldName = FormField.Name
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽 If FormField.IsTerminal Then
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 If ofields = '''' Then
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ofields = FormField.Name
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 otypes = FormField.Type
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Else
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ofields = ofields + '','' + FormField.Name
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 otypes = otypes + '','' + FormField.Type
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 End If
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽聽聽聽聽 End If
    聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
    聽聽聽聽聽聽聽 Next FormField

    聽聽聽聽聽聽聽 AcroExchAVDoc.Close (True)
    聽聽聽聽聽聽聽
    聽聽 End If
    聽聽聽聽聽聽聽
    Set AcroExchAVDoc = Nothing
    Set AcroExchApp = Nothing
    Set AFORMAUT = Nothing
    Set Field = Nothing
    聽聽聽聽聽聽聽聽
    ErrorHandler:
    聽聽聽 MsgBox ''FieldList Error: '' + Str(Err.Number) + '' '' + Err.Description + '' '' + Err.Source
    聽聽聽
    End Function

    Thanks

    Premier does not use all my CPU Cores...

    Hello all!

    I have built a dual quad xeon video editing workstation for my work but when we do any exports or renders the computer never uses more than 30% of its total CPU resources.聽 I have tried various codecs and settings but it always maxes out at 30% which is very frustrating.聽 By turning off 6 of the 8 cores in task manager affinity settings i can get both the cores to run at 100% which equals 30% CPU time.聽 If you turn on the other cores the load is then spread among them and the total CPU utilisation never goes higher than 30%.聽 From reading this forum i know other people have all their cores maxed out when rendering or exporting.

    Full system specs are:

    Tyan Tempest i5000XT

    2x Quad Xeon

    4GB DDR2 RAM

    Radeon 1950 Pro

    Creative X-Fi Plat pro

    Windows XP (32bit) SP3

    Adobe Production Suite CS3

    Any help or advice would be greatly appreciated.

    Premier does not use all my CPU Cores...

    Welcome to the forums.

    Are you using XP Pro or XP Home?

    Cheers
    Eddie

    Premier does not use all my CPU Cores...

    Sorry i should have said.

    XP Pro VLK.


    Good.

    I must point out that different codecs have different capabilities. Some codecs cannot use more than one core to encode while others can.

    Have you tested exporting to multiple different formats?

    Cheers
    Eddie


    Thanks for your replies Eddy.

    Do you have a suggested output format and codec which will make full use of the cpu resources?聽 That would help highlight if its the setting i am using or something more complex.


    I'm afraid I don't know. I would suspect that exporting to DV AVI would use all processors, but hopefully someone who knows for sure will chime in.

    Cheers
    Eddie


    Hopefully so. 聽 Thanks again for your replies.

    I downloaded another peice of software called media encoder and it maxes out all the cores so it is a setting problem.

    Illustrator won't quit

    Hallo

    Since about a week ago, I cannot get Illustrator CS3 to quit, either using File -%26gt; Quit or clicking the X-box at top right. The palettes all go away, but then it just sits there doing nothing and the only way to get out of it is to go into Process Manager and shut it down manually.

    What gives? Any ideas?

    IL CS3

    WinXP Pro

    Illustrator won't quit

    Did you recently install any new software? I'm aware of a few tools that block global OS functions (such as the close window x), but leaving the program via the File menu should work. It's a different way of calling specific functions. Another thing to know: Do you run AI alone or with other programs also open?


    Mylenium

    How to learn Flex (i am new to it )?

    Is knowledge of flash is needed to learn Flex?. I know basics of Flash. Is it enough ? Can anybody suggest me how to learn Flex?

    How to learn Flex (i am new to it )?

    No you don't have to know Flash. Certainly, begin comfortable with Flash timeline and drawing tools won't help you since they don't exist in Flex.

    But if you are already comfortable with ActionScript, you'll have a head start.

    The Flex in a Week tutorials are pretty good - although I found Day 5 to be very messy with some of the exercises having errors.

    You can also try Lynda.com for similar lessons that take a different approach but will teah you essentially the same things. The earlier Lynda.com lessons give better information on how to work with the Flex UI.

    So far I've not found any tutorials that cover the use of the debugger in detail, nor have I found any that include information on the most important thing about any development tool - excuse me while I shout.

    C O M M E N T I N G Y O U R C O D E !

    Steve

    How to learn Flex (i am new to it )?

    The best way to learn Flex is to go through the Flex Builder help sys page by page. I went through 3/5 of it twice, and it gives you an incredible grasp of the fundamentals.

    creating thumbnail start/stop buttons...

    I'm really new to Flash.聽 I have started by making some pretty basic animations.聽 I am now trying to create a group of thumbnails that will activate the corresponding聽 animation.聽 I'm having a hard time finding a tutorial that explains this.聽 I found one explaining it for a pretty basic one line shape tween.

    So i tried to write it pertaining to every layer/instance within the animation. With the button above.

    animation_mc.stop();

    button_mc.stop();

    聽聽聽聽 button_mc.onPress=function(){

    聽聽聽聽 if(button_mc._currentframe==1){

    聽聽聽聽 this.gotoAndStop(2);

    聽聽聽聽 animation_mc.play();

    }

    else{

    聽聽聽聽 this.gotoAndStop(1);

    聽聽聽聽 animation_mc.stop();

    聽聽聽聽 }

    }

    i am getting both a 1090 and 1058 migration issue error for each layer.聽 along with Type Error #1009 Cannot access a property or method of a null object reference.

    If anyone can help me with this it would be appreciated.聽 If there is a better way to go.聽 Please let me know.